#!/bin/bash
#SBATCH --nodes=1 # 节点数量
#SBATCH --ntasks-per-node=28 # 每个节点核心数量
#SBATCH --ntasks=28 # 总核心数
#SBATCH --partition=g1_share # 队列分区且必须指定正确分区
#SBATCH --job-name=simpack # 作业名称
#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 #
##############################################
input=(`ls | grep -i spck`)
echo "This is job #${SLURM_ARRAY_JOB_ID}, with parameter ${input[$SLURM_ARRAY_TASK_ID]}"
echo "There are ${SLURM_ARRAY_TASK_COUNT} task(s) in the array."
echo " Max index is ${SLURM_ARRAY_TASK_MAX}"
echo " Min index is ${SLURM_ARRAY_TASK_MIN}"
simpack-slv -j 28 --integration ${input[$SLURM_ARRAY_TASK_ID]}
sleep 5