COMSOL#
COMSOL is a finite element analysis software for a broad range of physical applications. For further information, see the official documentation.
Available versions on Aire#
Version |
Load Command |
---|---|
6.1 |
|
6.2 |
|
Setting up the licence#
Users need to provide their own licence via the LM_LICENSE_FILE
environment variable. This can be achieved by running:
export LM_LICENSE_FILE=port@host:$LM_LICENSE_FILE
Here, port
and host
can be obtained from the licence holder.
How to submit a job#
The below example demonstrates running a 16-core job using a fictitious licence server. COMSOL on Aire supports batch mode, using pre-built .mph
files.
Running COMSOL in command line can often create a large number of temporary files in your home directory. To resolve this we recommend creating a comsolrecovery
directory in your scratch, then adding the following line to your comsol batch command in your submission script: -recoverydir /scratch/$USER/comsolrecovery
.
#!/bin/bash
#SBATCH --job-name=comsol_example_job
#SBATCH --time=05:00:00
#SBATCH --mem=32G
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=16 # Number of CPU cores required
module load comsol/6.2
export LM_LICENSE_FILE=port@host:$LM_LICENSE_FILE
# Run the job
comsol batch -np $SLURM_CPUS_PER_TASK \
-tmpdir $TMPDIR \
-inputfile input.mph \
-outputfile output.mph \
-recoverydir /scratch/$USER/comsolrecovery
Performance tuning COMSOL#
General advice can be found at the COMSOL website.