====== COMSOL ====== More information about Comsol GUI applications and Comsol batch jobs here: [[https://colab.tuwien.ac.at/display/IAVSC/Comsol|TUCOLAB- Comsol]] The following case is provided here including the appropriate batch-file: {{ :doku:karman.zip |}} Solely for the purpose of demonstrating how to use Comsol on a cluster.\\ ===== Module ===== Available version of Comsol can be found by executing the following line: module avail Comsol Currently on VSC-4 and VSC-5, these versions can be loaded: * Comsol/5.5 * Comsol/5.6 * Comsol/6.1 module load *your preferred module* ---- ===== Workflow ===== Typically, you would define your entire case either on the interactive access (using noMachine) or on your local machine, and then save it as a *.mph file (you also save this identical file as an output file). We recommend using noMachine because both the interactive access and the cluster itself have the same software packages installed. The *.mph file encapsulates all the necessary information required to successfully run a calculation on the cluster. The *.mph file contains all the necessary information required to successfully execute a calculation on the cluster. The computation results on the cluster will then be saved to the identical output file. ---- ===== Job script ===== An example of a job script is provided below. #!/bin/bash # slurmsubmit.sh #SBATCH --nodes=1 #SBATCH --ntasks-per-node=4 #SBATCH --job-name="karman" export I_MPI_PIN_RESPECT_CPUSET=0 export I_MPI_PIN_PROCESSOR_LIST=0-3 module purge module load intel-mpi/2021.5.0 module load Comsol/6.1 INPUTFILE="karman.mph" OUTPUTFILE="karmanout.mph" BATCHLOG="LOGFILE.log" comsol -mpi intel -np 4 -nn 4 batch slurm -inputfile ${INPUTFILE} -outputfile ${OUTPUTFILE} -batchlog ${BATCHLOG} -alivetime 600 ==== Possible IO-Error ==== COMSOL is generating a huge amount of temporary files during the calculation. These files in general got saved in ''$HOME'' and then this error will be occuring. To avoid it, you have to change the path of ''$TMPDIR'' to e.g. /local. So the temporary files will be stored on the SSD-storage local to the compute node. To get rid of this error just augment the comsol command in the job script by the following option: -tmpdir "/local" ===== Submit job ===== sbatch karman.job ---- ===== Result ===== {{ :doku:karman3.gif?nolink |}} ----