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
Versions
The versions currently available at OSC are:
Version | Cardinal |
---|---|
6.2 | X |
You can use module spider 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 only to the Ohio State University users. OSC does not provide COMSOL licenses for academic use to students and faculty outside of the Ohio State University due to licensing restrictions. If you or your institution have a network COMSOL license server, you may be able to use it on OSC. For connections to your license server from OSC, please read this document. If you need further help, please contact OSC Help.
To use COMSOL you will have to be added to the license server. Please contact OSC Help to be added.
Access for Commercial Users
Contact OSC Help for getting access to COMSOL if you are a commercial user.
Publisher/Vendor/Repository and License Type
Comsol Inc., Commercial
Usage
Usage on Owens
Set-up
module load comsol
. To select a particular software version, use module load comsol/version
. For example, use module load comsol/52a
to load COMSOL version 5.2a. Batch Usage
When you log into owens.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, one can run the following command:sinteractive -A <project-account> -N 1 -n 28 -t 1:00:00 -L comsolscript@osc:1which gives you 28 cores (
-N 1 -n 28
) with 1 hour ( -t 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 ( $SLURM_SUBMIT_DIR
). Below is the example batch script ( job.txt
) for a serial run:
#!/bin/bash #SBATCH --time=1:00:00 #SBATCH --nodes=1 --ntasks-per-node=1 #SBATCH -L comsolscript@osc:1 #SBATCH --account=<project-account> # # The following lines set up the COMSOL environment # module load comsol # # Use TMPDIR for best performance cp -p mycomsol.m $TMPDIR cd $TMPDIR # # Run COMSOL # comsol batch mycomsol # # Now, copy data (or move) back once the simulation has completed # cp -p * $SLURM_SUBMIT_DIR
Non-interactive Batch Job (Parallel Run for COMSOL 6.0 and Later)
Below is the example batch script for a parallel job using COMSOL 6.0 or later versions:
#!/bin/bash #SBATCH --time=1:00:00 #SBATCH --nodes=2 --ntasks-per-node=4 --cpus-per-task=7 #SBATCH -L comsolscript@osc:1 #SBATCH --account=<project-account> module load comsol echo "--- Copy Input Files to TMPDIR and Change Disk to TMPDIR" cp input_cluster.mph $TMPDIR cd $TMPDIR echo "--- COMSOL run" comsol batch -mpibootstrap slurm -inputfile input_cluster.mph -outputfile output_cluster.mph echo "--- Copy files back" cp output_cluster.mph output_cluster.mph.status ${SLURM_SUBMIT_DIR} echo "---Job finished at: 'date'" echo "---------------------------------------------"
Note:
- Use the "-mpibootstrap slurm" option to take the resource specification from the SBATCH directives, thus eliminating the -nnhost, -nn, and -np options. For more details see https://www.comsol.com/support/knowledgebase/1001
- Copy files from your directory to $TMPDIR.
- Provide the name of the input file and output file.
OLD 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:
#!/bin/bash #SBATCH --time=1:00:00 #SBATCH --nodes=2 --ntasks-per-node=28 #SBATCH -L comsolscript@osc:1 #SBATCH --account=<project-account> module load comsol echo "--- Copy Input Files to TMPDIR and Change Disk to TMPDIR" cp input_cluster.mph $TMPDIR cd $TMPDIR echo "--- COMSOL run" comsol -nn 2 batch -mpirsh ssh -inputfile input_cluster.mph -outputfile output_cluster.mph echo "--- Copy files back" cp output_cluster.mph output_cluster.mph.status ${SLURM_SUBMIT_DIR} echo "---Job finished at: 'date'" echo "---------------------------------------------"
Note:
- Set nodes to 2 and ppn to 28 ( --nodes=2 --ntasks-per-node=28). You can change the values per your need.
- Use "-mpirsh ssh" option for multi-node jobs
- Copy files from your directory to $TMPDIR.
- Provide the name of the input file and output file.
Avaliable COMSOL modules with OSC's academic license
Note: Last updated 02/05/24
AC/DC Module Battery Design Module CAD Import Module CFD Module Chemical Reaction Engineering Module Heat Transfer Module LiveLink for MATLAB MEMS Module Microfluidics Module Particle Tracing Module RF Module Semiconductor Module Structural Mechanics Module Subsurface Flow Module