Skip to content

COMSOL#

The COMSOL Multiphysics® software brings a user interface and experience that is always the same, regardless of engineering application and physics phenomena.

COMSOL at NHPCC#

There are three ways to run comsol on Panthera cluster:

  • Interactive mode
  • Using subcomsol command
  • Using OnDemand web portal

Interactive mode#

First, create an interactive job to connect to one of the compute nodes:

u111112@login1:~/wrkdir> srun -n 4 --mem=1G -p short -t 10 --pty /bin/bash
srun: job 57293 queued and waiting for resources
srun: job 57293 has been allocated resources
u111112@cn-12-1:~/wrkdir>

Then, you have to load the comsol module:

u111112@cn-12-1:~/wrkdir> ml comsol

Tip

In order to see all comsol versions installed on Panthera you can type comsol and press the Tab key twice. For more information on how to use modules, please visit this page.

Finally, you can use your software:

u111112@cn-12-1:~/wrkdir> comsol ...

Using subcomsol command#

This is the fast and easiest method most users prefer to load and run comsol on the cluster. Simply on login node press subcomsol command without any options to see it's help:

u111112@login1:~/wrkdir> subcomsol
Create and submit job for COMSOL Multiphysics

Usage: subcomsol <INPUT> [OPTION]

        -n  <np>          Number of cores.
        -N  <nn[:nt]>     Number of nodes and number of tasks per node.
        -m  <mem>         Memory required for job (GB).
        -p  <part>        Partition name to submit the job. (use 'sinfo')
        -v  <ver>         Software version. Available: 5.6, 6.1, 6.2 Default: 6.1
        -o  <output>      Name of output file. Default: <input>_out.
        -j  <jobname>     Name of job file.    Default: name of input file.
        -l  <disk>        Disk space required for scratch (GB). Default: 5
        -t  <time>        run time of the job. Valid format: M, H:M:S, D-H, D-H:M
        -s  <study>       The study to compute.
        -a  <on|{off}>    Control saving of recovery files.
        -r                Recover and continue computation.
        -co <opt>         Additional options for comsol batch command.
        -so <sopt>        Additional slurm options if needed.
        -no               Only write job file.
        -h | --help       Print this message and exit.

 Example:   subcomsol test.mph -n 4 -m 4 -t 1-0 -s std1 

Matlab and Comsol#

If you need to make a link between Matlab and Comsol you can use our submatcom command:

u111112@login1:~/wrkdir> submatcom
Create and submit job for LiveLink Matlab & Comsol

Usage: submatcom <INPUT> [OPTION]

        -n  <n1>          Number of processors.
        -m  <mem>         Memory required for job (GB).
        -p  <part>        Partition name to submit the job. (use 'sinfo')
        -v  <ver>         Matlab Version. Available: 2019b, 2021b, 2022b, 2023a Default: 2019b
        -t  <time>        run time of the job. Valid format: M, H:M:S, D-H, D-H:M
        -j  <jobname>     Job Name. Default: name of input file
        -A  <Account>     Account name.
        -cv <ver>         Comsol Version. Available: 6.2, 6.1, 5.4  Default: 6.1
        -so <sopt>        Additional slurm options if needed.
        -no               Only write job file.
        -h | --help       Print this message and exit.

 Example:  submatcom main.m -n 8 -m 10 -v 2022b -t 2-0

Using OnDemand web portal#

Sometimes you need to take a quick look at your project to make a change or have a graphical view of that and you are running out of time or even do not have an access on your personal pc at the moment. We have prepared an option for you to launch your software in graphical mode and watch your changes quickly.

Warning

We strongly recommend you, not to use this method all the way using Panthera. Having a graphical access to the cluster should be done just in case of emergency or special use cases.

Follow these instructions

  • Go to Interactive Apps > Desktop

Interactive Apps > Desktop


  • Fill out the form according to your needs:

form

  • Wait until your session is being ready and now press on Launch Desktop :


Desktop card info and adjustment

  • After a few seconds, A fresh desktop will be opened. Right click on desktop and press Open Terminal Here :


alt

  • In order to set all comsol environmet variables properly you have to run these two commands :


alt

  • Now load comsol module :


alt

  • Then type comsol and hit the enter:


alt

  • Finally the Comsol software will be appeared :


alt

Tip

for more information about using OnDemand portal please visit this page.