Update Tue Feb 10th 11:30am -- This issue is resolved.  

There is a bug in the changes we made to a part of our batch software during the downtime. The bug is affecting some users when they submit jobs to our system.

COMSOL

COMSOL Multiphysics (formerly FEMLAB) is a finite element analysis and solver software package for various physics and engineering applications, especially coupled phenomena, or multiphysics. owned and supported by COMSOL, Inc.

Availability and Restrictions

COMSOL is available on the Oakley and Glenn clusters. The versions currently available at OSC are

Version GLENN OAKLEY notes
3.4 X    
3.5a X    
4.0 X    
4.0a X    
4.1 X    
4.2 X    
4.2a X    
4.3 X* X  
4.3a   X Default version on Oakley prior to 09/15/2015
4.3b   X  
4.4   X  
5.1   X*  
*: Current default version

You can use module avail comsol  to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.

Access for Academic Users

COMSOL is for academic use, available to all Ohio State University users. OSC does not provide COMSOL licenses for academic use to students and faculty outside of Ohio State due to licensing restrictions. If you are at a different academic institution and would like to discuss access to COMSOL, please contact OSC Help .

To use COMSOL you will have to be added to the license server first.  Please contact OSC Help to be added.

Access for Commerical Users

Contact OSC Help for getting access to COMSOL if you are a commercial user. 

Usage

Usage on Glenn

Set-up on Glenn

To load the default version of COMSOL module, use  module load comsol . To select a particular software version, use   module load comsolversion . For example, use  module load comsol34   to load COMSOL version 3.4 on Glenn. 

Batch Usage on Glenn

When you log into glenn.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your analysis to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info. 

Interactive Batch Session
For an interactive batch session on Glenn, one can run the following command:
qsub -I -l nodes=1:ppn=8 -l walltime=1:00:00 -l software=comsolscript
which gives you 8 cores ( -l nodes=1:ppn=8 ) with 1 hour ( -l walltime=1:00:00 ). You may adjust the numbers per your need.
Non-interactive Batch Job (Serial Run)

Assume that you have had a comsol script file mycomsol.m  in your working direcory ( $PBS_O_WORKDIR ). Below is the example batch script ( job.txt ) for a serial run: 

#PBS -N COMSOL
#PBS -l walltime=1:00:00
#PBS -l nodes=1:ppn=1
#PBS -j oe
#PBS -l software=comsolscript
#
# The following lines set up the COMSOL environment
#
module load comsol
#
# Move to the directory where the job was submitted
#
cd $PBS_O_WORKDIR
cp *.m $TMPDIR
cd $TMPDIR
#
# Run COMSOL
#
comsol batch mycomsol
#
# Now, copy data (or move) back once the simulation has completed
#
cp * $PBS_O_WORKDIR
Non-interactive Batch Job (Parallel Run for COMSOL 4.2a and Earlier)

Below is the example batch script (  job.txt ) for a parallel run using COMSOL 4.2a or earlier versions: 

#PBS -l walltime=01:00:00
#PBS -l nodes=2:ppn=8
#PBS -N COMSOL
#PBS -j oe
#PBS -r n
#PBS -l software=comsolscript
cd ${PBS_O_WORKDIR}
module load comsol
echo "--- Copy Input Files to TMPDIR and Change Disk to TMPDIR"
cp input_cluster.mph $TMPDIR
cd $TMPDIR
np=8
echo "--- Running on ${np} processes (cores) on the following nodes:"
cat $PBS_NODEFILE | uniq
echo "---- mpd BOOT"
comsol -nn 2 mpd boot -f $PBS_NODEFILE
echo "--- mpd TRACE"
comsol mpd trace
echo "--- COMSOL run"
comsol -nn 2 -np ${np} batch -inputfile input_cluster.mph -outputfile output_cluster.mph
echo "--- mpd ALLEXIT"
comsol mpd allexit
echo "--- Copy files back"
cp output_cluster.mph output_cluster.mph.status ${PBS_O_WORKDIR}
echo "---Job finished at: 'date'"
echo "---------------------------------------------"

Note:

  • Set nodes to 2 and ppn to 8 ( -l nodes=2:ppn=8 ). You can change the values per your need
  • Copy files from your directory to $TMPDIR
  • Run mpdboot
  • Provide the name of the input file and output file.
