Versions Compared

Key

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

...

Code Block
languagebash
titleSingle Node Simulation (/share/Apps/examples/comsol/comsol.slr)
collapsetrue
#!/bin/bash

#SBATCH -p lts 
#SBATCH --nodes=1 
#SBATCH --ntasks-per-node=10 
#SBATCH --time=60
#SBATCH -J comsol


cd ${SLURM_SUBMIT_DIR}

module load comsol

cp /share/Apps/comsol/comsol54/multiphysics/applications/COMSOL_Multiphysics/Fluid_Dynamics/cylinder_flow.mph .
comsol batch -np ${SLURM_NTASKS} -inputfile cylinder_flow.mph -outputfile cylinder_flow_output.mph -batchlog comsollog.txt



Code Block
languagebash
titleMulti Node Simulation (/share/Apps/examples/comsol/comsol-mpi.slr)
collapsetrue
#!/bin/bash

#SBATCH -p infolab
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=2
#SBATCH --time=60


cd ${SLURM_SUBMIT_DIR}

module purge
module load comsol
module load mpich

cp /share/Apps/comsol/comsol54/multiphysics/applications/COMSOL_Multiphysics/Fluid_Dynamics/cylinder_flow.mph .

# single node runs
#comsol  batch -np ${SLURM_NTASKS} -inputfile cylinder_flow.mph -outputfile cylinder_flow_output.mph  -batchlog comsollog.txt

# multi node runs
comsol -nn ${SLURM_NTASKS} --nnhost ${SLURM_NNODES} -mpi mpich2  -mpifabrics shm:ofa batch -inputfile cylinder_flow.mph -outputfile cylinder_flow_output.mph -batchlog comsollog.txt