meta data for this page
  •  
Translations of this page:

Comsol

COMSOL can use the variables provided by the SLURM queue system, so the script for “sbatch” is quite simple. The only oddity is that the number of cores is chosen using the “–nodes” and “–ntasks-per-node” variables, the “–ntasks” variable is calculated by Comsol itself. Splitting the task between multiple nodes slows down the calculation considerably, so it is recommended to keep “–nodes=1”.

#!/bin/bash
#SBATCH --job-name=comsol_test
#SBATCH --output=test.%j.output
#SBATCH --error=test.%j.error

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8

comsol batch -mpibootstrap slurm -inputfile in.mph -outputfile out.mph