COMSOL

From Cheaha
Jump to navigation Jump to search


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

COMSOL Multiphysics (formerly FEMLAB) is a finite element analysis, solver and Simulation software / FEA Software package for various physics and engineering applications, especially coupled phenomena, or multiphysics. COMSOL Multiphysics also offers an extensive interface to MATLAB and its toolboxes for a large variety of programming, preprocessing and postprocessing possibilities. The packages are cross-platform (Windows, Mac, Linux, Unix). In addition to conventional physics-based user-interfaces, COMSOL Multiphysics also allows for entering coupled systems of partial differential equations (PDEs). The PDEs can be entered directly or using the so called weak form (see finite element method for a description of weak formulation).

COMSOL was started by graduate students to Germund Dahlquist based on codes developed for a graduate course at the Royal Institute of Technology (KTH) in Stockholm, Sweden.

The current version of COMSOL Multiphysiscs installed on the Cheaha is ver 4.2

Overview

Comsol can be used in a variety of interactive and batch modes on the Cheaha cluster.

  1. Submit cluster enabled batch jobs from the linux command prompt or scheduler script (Preferred method)
  2. Start Comsol desktop GUI on Cheaha and work interactively on the cluster
  3. Start Comsol desktop GUI on a local PC/MAC and connect to cluster enabled Comsol server on the Cheaha


Submit cluster enabled batch jobs from command line or scheduler script (Preferred method)

  1. Check for the version of Comsol on Cheaha
 $ module avail comsol

------------------------------- /etc/modulefiles -------------------------------
comsol/comsol42
  1. First, create the working directory for the job- Replace 'USERNAME' with the account associated username on Cheaha.

You can create any directory to run your job. It is recommended that the job directory be on the scratch (i.e. lustre filesystem) instead of the user home directory.

$ mkdir -p /lustre/scratch/USERNAME/jobs/COMSOL 
$ cd /lustre/scratch/USERNAME/jobs/COMSOL


  1. Next, Copy all the files required for NAMD to the working directory

Cosmol requires at least the input model file *.mph (this model can be created on the local machine) From your local machine using terminal or putty (If on Windows) transfer the files to Cheaha in the directory created above

$ scp -r model.mph USERNAME@cheaha.uabgrid.uab.edu:/lustre/scratch/USERNAME/jobs/COMSOL 
  1. Next, create a job submit script as shown below called 'comsolSubmit', make sure to edit the following parameters:
* -l h_rt to the maximum wall time for your job
* -N - job name
* -M - user email
* -pe smp #numberOfProcessors  (-pe smp 8 - run the code in parallel on 8  processors on Cheaha. Maximum smp available is 12)
* -l vf to the maximum memory needed for each task (if you ask for 4GB and -pe smp 8, it will give you a total of 4GB * 8 processors =32GB for the job. Maximum memory 47GB usable on the sipsey nodes)
* cd to the current working directory where the job data is stored

#!/bin/bash
#$ -S /bin/bash
#$ -cwd
# Specify parallel environment and number of cores required
#$ -pe smp 2
#
# Specify job memory(if you specify smp of more than 1, total job memory will be vf*smp) 
#$ -l vf=4G
#
# Specify job runtime(hh:mm:ss)
#$ -l h_rt=1:00:00
#$ -j y
#
# Specify jobname and email address
#$ -N comsol_test
#$ -M tanthony@uab.edu
#$ -V
# 
# Specify the job queue (leave commented for all queues)
#$ -q sipsey.q
#
# Load modules appropriate for Comsol
 module load comsol/comsol42



comsol batch -inputfile model1.mph -outputfile outputName.mph >> outputNAME.txt



exit