Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
New Installation
module load comsol/61
(uses matlab/2022b)
OR
module load comsol/56
(uses matlab/2021a)
OR:
module load comsol/55
(It was installed with matlab/2019b)

OLD Installation (old cluster)
========================
module load comsol/4.3
OR
module load comsol/4.3-withMatlab2011a

...

No Format
#!/bin/bash
#PBS -N ComsolJobTest
#PBS -m abe
#PBS -M YourEmail@griffith.edu.au
#PBS -l select=1:ncpus=1:mem=32gb,walltime=10:50:00
#PBS -q routeqworkq
module load  comsol/5561
echo "Starting job: "
cd  $PBS_O_WORKDIR
##comsol batch -inputfile Model1.mph -outputfile Model1_solved.mph
comsol batch -inputfile /sw/comsol/55/multiphysics/demo/builder/thermoelectric_leg.mph -outputfile thermoelectric_leg_solved.mph

...

No Format
module load comsol/4.3-withMatlab2011a
comsol 

Serial batch run

cd ~/data

cp /sw/comsol/4.3/models/COMSOL_Multiphysics/Quantum_Mechanics/conical_quantum_dot.mph .


No Format
module load comsol/4.3
comsol batch -inputfile model_in~/data/conical_quantum_dot.mph -outputfile modelconical_quantum_dot_out.mph

##model_in.mph is the name of your model. Change it to your model name. If output model name is not specified, results will be written to the model specified in input switch

...

No Format
#PBS -m abe
#PBS -M emailID@griffith.edu.au
#PBS -N TestRun_Comsol
#PBS -l select=1:ncpus=1:mem=7g,walltime=24:00:00
cd $PBS_O_WORKDIR
module load comsol/4.361
comsol batch -inputfile model_in~/data/conical_quantum_dot.mph -outputfile modelconical_quantum_dot_out.mph

Batch run- parallel

The parallel sections of Comsol are based on the parallel shared memory model. The solvers, assembly and meshing in Comol Multiphysics and the linear algebra functions in Comsol script benefit from parallelism


No Format
##!/bin/bash
#PBS -m abe
#PBS -M emailID@griffithYourEmail@griffith.edu.au
#PBS -N TestRun_ComsolParallelComsol
#PBS -l select=1:ncpus=4:mpiprocs=4:mem=7g,walltime=24:00:00
## The number of nodeschunks is given by the select =<NUM > above
NODESCHUNKS=1
###$PBS_NODEFILE is a node-list file created with select and mpiprocs options by PBS
###### The number of threads available is ncpus * NODESCHUNKS (=NPROCS)
NPROCS=4
cd $PBS_O_WORKDIR
module load comsol/4.361
export COMSOL_NUM_THREADS=$NPROCS
comsol batch -np $NPROCS -inputfile model_in~/data/conical_quantum_dot.mph -outputfile modelconical_quantum_dot_out.mph

Comsol in Matlab

As we use the command "comsol server" , it needs to record your username. So before you could run any batch jobs, you will have to do this once. From gowonda console, type

...

No Format
#!/bin/bash
#PBS -m abe
#PBS -M YourEmail@griffith.edu.au
#PBS -q mpi
#PBS -N TestRun_Comsol
#PBS -l select=1:ncpus=2:mpiprocs=12:mem=7g,walltime=4:00:00
## The number of nodes is given by the select =<NUM > above
NODESCHUNKS=1
###### The number of threads available is ncpus * NODESCHUNKS (=NPROCS)
NPROCS=12

module load comsol/4.3-withMatlab2011a61
cd $PBS_O_WORKDIR
comsol server  < /dev/null  > comsolserver1.log &
matlab -nodesktop -nosplash -r  "addpath /sw/comsol/comsol61/4.3multiphysics/mli/, mphstart, pseudoperiodicity_llmatlab, exit"

...

No Format
#!/bin/bash
#PBS -m abe
#PBS -M YourEmail@griffith.edu.au
#PBS -q mpiworkq
#PBS -N TestRun_ComsolTestRunComsol
#PBS -l select=1:ncpus=8:mem=7g,walltime=4:00:00
## The number of nodes is given by the select =<NUM > above
NODES=1
###### The number of threads available is ncpus * NODES (=NPROCS)
NPROCS=8

module load comsol/4.3-withMatlab2011a61
cd $PBS_O_WORKDIR
comsol server -np $NPROCS  < /dev/null  > comsolserver1.log &
matlab -nodesktop -nosplash -r  "addpath /sw/comsol/4.3/mli/, mphstart, myfile, exit"

...