COMSOL
The COMSOL Multiphysics engineering simulation software environment facilitates all steps in the modeling process − defining your geometry, meshing, specifying your physics, solving, and then visualizing your results.
Running COMSOL on the TCHPC clusters is done in batch mode. The generation of models should be done locally on your own desktop. Save your model file (*.mph) and transfer it to the cluster for analysis.
COMSOL is a restricted access software due to limited available licences. Please contact the team (ops@tchpc.tcd.ie) if you require access.
Requirments
- A TCHPC account. You can apply here : https://www.tchpc.tcd.ie/support/apply/
- A resource allocation (project code): https://www.tchpc.tcd.ie/resource_application/
File transfer to the cluster
After you have generated your model file (usually named *.mph) you will need to transfer it to the cluster. Details on the transfer of files to and from our cluster are available here : https://www.tchpc.tcd.ie/node/262
You will typically have been assigned a storage area in association with your project id. This would be a good place to store model files and to run the analysis.
Generate a batch submission file
To run your COMSOL job you will need to generate another file know as a 'batch submission file'. This file will details the resources required for the job, will set up the required environment for the job and, finally, run the job. The batch file is submitted the the queue and run when the resources are available.
Below is a template batch file. It would generally live in the same directory as your *.mph model file.
#!/bin/bash # Ask for a number of compute nodes #SBATCH -N# Submit to a partition (debug or compute) #SBATCH -p compute # Request a run time (max 4days on compute partition) #SBATCH -t 24:00:00 # Provide you project ID #SBATCH -U # Set your email address to be notified of jobs updates #SBATCH --mail-type=ALL #SBATCH --mail-user=your@email.address # Details of your input and output files INPUTFILE=/location/of/my/model.mph OUTPUTFILE=/location/of/my/output_model.mph ######## DO NOT EDIT BELOW THIS LINE ######## export PATH=$PATH:/home/support/apps/apps/comsol42a/COMSOL42a/bin/ #SETUP THE COMSOL Environment # Create a machinefile for mpd srun hostname | sort -n > $SLURM_SUBMIT_DIR/machine_file /home/support/apps/apps/comsol42a/COMSOL42a/bin/comsol -nn $SLURM_NNODES mpd boot -f $SLURM_SUBMIT_DIR/machine_file ## Now, run COMSOL in batch mode with the input and output detailed above. /home/support/apps/apps/comsol42a/COMSOL42a/bin/comsol -nn $SLURM_NNODES batch -inputfile $INPUTFILE -outputfile $OUTPUTFILE
Transfer this file (perhaps named
You will need to access the cluster via SSH to submit your job. Details on how to do this are available : https://www.tchpc.tcd.ie/node/76
When you have logged in, do the following :
Submit the job to the queue
cd /projects/location/of/batchfile.sbatch
sbatch batchfile.sbatch
Notes