Skip to content

COMSOL Multiphysics#

COMSOL Multiphysics is installed on Woody.

Do not run production jobs on the login nodes; use an interactive job or a batch job as shown below.

License

The cluster does not come with a COMSOL license. A license has to be activated for your group. Once your group has a license, the module configures it automatically (on load you will see a line such as using group-specific license settings), so no manual license setup is needed.

Loading the module#

module avail comsol
module load comsol

Interactive session#

Grab a compute node interactively, load the module, and run your model in batch mode:

salloc --nodes=1 --cpus-per-task=4 --time=01:00:00

module load comsol/6.3

comsol batch -np ${SLURM_CPUS_PER_TASK} \
    -inputfile model.mph \
    -outputfile model_out.mph

Batch job#

Example job script comsol.sh:

#!/bin/bash -l
#SBATCH --job-name=comsol
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=4
#SBATCH --time=04:00:00
#SBATCH --export=NONE

unset SLURM_EXPORT_ENV

module load comsol/6.3

INPUT_FILE=$WORK/model.mph
OUTPUT_FILE=$WORK/model_solved.mph
BATCH_LOG=$WORK/model.log

comsol batch -np $SLURM_CPUS_PER_TASK \
    -inputfile  $INPUT_FILE  \
    -outputfile $OUTPUT_FILE \
    -batchlog   $BATCH_LOG   \
    -autosave off \
    -prefsdir $HOME/.comsol/v63 \
    -configuration $TMPDIR \
    -tmpdir $TMPDIR

Submit it with:

sbatch comsol.sh