Skip to content
Snippets Groups Projects
Commit 1e3719b0 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

Update comsol-multiphysics.md

parent 3a884265
No related branches found
No related tags found
1 merge request!338software
Pipeline #22258 failed
...@@ -20,7 +20,7 @@ On the clusters, COMSOL is available in the latest stable version. There are two ...@@ -20,7 +20,7 @@ On the clusters, COMSOL is available in the latest stable version. There are two
* **Commercial** or so called **COM variant**, which can used also for commercial activities. **COM variant** has only subset of features compared to the **EDU variant** available. More about licensing [here][1]. * **Commercial** or so called **COM variant**, which can used also for commercial activities. **COM variant** has only subset of features compared to the **EDU variant** available. More about licensing [here][1].
To load the `COMSOL` module, use: To load the default `COMSOL` module ([**not** recommended][4]), use:
```console ```console
$ ml COMSOL $ ml COMSOL
...@@ -40,7 +40,7 @@ To prepare COMSOL jobs in the interactive mode, we recommend using COMSOL on the ...@@ -40,7 +40,7 @@ To prepare COMSOL jobs in the interactive mode, we recommend using COMSOL on the
Example for Barbora: Example for Barbora:
```console ```console
$ qsub -I -X -A PROJECT_ID -q qprod -l select=1:ncpus=36 $ qsub -I -X -A PROJECT_ID -q qprod -l select=1:ncpus=36:mpiprocs=36
$ ml av COMSOL $ ml av COMSOL
------------------------------ /apps/modules/phys ------------------------------ ------------------------------ /apps/modules/phys ------------------------------
...@@ -50,32 +50,31 @@ $ ml COMSOL/5.2.0-EDU ...@@ -50,32 +50,31 @@ $ ml COMSOL/5.2.0-EDU
$ comsol -3drend sw $ comsol -3drend sw
``` ```
!!! info * If you receive errors at startup, for example, of the following type:
If you receive errors at startup, for example, of the following type:
```console ```console
FL3D: error at line 814 in file fl3dglcontext_x11common.c: FL3D: error at line 814 in file fl3dglcontext_x11common.c:
PBuffers are not supported by the system. PBuffers are not supported by the system.
FL3D: error at line 235 in file fl3dglcontext_x11common.c: FL3D: error at line 235 in file fl3dglcontext_x11common.c:
assert: x11Handle assert: x11Handle
``` ```
you need to run COMSOL with additional parameters: you need to run COMSOL with additional parameters:
```console ```console
$ comsol -3drend sw $ comsol -3drend sw
``` ```
To run COMSOL in batch mode without the COMSOL Desktop GUI environment, utilize the default (comsol.pbs) job script and execute it via the `qsub` command: To run COMSOL in batch mode without the COMSOL Desktop GUI environment, utilize the default (comsol.pbs) job script and execute it via the `qsub` command:
```bash ```bash
#!/bin/bash #!/bin/bash
#PBS -l select=3:ppn=24 #PBS -l select=3:ncpus=36:mpiprocs=36
#PBS -q qprod #PBS -q qprod
#PBS -N JOB_NAME #PBS -N JOB_NAME
#PBS -A PROJECT_ID #PBS -A PROJECT_ID
cd /scratch/work/user/$USER/ || exit cd /scratch/project/PROJECT_ID/ || exit
echo Time is `date` echo Time is `date`
echo Directory is `pwd` echo Directory is `pwd`
...@@ -85,12 +84,11 @@ echo '**PBS_NODEFILE***END*********' ...@@ -85,12 +84,11 @@ echo '**PBS_NODEFILE***END*********'
text_nodes < cat $PBS_NODEFILE text_nodes < cat $PBS_NODEFILE
ml COMSOL ml COMSOL/5.2.0-EDU
# ml COMSOL/51-EDU
ntask=$(wc -l $PBS_NODEFILE) ntask=$(wc -l $PBS_NODEFILE)
comsol -nn ${ntask} batch -configuration /tmp –mpiarg –rmk –mpiarg pbs -tmpdir /scratch/.../$USER/ -inputfile name_input_f.mph -outputfile name_output_f.mph -batchlog name_log_f.log comsol -3drend sw -nn ${ntask} batch -configuration /tmp –mpiarg –rmk –mpiarg pbs -tmpdir /scratch/project/PROJECT_ID/ -inputfile name_input_f.mph -outputfile name_output_f.mph -batchlog name_log_f.log
``` ```
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.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.
...@@ -102,11 +100,9 @@ COMSOL is a software package for the numerical solution of partial differential ...@@ -102,11 +100,9 @@ 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
$ xhost + $ qsub -I -X -A PROJECT_ID -q qexp -l select=1:ncpus=36:mpiprocs=36
$ qsub -I -X -A PROJECT_ID -q qexp -l select=1:ppn=24 $ ml MATLAB/R2015b COMSOL/5.2.0-EDU
$ ml MATLAB $ comsol -3drend sw server MATLAB
$ ml COMSOL
$ comsol server MATLAB
``` ```
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.
...@@ -115,12 +111,12 @@ To run LiveLink for MATLAB in batch mode with (comsol_matlab.pbs) job script, yo ...@@ -115,12 +111,12 @@ To run LiveLink for MATLAB in batch mode with (comsol_matlab.pbs) job script, yo
```bash ```bash
#!/bin/bash #!/bin/bash
#PBS -l select=3:ppn=24 #PBS -l select=3:ncpus=36:mpiprocs=36
#PBS -q qprod #PBS -q qprod
#PBS -N JOB_NAME #PBS -N JOB_NAME
#PBS -A PROJECT_ID #PBS -A PROJECT_ID
cd /scratch/work/user/$USER || exit cd /scratch/project/PROJECT_ID || exit
echo Time is `date` echo Time is `date`
echo Directory is `pwd` echo Directory is `pwd`
...@@ -130,21 +126,21 @@ echo '**PBS_NODEFILE***END*********' ...@@ -130,21 +126,21 @@ echo '**PBS_NODEFILE***END*********'
text_nodes < cat $PBS_NODEFILE text_nodes < cat $PBS_NODEFILE
ml MATLAB ml MATLAB/R2015b COMSOL/5.2.0-EDU
ml COMSOL/51-EDU
ntask=$(wc -l $PBS_NODEFILE) ntask=$(wc -l $PBS_NODEFILE)
comsol -nn ${ntask} server -configuration /tmp -mpiarg -rmk -mpiarg pbs -tmpdir /scratch/work/user/$USER/work & comsol -3drend sw -nn ${ntask} server -configuration /tmp -mpiarg -rmk -mpiarg pbs -tmpdir /scratch/project/PROJECT_ID &
cd /apps/cae/COMSOL/51/mli cd $EBROOTCOMSOL/mli
matlab -nodesktop -nosplash -r "mphstart; addpath /scratch/work/user/$USER/work; test_job" matlab -nodesktop -nosplash -r "mphstart; addpath /scratch/project/PROJECT_ID; test_job"
``` ```
This example shows how to run LiveLink for MATLAB with the following configuration: 3 nodes and 16 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 36 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.
[1]: licensing-and-available-versions.md [1]: licensing-and-available-versions.md
[2]: ../../../general/accessing-the-clusters/graphical-user-interface/x-window-system.md [2]: ../../../general/accessing-the-clusters/graphical-user-interface/x-window-system.md
[3]: ../../isv_licenses.md [3]: ../../isv_licenses.md
[4]: ../modules/lmod/
[a]: http://www.comsol.com [a]: http://www.comsol.com
[b]: http://www.comsol.com/structural-mechanics-module [b]: http://www.comsol.com/structural-mechanics-module
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment