COMSOL
COMSOL Multiphysics is a general-purpose software platform, based on advanced numerical methods, for modeling and simulating physics-based problems.
module load COMSOL
Available COMSOL versions can be listed with module spider COMSOL
. Specifying a version will list the needed modules, e.g.: module spider COMSOL/6.2
The comsol GUI can then be started via the command:
comsol
Serial Job:
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=COMSOL_SERIAL
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=comsol-serial-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Change to the work directory
cd "$HOME/jobdirectory"
### load modules and execute
module load COMSOL/6.2
export DISPLAY="localhost:0.0"
# start non-interactive batch job
comsol batch -tmpdir $TMP -inputfile input -outputfile output -batchlog logfile
Parallel Job:
#!/usr/bin/zsh
### Job name
#SBATCH --job-name=COMSOL_PARALLEL
### File / path where STDOUT will be written, the %J is the job id
#SBATCH --output=comsol-parallel-log.%J
### Request the time you need for execution. The full format is D-HH:MM:SS
### You must at least specify minutes or days and hours and may add or
### leave out any other parameters
#SBATCH --time=80
### Request number of hosts
#SBATCH --nodes=1
### Request number of CPUs
#SBATCH --ntasks=8
### Change to the work directory
cd "$HOME/jobdirectory"
### load modules and execute
module load COMSOL/6.0
export DISPLAY="localhost:0.0"
# start non-interactive batch job
comsol batch -mpibootstrap slurm -tmpdir $TMP -inputfile input -outputfile output -batchlog logfile