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.
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.
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.
Contact OSC Help for getting access to COMSOL if you are a commercial user.
Comsol Inc., Commercial
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. 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.
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.
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
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:
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:
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
This documentation is to discuss how to set up an interactive parallel COMSOL job at OSC. The following example demonstrates the process of using COMSOL version 5.1 on Oakley. Depending on the version of COMSOL and cluster you work on, there mighe be some differences from the example. Feel free to contact OSC Help if you have any questions.
cat $PBS_NODEFILE | uniq > hostfile
Make sure the hostfile is located in the same directory where you COMSOL input file is put