...
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" |
...