Non-interactive Batch Job (Parallel Run for COMSOL 4.3 and Later)

As of version 4.3, it is not necessary to start up MPD before launching a COMSOL job. Below is the example batch script ( job.txt ) for a parallel run using COMSOL 4.3 or later versions:

#PBS -l walltime=01:00:00
#PBS -l nodes=2:ppn=8
#PBS -N COMSOL
#PBS -j oe
#PBS -r n
#PBS -l software=comsolscript
cd ${PBS_O_WORKDIR}
module load comsol
echo "--- Copy Input Files to TMPDIR and Change Disk to TMPDIR"
cp input_cluster.mph $TMPDIR
cd $TMPDIR
np=8
echo "--- Running on ${np} processes (cores) on the following nodes:"
cat $PBS_NODEFILE | uniq > hostfile
echo "--- COMSOL run"
comsol -nn 2 -np ${np} batch -f hostfile -mpirsh rsh -inputfile input_cluster.mph -outputfile output_cluster.mph
echo "--- Copy files back"
cp output_cluster.mph output_cluster.mph.status ${PBS_O_WORKDIR}
echo "---Job finished at: 'date'"
echo "---------------------------------------------"

Note:

  • Set nodes to 2 and ppn to 8 ( -l nodes=2:ppn=8 ). You can change the values per your need
  • Copy files from your directory to $TMPDIR
  • Provide the name of the input file and output file.

Usage on Oakley

Set-up on Oakley

To load the default version of COMSOL module, use  module load comsol . To select a particular software version, use   module load comsol/version . For example, use  module load comsol/44   to load COMSOL version 4.4 on Oakley. 

Batch Usage on Oakley

When you log into oakley.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your analysis to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info. 

Interactive Batch Session
For an interactive batch session on Oakley, one can run the following command:
qsub -I -l nodes=1:ppn=12 -l walltime=1:00:00 -l software=comsolscript
which gives you 12 cores ( -l nodes=1:ppn=12 ) with 1 hour ( -l walltime=1:00:00 ). You may adjust the numbers per your need.
Non-interactive Batch Job (Serial Run)

Assume that you have had a comsol script file mycomsol.m  in your working direcory ( $PBS_O_WORKDIR ). Below is the example batch script ( job.txt ) for a serial run: 

#PBS -N COMSOL
#PBS -l walltime=1:00:00
#PBS -l nodes=1:ppn=1
#PBS -j oe
#PBS -l software=comsolscript
#
# The following lines set up the COMSOL environment
#
module load comsol
#
# Move to the directory where the job was submitted
#
cd $PBS_O_WORKDIR
cp *.m $TMPDIR
cd $TMPDIR
#
# Run COMSOL
#
comsol batch mycomsol
#
# Now, copy data (or move) back once the simulation has completed
#
cp * $PBS_O_WORKDIR
Non-interactive Batch Job (Parallel Run for COMSOL 4.3 and Later)

As of version 4.3, it is not necessary to start up MPD before launching a COMSOL job. Below is the example batch script ( job.txt ) for a parallel run using COMSOL 4.3 or later versions:

#PBS -l walltime=01:00:00
#PBS -l nodes=2:ppn=12
#PBS -N COMSOL
#PBS -j oe
#PBS -r n
#PBS -l software=comsolscript
cd ${PBS_O_WORKDIR}
module load comsol
echo "--- Copy Input Files to TMPDIR and Change Disk to TMPDIR"
cp input_cluster.mph $TMPDIR
cd $TMPDIR
np=12
echo "--- Running on ${np} processes (cores) on the following nodes:"
cat $PBS_NODEFILE | uniq > hostfile
echo "--- COMSOL run"
comsol -nn 2 -np ${np} batch -f hostfile -mpirsh rsh -inputfile input_cluster.mph -outputfile output_cluster.mph
echo "--- Copy files back"
cp output_cluster.mph output_cluster.mph.status ${PBS_O_WORKDIR}
echo "---Job finished at: 'date'"
echo "---------------------------------------------"

Note:

  • Set nodes to 2 and ppn to 12 ( -l nodes=2:ppn=12  ). You can change the values per your need
  • Copy files from your directory to $TMPDIR
  • Provide the name of the input file and output file.

Further Reading

See Also

Supercomputer: 
Service: