如何为工作站设置 slurm.conf

时间:2021-02-20 13:51:37

标签: slurm

我的工作站使用 2 个 Xeon CPU,具有 24 核 48 线程。我在我的工作站上配置了 slurm.conf 如下:

*

# slurm.conf file generated by configurator easy.html.
# Put this file on all nodes of your cluster.
# See the slurm.conf man page for more information.
#
ControlMachine=XXX-Workstation
#ControlAddr=
#
#MailProg=/bin/mail
MpiDefault=none
#MpiParams=ports=#-#
ProctrackType=proctrack/pgid
ReturnToService=1
SlurmctldPidFile=/var/run/slurm-llnl/slurmctld.pid
#SlurmctldPort=6817
SlurmdPidFile=/var/run/slurm-llnl/slurmd.pid
#SlurmdPort=6818
SlurmdSpoolDir=/var/spool/slurmd
SlurmUser=slurm
#SlurmdUser=root
StateSaveLocation=/var/spool/slurm-llnl
SwitchType=switch/none
TaskPlugin=task/none
#
#
# TIMERS
#KillWait=30
#MinJobAge=300
#SlurmctldTimeout=120
#SlurmdTimeout=300
#
#
# SCHEDULING
FastSchedule=1
SchedulerType=sched/backfill
#SelectType=select/linear
#SelectTypeParameters=
SelectType=select/cons_res
SelectTypeParameters=CR_Core_Memory
#
#
# LOGGING AND ACCOUNTING
AccountingStorageType=accounting_storage/none
ClusterName=cluster
#JobAcctGatherFrequency=30
JobAcctGatherType=jobacct_gather/none
#SlurmctldDebug=3
#SlurmctldLogFile=
#SlurmdDebug=3
#SlurmdLogFile=
#
#
# COMPUTE NODES
NodeName=XXX-Workstation CPUs=48 RealMemory=32044 State=UNKNOWN
PartitionName=debug Nodes=XXX-Workstation Default=YES MaxTime=INFINITE State=UP
  1. 为了运行我的计算代码 (OpenMP),我使用了下面的批处理文件。但是,当我提交的作业脚本的数量为--cpus-per-task而不是20(例如:12、30或40)时,代码运行时间很慢???
#!/bin/bash
#
#SBATCH --job-name=testOMP # Job name
#SBATCH --nodes=1 # Run all processes on a single node
#SBATCH --ntasks=1 # Run a single task
#SBATCH --cpus-per-task=20 # Number of CPU cores per task
#SBATCH --hint=nomultithread # Get physical cores not logical
#SBATCH --exclusive # Job memory request (All available memory)
#SBATCH --time=20:00:00 # Time limit hrs:min:sec
#SBATCH --output=omp%j.out # Name of output file
#SBATCH --error=omp%j.out # Name of error file
# cleans out modules loaded by default
module purge
# load modules
module load intel
# echo of launcher commands
set -x
# number of OMP threads
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
# Binding
export OMP_PLACES=cores
./2D-TFlow2Wall-UPWIND-HKO
  1. 此外,工作站总共有 32Gb,但我无法指定要使用的内存量。该程序仅自动使用 2Gb。

你能不能就这些问题给我一个建议! 非常感谢!

0 个答案:

没有答案