Difference between revisions of "Comsol Guide"
From Storrs HPC Wiki
(Fix typo) |
(Add draft GPU instructions) |
||
Line 36: | Line 36: | ||
## Now, run COMSOL in batch mode with the input and output detailed above. | ## Now, run COMSOL in batch mode with the input and output detailed above. | ||
comsol -clustersimple batch -inputfile $INPUTFILE -outputfile $OUTPUTFILE $TMPDIR | comsol -clustersimple batch -inputfile $INPUTFILE -outputfile $OUTPUTFILE $TMPDIR | ||
+ | |||
+ | Then submit the script by issuing: | ||
+ | $ sbatch comsol.sh | ||
+ | |||
+ | === comsol with GPU === | ||
+ | $ ssh <NetID>@login.storrs.hpc.uconn.edu | ||
+ | $ module load intelics/2013.1.039-compiler zlib/1.2.8-ics mpi/mvapich2/2.0a-ics-slurm comsol/5.2 | ||
+ | |||
+ | To run comsol with SLURM, please create following comsol.sh: | ||
+ | #!/bin/bash | ||
+ | |||
+ | # Ask for a number of compute nodes | ||
+ | #SBATCH -p gpu | ||
+ | #SBATCH --gres=gpu:1 | ||
+ | #SBATCH -N 1 | ||
+ | #SBATCH -n 12 | ||
+ | # 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=/path/to/input_model.mph | ||
+ | OUTPUTFILE=/path/to/output_model.mph | ||
+ | TMPDIR= | ||
+ | |||
+ | # Load our comsol module | ||
+ | source /etc/profile.d/modules.sh | ||
+ | module purge | ||
+ | module load comsol/5.2a | ||
+ | |||
+ | ######## DO NOT EDIT BELOW THIS LINE ######## | ||
+ | # check if tmpdir exists | ||
+ | if [ ! -z $TMPDIR ]; then | ||
+ | TMPDIR="-tmpdir $TMPDIR" | ||
+ | fi | ||
+ | ## Now, run COMSOL in batch mode with the input and output detailed above. | ||
+ | comsol -3drend ogl -np $SLURM_NTASKS -inputfile $INPUTFILE -outputfile $OUTPUTFILE $TMPDIR | ||
Then submit the script by issuing: | Then submit the script by issuing: |
Revision as of 11:00, 29 September 2017
comsol with MPI
$ ssh <NetID>@login.storrs.hpc.uconn.edu $ module load intelics/2013.1.039-compiler zlib/1.2.8-ics mpi/mvapich2/2.0a-ics-slurm comsol/5.2
To run comsol with SLURM, please create following comsol.sh:
#!/bin/bash # Ask for a number of compute nodes #SBATCH -N 2 #specify the number of nodes to change total number of cores #DO NOT CHANGE the following two lines #SBATCH -c12 #SBATCH --ntasks-per-node=1 # Set your email address to be notified of jobs updates #SBATCH --mail-type=ALL #SBATCH --mail-user=your@email.address # Specify the run time you require, in the format HH:MM:SS #SBATCH --time=04:00:00 # Details of your input and output files INPUTFILE=/path/to/input_model.mph OUTPUTFILE=/path/to/output_model.mph TMPDIR= # Load our comsol module source /etc/profile.d/modules.sh module purge module load intelics/2013.1.039-compiler zlib/1.2.8-ics mpi/mvapich2/2.0a-ics-slurm comsol/5.2 ######## DO NOT EDIT BELOW THIS LINE ######## # check if tmpdir exists if [ ! -z $TMPDIR ]; then TMPDIR="-tmpdir $TMPDIR" fi ## Now, run COMSOL in batch mode with the input and output detailed above. comsol -clustersimple batch -inputfile $INPUTFILE -outputfile $OUTPUTFILE $TMPDIR
Then submit the script by issuing:
$ sbatch comsol.sh
comsol with GPU
$ ssh <NetID>@login.storrs.hpc.uconn.edu $ module load intelics/2013.1.039-compiler zlib/1.2.8-ics mpi/mvapich2/2.0a-ics-slurm comsol/5.2
To run comsol with SLURM, please create following comsol.sh:
#!/bin/bash # Ask for a number of compute nodes #SBATCH -p gpu #SBATCH --gres=gpu:1 #SBATCH -N 1 #SBATCH -n 12 # 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=/path/to/input_model.mph OUTPUTFILE=/path/to/output_model.mph TMPDIR= # Load our comsol module source /etc/profile.d/modules.sh module purge module load comsol/5.2a ######## DO NOT EDIT BELOW THIS LINE ######## # check if tmpdir exists if [ ! -z $TMPDIR ]; then TMPDIR="-tmpdir $TMPDIR" fi ## Now, run COMSOL in batch mode with the input and output detailed above. comsol -3drend ogl -np $SLURM_NTASKS -inputfile $INPUTFILE -outputfile $OUTPUTFILE $TMPDIR
Then submit the script by issuing:
$ sbatch comsol.sh
comsol on single node
Some comsol algorithms like PARDISO do not make use of MPI like .
To run these, you can specify -np
instead of -clustersimple
as follows
#!/bin/bash # Ask for a number of compute nodes #SBATCH -N 1 #SBATCH -n 24 # Details of your input and output files INPUTFILE=input_model.mph OUTPUTFILE=output_model.mph TMPDIR=temp ######## DO NOT EDIT BELOW THIS LINE ######## # Load our comsol module source /etc/profile.d/modules.sh module purge module load comsol/5.2 ## Now, run COMSOL in batch mode with the input and output detailed above. comsol batch -np $SLURM_NTASKS -inputfile $INPUTFILE -outputfile $OUTPUTFILE -tmpdir $TMPDIR
Then submit the script by issuing:
$ sbatch comsol.sh