#!/bin/bash -login #SBATCH --job-name COMSOL #SBATCH --mail-user=youremail@...uni-hannover.de #SBATCH --mail-type=BEGIN,END,FAIL #SBATCH --time=1:00:00 #SBATCH --nodes=2 #SBATCH --ntasks=16 #SBATCH --mem=60G # load module module load COMSOL/5.4 # go to work dir cd $SLURM_SUBMIT_DIR echo "Running on $SLURM_JOB_NODELIST" /sw-eb/system/bin/expand-slurm-nodelist >hostfile # start comsol (all options must be on a single line) comsol -nn $SLURM_NNODES -np $SLURM_NPROCS batch -f hostfile -mpirsh ssh -inputfile input_cluster.mph -outputfile output_cluster.mph -tmpdir $TMPDIR