#!/bin/bash
#SBATCH --nodes=1 # 节点数量
#SBATCH --ntasks-per-node=56 # 每个节点核心数量
#SBATCH --ntasks=56 # 总核心数
#SBATCH --partition=g1_share # 队列分区且必须指定正确分区
#SBATCH --job-name=ansysedt # 作业名称
#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 #
##############################################
WORKDIR=`pwd`
# Environment variable required to enable SLURM custom integration
export PBS_JOBID="${SLURM_JOBID}"
# Create options file
OptFile="${WORKDIR}/Options.txt"
cat - <<EOF > $OptFile
\$begin 'Config'
'HFSS/SolveAdaptiveOnly'=0
'HFSS/HPCLicenseType'='pool'
'HFSS 3D Layout Design/HPCLicenseType'='pool'
'HFSS 3D Layout Design/MPIVendor'='Intel'
'HFSS/MPIVendor'='Intel'
\$end 'Config'
EOF
# skip Dependency check
export ANS_IGNOREOS=1
export ANS_NODEPCHECK=1
# Run analysis
ansysedt -ng -monitor -distributed -machinelist num=$SLURM_NTASKS -batchoptions ${WORKDIR}/Options.txt -batchsolve ${WORKDIR}/OAM_110_X.aedt