Comsol/Batch

From ScientificComputing
Jump to: navigation, search

You need to submit your COMSOL jobs through the batch system. For a single processor calculation a typical command could look like

 bsub [LSF options] comsol batch -inputfile infile.mph -outputfile outfile.mph 

Here you need to replace [LSF options] with LSF parameters for the resource requirements of the job. Please find a documentation about the parameters of bsub on the wiki page about the batch system.

For using the COMSOLBATCH licenses, you would need to add the -usebatchlic option:

 bsub [LSF options] comsol batch -usebatchlic -inputfile infile.mph -outputfile outfile.mph

Parallel jobs using shared memory

For parallel jobs using shared memory, you can specify the number of cores to be used with the -np option of COMSOL:

 bsub -n 4 [LSF options] comsol batch -np 4 -inputfile infile.mph -outputfile outfile.mph 

Please make sure that the -n option ob bsub and the -np option of COSMOL always have the same value. Please be careful to not use the -clustersimple option for shared memory jobs as this would make COMSOL start MPI processes instead of using threads.

If you plan to run parallel COMSOL jobs, then we strongly recommend to first do a small scaling study to find out the sweet spot for the parallel efficiency of your model. Since COMSOL can be strongly memory bound, the sweet spot might be to use 4 cores (see scaling study below).

Parallel jobs using distributed memory

If you would like to run COMSOL in distributed memory mode, then you need to add the -mpibootstrap lsf option to your COMSOL command:

 bsub -n 4 [LSF options] comsol batch -mpibootstrap lsf -inputfile infile.mph -outputfile outfile.mph

Please be careful to not mix the -mpibootstrap lsf option with the -np option as this will start too many threads. The -mpibootstrap lsf option will tell COMSOL to get the required MPI information like hostnames etc. directly from the batch system.

If you plan to run parallel COMSOL jobs, then we strongly recommend to first do a small scaling study to find out the sweet spot for the parallel efficiency of your model. Since COMSOL can be strongly memory bound, the sweet spot might be to use 4 cores (see scaling study below).