Comsol
Comsol in the Academic Labs
Comsol in RDSH
Using Comsol in OnDemand
Start a Cluster Desktop from the Ondemand interface:Ā https://compute.engr.wustl.edu
Open a terminal.
Execute the commands:
module add comsol
comsol
Using Comsol in Batch Mode
More information on managing batch jobs and job scripts in LSF can be found at The LSF Scheduler
Your lab might have a specific Comsol license to use, in which case you may need to use a different "module add" command before running Comsol.
A basic batch script for Comsol, that runs on the cpu-compute-long queue, asking for 32 CPU cores and 64GB of RAM:
# embedded options to bsub - start with #BSUB # -- job name --- #BSUB -J Com_wrench_par_shared # -- Notify me by email when execution begins -- #BSUB -B # -- Notify me by email when execution ends -- #BSUB -N # -- email address -- # please uncomment the following line and put in your e-mail address, # if you want to receive e-mail notifications on a non-default address ##BSUB -u your_email_address # -- estimated wall clock time (execution time), commented out by default.
# LSF will kill jobs with this setting at the specified time ##BSUB -W 4:00 ### -- specify that we need 64GB of memory -- #BSUB -R "rusage[mem=64GB]" # -- parallel environment requests: 32 cores -- #BSUB -n 32 ### -- specify that the cores MUST BE on a single host! It's a SMP job! -- #BSUB -R "span[hosts=1]" ### -- Specify the output and error file. %J is the job-id -- ### -- -o and -e mean append, -oo and -eo mean overwrite -- #BSUB -o Output_%J.out #BSUB -e Error_%J.err
module add comsol
mkdir /scratch/long/$USER.$LSB_JOBID
comsol batch -np 32 -inputfile wrench.mph -outputfile wrench_out.mph -tmpdir /scratch/long/$USER.$LSB_JOBID -recoverydir /scratch/long/$USER.$LSB_JOBID
The job script above runs Comsol in batch mode, across 32 CPU cores on a single machine. It uses 'wrench.mph' as it's input file, 'wrench_out.mph' as it's output, and puts temporary files under a directory /scratch/long specific to that job's ID number.
It expects to see the input files and will write the output files in whatever directory you submit the job from.Ā