Skip to end of metadata
Go to start of metadata

Comsol license server outage: From August 8, 6:00 PM to August 9, 8:00 AM due to network related work. You will not be able to use the software during this time.

The examples below discuss how to run Comsol interactively, or non-interactively in batch mode (without any GUI interface), and how to submit a Comsol job to the Odyssey job scheduler SLURM.

Getting started

Obtain a FAS RC account by visiting:

https://portal.rc.fas.harvard.edu/request/account/new

Odyssey quick start guide:

https://www.rc.fas.harvard.edu/resources/odyssey-quickstart-guide/

Please consult the documentation available at the above link for connecting to FAS systems and familiarizing yourself with the SLURM queue management system. For any help on Odyssey, contact FAS RC:

https://rc.fas.harvard.edu/about/contact/

Using Comsol

Important: Due to the limited number of COMSOL licenses, we sometimes run out of licenses. If you get a message to that effect, wait for some time before trying again.  Also, please log out of any sessions when not in use. If your work requires regular use of COMSOL, please consider purchasing a copy from COMSOL.

Interactive use

You cannot run COMSOL on the login node. Instead, you need to use SLURM with an interactive option to open the GUI. 

The best option for working interactively on Odyssey is to use the NX (nomachine) connection. Please visit:

https://www.rc.fas.harvard.edu/resources/access-and-login/

Once you are on NX, open a terminal via Applications --> System Tools. You can type shell commands in the terminal.

Comsol versions available via the new module system:

module-query comsol

Older COMSOL versions available under the old module system:

module load centos6
source new-modules.sh
module load legacy

module av 2>&1 | grep -i comsol | grep -i seas

Newer versions: comsol 5.3a

These are under the new module system. Once you determine a version to use, run it interactively as follows:

Note that the SLURM command 'srun' requires memory to be specified. The options '–mem 4000' requests 4 Gigs of memory, which is a reasonable amount to start with; '-t 0-2:00' specifies a 2 hour session; and '-n 1 -N 1' requests 1 core on 1 node.

Older modules: comsol 5.1,5.0,4.4,4.3a

(Note that you need to load the legacy module)

Running comsol in batch via slurm

In order to run Comsol mph files in the batch mode (i.e. solving the model without using the GUI interface) you need an input file (usually with extension .mph) created with COMSOL GUI. Once you have an input file (we use, for eg. busbar.mph in the following example), prepare a batch submission script for COMSOL using the following template (called "runscript_comsol.sh"):

You can submit the script to SLURM with:

For further details on using Odyssey and  SLURM (such as monitoring or canceling your jobs) please visit https://rc.fas.harvard.edu or the list of convenient SLURM commands at https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/.

Documentation

Comsol documentation is generally found in the COMSOL installation directories. You can find out the installation directory for the particular module you are using with, eg.:


The above command should display something like setenv("COMSOL_HOME","/n/sw/comsol53a")  in  addition to other locations. In this case, the documentation directory is: 

You can view the pdf files in the directoried in the above directory with a pdf reader, such as evince:

Comsol documentation is usually found under html and pdf directories. You can open the pdf documentation with the following SLURM command:

(Please do not use evince directly on the login node.) Alternatively, you can copy the pdf files to your local desktop/laptop.


Comsol examples

As under Documentation, determine the installation directory for COMSOL. For example, for comsol5.3, it is: 

/n/sw/comsol53

comsol examples are in:

/n/sw/comsol53/applications/

For example, the busbar example is in:

/n/sw/comsol53/applications/COMSOL_Multiphysics/Multiphysics/

You need to copy all the files with busbar in them in order to run the example script:

cp  /n/sw/comsol53/applications/COMSOL_Multiphysics/Multiphysics/ busbar* .

(Note the dot (.) at the end on the line above)


 

  • No labels