Support

COMSOL LSF Procedure

Instructions Video

This video provides instructions on how to run COSMOL jobs on the cluster: 

https://www.youtube.com/watch?v=NjFuDegLOC0&feature=youtu.be

Loading COMSOL File

Test COMSOL file: Cylinder.mph. Upload your *.mph to your working directory.

Create a shell file to enter LSF bsub and the COMSOL batch commands. See appendix for example.

Upload shell file to the same working directory (Files can be dragged and dropped).

Running the Script

Use “module load COMSOL” declaration in terminal window to set up $PATH and licensing environment variables.

Prompt> module load COMSOL/5.5

Use a bsub < (my_comsol_shell.sh) command at a prompt to run a simulation, like this:

Prompt> bsub < my_comsol_shell.sh

Appendix

Save the following as a script file or download it.

#!/bin/sh

# embedded options to bsub – start with #BSUB

# — Name of the job —

#BSUB -J COMSOL_example

# — specify queue —

#BSUB -q adept

# — specify wall clock time to run as hh:mm —

##

## All commands preceded by ## are invisible to the LSF job scheduler.

##

##BSUB -W 04:00

# — specify the number of processors —

#BSUB -n 8

# — specify the number of nodes —

##BSUB -R “span[hosts=5]”

# — user e-mail address —

##BSUB -priya.mangannavar@cmc.ca

# — mail notification —

# — at start —

##BSUB -B

# — at completion —

##BSUB -N

# — Specify the output and error files. %J is the job ID —

# — -o and -e mean append, -oo and-eo mean overwrite —

#BSUB -oo Cylinder_%J.out

#BSUB -eo Cylinder_%J.err

# example of launching a COMSOL simulation using an LSF job scheduler in batch mode

comsol batch -inputfile Cylinder.mph -outputfile Cylinder_out.mph

Does your research benefit from products and services provided by CMC Microsystems?
Scroll to Top
Skip to content