StarCCM+

Simcenter STAR-CCM +是由Siemens Digital Industries Software开发的基于计算流体动力学的商业仿真软件。Simcenter STAR-CCM +允许对一系列工程问题进行建模和分析,这些问题涉及流体流动,热传递,应力,颗粒流动,电磁学和相关现象。
请自行购买StarCCM+ license许可,下载和安装。如需协助安装或使用,请联系我们,附上课题组拥有StarCCM+ license的证明。

一、脚本模板

#!/bin/bash
#SBATCH --nodes=1                   # 节点数量
#SBATCH --ntasks-per-node=56        # 每个节点核心数量
#SBATCH --ntasks=56                 # 总核心数
#SBATCH --partition=g1_share        # 队列分区且必须指定正确分区
#SBATCH --job-name=hello            # 作业名称
#SBATCH --output=hello_%j.out       # 正常日志输出 (%j 参数值为 jobId)
#SBATCH --error=hello_%j.err        # 错误日志输出 (%j 参数值为 jobId)

##############################################
#          Software Envrironment             #
##############################################
unset I_MPI_PMI_LIBRARY                        # 取消默认mpi库,使用intel自带
export I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=0   # intel 多节点作业所需修改参数 
module load intel/2022 intelmpi/2022           # intel 环境加载

##############################################
#               Run job                      #
##############################################
ulimit -s unlimited
ulimit -l unlimited

cat /dev/null > machinefile
scontrol show hostname $SLURM_JOB_NODELIST > machinefile
jobname=`ls | grep sim | sed 's/.\{3\}.$//'`   # 自动识别目录下的单sim文件进行提交,如果有多个文件需指定,请修改下行jobname参数

starccm+ -power -mpi intel -machinefile './machinefile' -np $SLURM_NTASKS -rsh ssh -cpubind -batch run -batch-report $jobname

二、命令行各个参数的含义如下:

  • -power:使用PowerSession模式运行starccm+
  • -mpi intel:使用Intel MPI库
  • -machinefile './machinefile':指定包含节点列表的机器文件的路径
  • -np $SLURM_NTASKS:指定使用的进程数,其中$SLURM_NTASKS是Slurm作业中可用的进程数
  • -rsh ssh:使用ssh协议进行远程shell访问
  • -cpubind:将进程绑定到CPU上以提高性能
  • -batch run:以批处理模式运行starccm+
  • -batch-report $jobname:指定批处理报告的名称,其中$jobname是Slurm作业的名称

运行问题

# 并行时输出文件卡在此内容,且节点一直在空跑
Starting STAR-CCM+ parallel server 
# 解决方法 命令行去掉 -mpi intel 参数
# 运行时未找到许可文件
License build date: 31 March 2022
This version of the code requires license version 2023.02 or greater.
Licensing problem: Unable to find a path to any license file or license server.  Please create the CDLMD_LICENSE_FILE environment variable and point it to the license server.
# 解决方法 export CDLMD_LICENSE_FILE=许可文件路径
作者:admin  创建时间:2023-03-16 10:03
最后编辑:admin  更新时间:2024-09-05 11:17