Body
When to Use?
Simcenter STAR-CCM+ is a multiphysics CFD software that enables CFD engineers to model the complexity and explore the possibilities of products operating under real-world conditions. These are instructions on how to run STAR-CCM+ on clipper.
Procedure
1. To run STAR-CCM+ in batch mode, first, you need to build your simulation <your_simulation.sim>
and put it in your project directory
cd mnt/projects/<your_project>
mkdir sim_dir #can modify name
ls mnt/projects/<your_project>/sim_dir
your_simulation.sim #you will have to upload this file to the created directory
2. Then you need to create a Slurm script <your_scriptfile.sh>
as shown below to submit the job:
#!/bin/bash -l
#SBATCH --time=2:00:00 # walltime limit of 2 hours
#SBATCH --nodes=2 # number of nodes
#SBATCH --ntasks-per-node=50 # number of tasks per node
#SBATCH --ntasks=2 # total number of tasks
#SBATCH --job-name=your_simulation # name of job
#SBATCH --partition=cpu #partition
module load starccm # load starccm module
rm -rf mnt/projects/<your_project>/sim_dir/simulation.log # remove the log file from last run
# Run Job
echo "------ Running Starccm+ ------"
starccm+ -np $SLURM_NTASKS -batch /projects/<your_project>/sim_dir/your_simulation.sim >> simulation.log
echo "------ End of the job ------"
3. By default, STAR-CCM+ uses OpenMPI. However, STAR-CCM+ comes with its own Intel MPI. To use the Intel MPI, the Slurm script should be modified to be:
#!/bin/bash -l
#SBATCH --time=2:00:00 # walltime limit of 2 hours
#SBATCH --nodes=2 # number of nodes
#SBATCH --ntasks-per-node=50 # number of tasks per node
#SBATCH --ntasks=72 # total number of tasks
#SBATCH --job-name=your_simulation # name of job
#SBATCH --partition=cpu # name of partition
module load starccm # load starccm module
rm -rf /projects/<your_project>/sim_dir/simulation.log # remove the log file from last run
# Run Job
echo "------ Running Starccm+ ------"
starccm+ -mpi intel -np $SLURM_NTASKS -batch /projects/<your_project>/sim_dir/your_simulation.sim >> simulation.log
echo "------ End of the job ------"
4. To run the job, submit the batch script with the following command:
sbatch <your_scriptfile.sh>
5. After the job has been submitted, you should get an output similar to the one below but with a different job id.
Submitted batch job 25088