COMSOL

General Information

Home pageVersionLicensing
www.comsol.com4.3b This COMSOL version is available to students and staff employees at the Faculty of Engineering Science and Technology, NTNU. Contact support-ntnu@nottur.no to be added to the ivt unix group.
5.2This COMSOL version is available to students and staff employees at the Faculty of Engineering Science and Technology, NTNU, and the Department of Electric Power Engineering (IVT), NTNU. Contact support-ntnu@nottur.no to be added to the ivt or ime unix group.

Usage on Vilje

Load one of the comsol modules to use COMSOL on Vilje, e.g.:

$ module load comsol/5.2

Sample COMSOL Job Script

#!/bin/bash
########################################################
#
# Running COMSOL cluster job
#
# The default setup is to run COMSOL in hybrid mode
# with 2 MPI processes per node ('mpiprocs'), one per
# socket, and 8 threads ('ompthreads') per MPI process
#
########################################################
#
#PBS -N test
#PBS -A nn1234k
#PBS -l select=2:ncpus=32:mpiprocs=2:ompthreads=8
#PBS -l walltime=24:00:00
#

module load comsol

export I_MPI_PIN_DOMAIN=omp
export I_MPI_PIN_PROCESSOR_LIST=allcores

case=$PBS_JOBNAME

cd $PBS_O_WORKDIR

# Create (if necessary) the working directory
w=/work/$PBS_O_LOGNAME/comsol/$case
if [ ! -d $w ]; then mkdir -p $w; fi

# Copy inputfile and move to working directory
cp $case.mph $w
cd $w

comsol batch -mpibootstrap ssh -inputfile $case.mph -outputfile out.mph -tmpdir $w

#!/bin/bash
###################################################
#
#  Running Comsol with Matlab
#
###################################################
#
#PBS -N test
#PBS -A nn1234k
#PBS -l select=1:ncpus=32:mpiprocs=16
#PBS -l walltime=24:00:00
#
 
module load comsol
module load matlab

case=$PBS_JOBNAME
 
cd $PBS_O_WORKDIR
 
# Create (if necessary) the working directory
w=/work/$PBS_O_LOGNAME/comsol/$case
if [ ! -d $w ]; then mkdir -p $w; fi
 
# Copy inputfile and move to working directory
cp $case.m $w
cd $w

comsol mphserver -silent &
matlab -nodisplay -nosplash -r "addpath $COMSOL_INC/mli, mphstart, $case"
Scroll to Top