[COMSOL][a] is a powerful environment for modelling and solving various engineering and scientific problems based on partial differential equations. COMSOL is designed to solve coupled or multiphysics phenomena. For many standard engineering problems, COMSOL provides add-on products (modules) such as electrical, mechanical, fluid flow, and chemical applications.
[COMSOL][a] is a powerful environment for modelling and solving various engineering
and scientific problems based on partial differential equations.
COMSOL is designed to solve coupled or multiphysics phenomena.
For many standard engineering problems, COMSOL provides add-on products (modules)
such as electrical, mechanical, fluid flow, and chemical applications.
*[Structural Mechanics Module][b],
*[Structural Mechanics Module][b],
*[Heat Transfer Module][c],
*[Heat Transfer Module][c],
...
@@ -34,7 +38,8 @@ To prepare COMSOL jobs in the interactive mode, we recommend using COMSOL on the
...
@@ -34,7 +38,8 @@ To prepare COMSOL jobs in the interactive mode, we recommend using COMSOL on the
Example for Karolina:
Example for Karolina:
```console
```console
$salloc -A PROJECT_ID -p qexp --nodes=1 --ntasks=128 --cpus-per-task=1 --x11
@@ -59,43 +64,57 @@ you need to run COMSOL with additional parameters:
...
@@ -59,43 +64,57 @@ you need to run COMSOL with additional parameters:
$comsol -3drend sw
$comsol -3drend sw
```
```
To run COMSOL in batch mode without the COMSOL Desktop GUI environment, utilize the following (`comsol.pbs`) job script and execute it via the `salloc` command:
To run COMSOL in batch mode without the COMSOL Desktop GUI environment,
utilize the following (`comsol.slurm`) job script and execute it via the `salloc` command:
A working directory has to be created before sending the (comsol.pbs) job script into the queue. The input file (name_input_f.mph) has to be in the working directory or a full path to the input file has to be specified. The appropriate path to the temp directory of the job has to be set by the `-tmpdir` command option.
A working directory has to be created before sending the (`comsol.slurm`) job script into the queue.
The input file (name_input_f.mph) has to be in the working directory
or a full path to the input file has to be specified.
The appropriate path to the temp directory of the job has to be set by the `-tmpdir` command option.
### Starting a COMSOL Server
### Starting a COMSOL Server
Starting a COMSOL server on a compute node and then connecting to it through a COMSOL Desktop GUI environment is a convenient way of running calculations from GUI. To do so, you first need to submit a job with which you'll start the COMSOL server, for example:
Starting a COMSOL server on a compute node and then connecting to it
through a COMSOL Desktop GUI environment is a convenient way of running calculations from GUI.
To do so, you first need to submit a job with which you'll start the COMSOL server, for example:
!!! Note
!!! Note
You may be prompted to provide username and password. These can be different from your IT4Innovations credentials, and will be used during the authentication when trying to connect to the server from GUI.
You may be prompted to provide username and password. These can be different from your IT4Innovations credentials, and will be used during the authentication when trying to connect to the server from GUI.
@@ -115,42 +134,51 @@ COMSOL is a software package for the numerical solution of partial differential
...
@@ -115,42 +134,51 @@ COMSOL is a software package for the numerical solution of partial differential
LiveLink for MATLAB is available in both **EDU** and **COM****variant** of the COMSOL release. On the clusters there is 1 commercial (**COM**) and 5 educational (**EDU**) licenses of LiveLink for MATLAB (see the [ISV Licenses][3]). The following example shows how to start COMSOL model from MATLAB via LiveLink in the interactive mode.
LiveLink for MATLAB is available in both **EDU** and **COM****variant** of the COMSOL release. On the clusters there is 1 commercial (**COM**) and 5 educational (**EDU**) licenses of LiveLink for MATLAB (see the [ISV Licenses][3]). The following example shows how to start COMSOL model from MATLAB via LiveLink in the interactive mode.
```console
```console
salloc -A PROJECT_ID -p qcpu_exp --nodes=1 --ntasks=128 --cpus-per-task=1 --x11
On the first start of the LiveLink for MATLAB (client-MATLAB/server-COMSOL connection), the login and password is requested; this information is not requested again.
On the first start of the LiveLink for MATLAB (client-MATLAB/server-COMSOL connection), the login and password is requested; this information is not requested again.
To run LiveLink for MATLAB in batch mode with (comsol_matlab.pbs) job script, you can utilize/modify the following script and execute it via the `salloc` command.
To run LiveLink for MATLAB in batch mode with (`comsol_matlab.slurm`) job script,
you can utilize/modify the following script and execute it via the `sbatch` command.
This example shows how to run LiveLink for MATLAB with the following configuration: 3 nodes and 128 cores per node. A working directory has to be created before submitting (comsol_matlab.pbs) job script into the queue. The input file (test_job.m) has to be in the working directory or a full path to the input file has to be specified. The MATLAB command option (`-r ”mphstart”`) created a connection with a COMSOL server using the default port number.
This example shows how to run LiveLink for MATLAB with the following configuration:
3 nodes and 128 cores per node. A working directory has to be created
before submitting (`comsol_matlab.slurm`) job script into the queue.
The input file (`test_job.m`) has to be in the working directory
or a full path to the input file has to be specified.
The MATLAB command option (`-r ”mphstart”`) created a connection with a COMSOL server using the default port number.