linux源码安装slurm以及mung和openssl

一、源码安装munge

1、编译安装munge

(1)下载munge地址:https://github.com/dun/munge/releases

(2)解压编译安装:

1

2

3

4

5

6

7

8

创建/data目录

复制文件munge-0.5.15.tar.xz 到/data目录下

tar -Jxvf munge-0.5.15.tar.xz

进入源文件目录

cd /data/munge-0.5.15

./bootstrap

./configure --prefix=/usr/local/munge \

--sysconfdir=/usr/local/munge/etc \

--localstatedir=/usr/local/munge/local \

--with-runstatedir=/usr/local/munge/run \

--libdir=/usr/local/munge/lib64

make && make install

2、创建用户并修改权限

1

2

3

4

5

6

7

8

9

useradd -s /sbin/nologin -u 1001 munge

chown -R munge.munge /usr/local/munge/

sudo -u munge mkdir -p /usr/local/munge/run/munge

chmod 700 /usr/local/munge/etc/

chmod 711 /usr/local/munge/local/

chmod 755 /usr/local/munge/run

chmod 711 /usr/local/munge/lib

3、配置文件及服务

(1)创建munge.key文件

执行以下命令完成以后,在/usr/local/munge/etc/munge/下面会生成munge.key,需修改munge.key的权限

1

2

sudo -u munge /usr/local/munge/sbin/mungekey --verbose

chmod 600 /usr/local/munge/etc/munge/munge.key


【注意】:如果有多台服务器,需将服务端的munge.key发给客户端,客户端无需自己生成

(2)生成链接文件并启动服务

1

2

3

4

5

ln -s /usr/local/munge/lib/systemd/system/munge.service /usr/lib/systemd/system/munge.service

(cp /usr/local/munge/lib/systemd/system/munge.service /usr/lib/systemd/system/)

systemctl daemon-reload

systemctl start munge

systemctl status munge

注:若是service服务

1

2

3

4

创建脚本链接(或者直接拷贝文件),通过'service munge start'启动服务,如下图:

ln -fs /usr/local/munge/etc/rc.d/init.d/munge /etc/init.d/munge

创建命令链接(或者直接拷贝文件),通过'munged'启动服务,如下图:

ln -fs /usr/local/munge/sbin/munged /usr/sbin/munged

4、安装中会出现的问题

(1)configure报错
 


【解决方式】:apt -y install openssl-devel   openssl
这里采用符合GPL许可的Open SSL加密库,如果是源码编译的此库环境,编译时需要通过--with-crypto-lib选择指定
或者源码安装openssl后--with-openssl-prefix=/usr/local/openssl
(2)文件权限和所有者有问题
 


/usr/local的文件权限和所有者有问题
 


【解决方式】:修改/usr/local的文件权限和所有者

1

2

chown -R root.root /usr/local

chmod -R 755 /usr/local

 二、源码安装slurm

1

apt-get install make hwloc libhwloc-dev libmunge-dev libmunge2 munge mariadb-server libmysalclient-dey -y

1、下载并安装

(1)下载地址:Download Slurm - SchedMD

1

2

3

tar -jxvf slurm-22.05.8.tar.bz2

// find . -name "config.guess"   cp /usr/share/misc/config.* auxdir/

// cp /usr/share/libtool/build-aux/config.* .

(2)编译安装

1

2

3

4

5

6

./configure --prefix=/usr/local/slurm \

--with-munge=/usr/local/munge \

sysconfdir=/usr/local/slurm/etc \

--localstatedir=/usr/local/slurm/local \

--runstatedir=/usr/local/slurm/run \

--libdir=/usr/local/slurm/lib64

查看vim config.log文件是否有错误
 


 


如果下面显示no,则需要重新./configure并指定,--with-mysql_config=/usr/bin

1

make -j && make install

2、配置数据库

mysql -u root -p 登录到数据库进行下面操作

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

// 生成slurm用户,以便该用户操作slurm_acct_db数据库,其密码是123456

create user 'slurm'@'localhost' identified by '123456';

// 生成账户数据库slurm_acct_db

create database slurm_acct_db;

// 赋予slurm从本机localhost采用密码123456登录具备操作slurm_acct_db数据下所有表的全部权限

grant all on slurm_acct_db.* TO 'slurm'@'localhost' identified by '123456' with grant option;

// 赋予slurm从system0采用密码123456登录具备操作slurm_acct_db数据下所有表的全部权限

grant all on slurm_acct_db.* TO 'slurm'@'system0' identified by '123456' with grant option;

// 生成作业信息数据库slurm_jobcomp_db

create database slurm_jobcomp_db;

// 赋予slurm从本机localhost采用密码123456登录具备操作slurm_jobcomp_db数据下所有表的全部权限

// GRANT ALL PRIVILEGES ON slurm_jobcomp_db.* TO 'slurm'@'localhost';

grant all on slurm_jobcomp_db.* TO 'slurm'@'localhost' identified by '123456' with grant option;

// 赋予slurm从system0采用密码123456登录具备操作slurm_jobcomp_db数据下所有表的全部权限

grant all on slurm_jobcomp_db.* TO 'slurm'@'system0' identified by '123456' with grant option;

3、配置slurm文件及服务

(1)编辑配置文件(示例配置文件在源码包中的etc下)

1

2

3

4

5

6

cp slurm.conf.example /usr/local/slurm/etc/slurm.conf

cp slurmdbd.conf.example /usr/local/slurm/etc/ slurmdbd.conf

cp cgroup.conf.example /usr/local/slurm/etc/cgroup.conf

chmod 600 slurmdbd.conf

cd /usr/local/slurm   

mkdir run slurm log

【注意】:客户端只需要把服务端修改好的slurm.conf发过去即可,具体配置内容可在文末参考

(2)配置环境变量

1

2

3

vim /etc/profile.d/slurm.sh

export PATH=$PATH:/usr/local/slurm/bin:/usr/local/slurm/sbin

export LD_LIBRARY_PATH=/usr/local/slurm/lib64:$LD_LIBRARY_PATH

(3)启动服务(服务启动文件在源码包中的etc下)

1

2

3

4

5

// cp etc/slurmctld.service etc/slurmdbd.service etc/slurmd.service /etc/systemd/system/

cp etc/slurmctld.service etc/slurmdbd.service etc/slurmd.service /usr/lib/systemd/system/

systemctl daemon-reload    // 重新加载systemd守护进程配置文件

systemctl start slurmctld slurmd slurmdbd   // 开启服务

systemctl enable slurmctld slurmd slurmdbd  // 开机自启动

【注意】:客户端只需要slurmd
正常情况下显示绿色的active状态;如果失败,则用下面命令查看错误日志

1

slurmctld -Dvvvvv    slurmdbd -Dvvvvv    slurmd -Dvvvvv

启动后如果节点状态是down,可用下面命令启动节点:

1

scontrol update nodename=sw01 state=idle

4、slurm排错

重启slurmctld服务

1

2

3

4

systemctl restart slurmctld

scp -r /usr/local/slurm test10:/usr/local/

scp /etc/profile.d/slurm.sh test10:/etc/profile.d/

scp /etc/systemd/system/slurmd.service test10:/etc/systemd/system/

 (1)错误:mysql_real_connect failed: 2003 Can't connect to MySQL server on 'Intel:3306' (111)
 


 数据库连接失败
查看3306端口是否开放远程连接
 


 没有开放3306端口
修改vim /etc/my.cnf,添加port=3306,然后重启mysql;
(2)slurm_load_partitions: Zero Bytes were transmitted or received
客户端sinfo查看时出现x上面错误,一般是时间不一致,可用date查看时间日期。
解决:节点时间未同步,安装NTP后,启动ntpd服务即可。

三、openssl源码安装

1、下载安装openssl

(1)查看openssl版本

1

openssl version

(2)下载相应版本openssl

下载地址:Old Releases | Library

1

2

3

4

tar -zxvf openssl-1.1.1s.tar.gz

./config --prefix=/usr/local/openssl

./config -t

make & make install

2、测试验证

1

/usr/local/openssl/bin/openssl version

如果正确显示版本号,则安装成功。某些版本的操作系统会报下列错误
openssl: symbol lookup error: openssl: undefined symbol: EVP_mdc2, version OPENSSL_1_1_0

1

2

3

4

// 此时需要配置下系统库:

// echo “/usr/local/openssl/lib” >> /etc/ld.so.conf.d/libc.conf && ldconfig

// 最后将/usr/local/openssl/bin/openssl添加到系统路径

// ln -s /usr/local/openssl/bin/openssl /bin/openssl

3、切换openssl版本

1

2

3

4

5

6

7

8

9

10

11

12

13

// mv /usr/bin/openssl /usr/bin/openssl.bak

// mv /usr/include/openssl /usr/include/openssl.bak

// ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

// ln -s /usr/local/openssl/include/openssl /usr/include/openssl

// echo "/usr/local/openssl/lib" >> /etc/ld.so.conf  ldconfig -v

// ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1

// ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1

// 【注意】:不能直接删除软链接

// 如需使用新版本开发,则需替换原来的软链接指向,即替换原动态库,进行版本升级。

// 替换/lib(lib64)和/usr/lib(lib64)和/usr/local/lib(lib64)存在的相应动态库:

// ln -sf /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so

// ln -sf /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so

4、解决openssl报错

源码安装完OpenSSL后,打开一个新的窗口执行openssl version命令报错(一定要新开窗口执行openssl version)
(i)error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
(ii)error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
 


 (1)方法一:
链接或拷贝/lib(lib64)和/usr/lib(lib64)和/usr/local/lib(lib64)存在的相应动态库

1

2

ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1

ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1

(2)方法二:
不指定安装目录,一般so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所需要的.so文件
 


所以,在/etc/ld.so.conf中加入/usr/local/lib这一行,保存之后,再运行:/sbin/ldconfig -v更新一下配置即可。

1

2

/sbin/ldconfig -v

ldconfig

其作用是将文件/etc/ld.so.conf列出的路径下的库文件缓存到/etc/ld.so.cache以供使用,因此当安装完一些库文件,或者修改/etc/ld.so.conf增加了库的新搜索路径,需要运行一下ldconfig,使所有的库文件都被缓存到文件/etc/ld.so.cache中,如果没做,可能会找不到刚安装的库。

四、连网yum安装munge

1、配置并安装munge

(1)添加munge用户

1

2

groupadd -g 972 munge

useradd -g 972 -u 972 munge

(2)安装munge

1

apt-get install munge -y

(3)执行以下命令,创建munge.key文件:

1

create-munge-key

2、修改文件权限

执行完以后,在/etc/munge/下面会生成munge.key,需修改munge.key的权限以及所属用户,把所属用户改成munge(/etc和/usr应为root权限)

1

2

chown -R munge: /etc/munge/ /var/log/munge/ /var/lib/munge/ /var/run/munge/

chmod 400 /etc/munge/munge.key

1

2

ps -ef | grep munge

kill -9 16730

五、Slurm常用命令以及基本用法

1、查看可用资源sinfo

idle

节点空闲,可接受作业

alloacted

该节点已经分配作业且所有核心用满,在作业释放前不能再被分配作业

mix

使用部分核心,仍可以被分配作业

drain

对应节点已经下线

drng

节点已下线但仍有作业在运行

2、slurm提交作业命令

(1)交互式作业srun

        srun命令属于交互式提交作业,有屏幕输出,但容易受网络波动影响,断网或关闭窗口会导致作业中断。

1

srun -n 4 hostname

1

2

3

4

5

6

7

8

9

10

-N 2 指定使用2个节点;

-n 12 指定运行的任务数为12, 默认情况下一个CPU核一个任务

-p debug 指定提交作业到debug队列;

-w x86[13-16] 指定使用节点x86[13-16];

-x  x86[11-12] 排除x8611、x8612节点;

-o out.log  指定标准输出到out.log文件;

-e err.log  指定重定向错误输出到err.log文件;

-J JOBNAME  指定作业名为JOBNAME;

-t 20 指定作业运行时间限制为20分钟;

--gres=gpu:2 为作业分配2块GPU显卡资源(最大值为8);

(2)批处理作业脚本sbatch

        sbatch一般情况下与srun一起提交作业到后台运行,需要将srun写到脚本中,再用sbatch 提交脚本。这种方式不受本地网络波动影响,提交作业后可以关闭本地电脑。sbatch命令没有屏幕输出,默认输出日志为提交目录下的slurm-xxx.out文件,可以使用tail -f slurm-xxx.out实时查看日志,其中xxx为作业号。
<i、一个简单的Slurm脚本(job_run.sh)如下:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

#!/bin/bash

#SBATCH -J xujb         #指定作业名

#SBATCH -p q_x86        #指定队列

#SBATCH -N 2            #请求节点总数

#SBATCH -n 24           #请求进程总数

#SBATCH -w x86b,x86c    #指定运行作业的节点

#SBATCH -x x86a         #指定不使用x86a运行作业

#SBATCH -o slurm-%j.out #标准输出文件

#SBATCH -e slurm-%j.log #错误输出文件

# 设置运行环境

#module load mpich/4.1.1

export PATH=/usr/local/mpich-4.1.1/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/mpich-4.1.1/lib:$LD_LIBRARY_PATH

echo ${SLURM_JOB_NODELIST} #作业占用节点列表

echo start on $(date)      #开始时间

# 输入要执行的命令

srun ../funs9/main

#mpirun -n ${SLURM_NTASKS} ../funs9/main

echo end on $(date)        #结束时间

<ii、sbatch提交作业

1

sbatch -n 2 ./job.sh

3、查看作业状态squeue

1

2

3

4

5

6

7

# 参数示例

squeue l:以长列表显示更多信息。

squeue -u username:仅显示属于用户username的任务。

squeue -t state:仅显示处于state状态的任务。

squeue -n job name:仅显示名称为job name的作业。

squeue -p partition:仅显示partition分区的任务。

squeue -jobs job id:仅显示作业id为job id的作业。

4、删除作业scancel

1

scancel 17

1

2

3

4

5

# 参数示例

scancel jobid:删除jobid的作业。

scancel -u username:删除username的全部作业。

scancel -s state:删除处于state状态的作业。

scancel -p partition:仅显示partition分区的任务

5、查看任务信息scontrol

1

2

3

4

# 参数示例

scontrol show partition partition_name:详细显示partition name分区的信息。

scontrol show node node_name:详细显示node name节点信息。

scontrol show job job_id:详细显示job id作业的信息。 

(1)scontrol对节点进行控制
scontrol命令可以管理Slurm集群中的节点,例如关机、重启和修改属性等操作。例如,要关闭节点x86b,可以使用以下命令:

1

scontrol update NodeName=x86b State=DOWN

(2)scontrol修改队列属性
scontrol命令可以管理Slurm队列,例如修改队列的最大CPU数、最大内存大小等属性。例如,要将q_x86队列最大CPU数更改为48,可以使用以下命令:

1

scontrol update PartitionName=q_x86 MaxCPUs=48

6、查询包括已完成作业信息sacct

输出内容会包括,作业号,作业名,分区,计费账户,申请的CPU数量,状态,结束代码

1

2

3

4

5

6

7

8

9

10

11

12

# 参数示例

-b,--brief:显示简要信息,主要包含: 作业号jobid、状态status和退出码exitcode。

-c,--completion:显示作业完成信息而非记账信息。

-e,--helpformat:显示当采用 --format指定格式化输出的可用格式。

-E end_time,--endtime-end time:显示在end time时间之前(不限作业状态)的作业。

-i,--nnodes=N:显示在特定节点数上运行的作业。

-j job(step),--jobs=job(.step):限制特定作业号(步)的信息,作业号(步)可以以,分隔.

-l,--long:显示详细信息。

-N node list,--nodelist-node list:显示运行在特定节点的作业记账信息。

-R reason list,-reason=reason list:显示由于XX原因没有被调度的作业记账信息。

-s state_list,-state-state list:显示state list(以,分隔)状态的作业记账信息。

-S,--starttime:显示特定时间之后开始运行的作业记账信息,有效时间格式参见

7、调度配置信息sacctmgr

主要负责管理账号,用户,集群分区等资源

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

# 管理账户

sacctmgr show account   # 直询账户信息

sacctmgr add account new_account  # 添加账户信息

sacctmgr modify account new_account set Parent=slurmtest01  # 修改账户信息

sacctmgr delete account new_account   # 删除账户信息

#管理QOS

sacctmgr show qos   # 查询QOS

sacctmgr add qos new_qos   # 添加QOS

sacctmgr modify qos new_gos set MaxJobsPerUser=4  # 修改QOS,如用户使用核心数,作业数

sacctmgr delete qos new_qos   # 删除QOS

#用户管理

sacctmgr show user (withassoc)   # 查询用户

sacctmgr add user testslurm   # 添加用户

sacctmgr -i add user test1 account=test  # 增加test1用户属于test账户

sacctmgr update user testslurm set QOS=new_qos  # 修改用户信息

sacctmgr delete user testslurm   # 删除用户信

六、slurm配置文件

(1)slurm.conf配置文件

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

########################################################

#  Configuration file for Slurm - 2021-08-20T10:27:23  #

########################################################

#

#

#

################################################

#                   CONTROL                    #

################################################

ClusterName=Sunway  # 集群名

SlurmUser=root      # 主节点管理账号

SlurmctldHost=sw01  # 主节点名

#SlurmctldHost=psn2  #备控制器的主机名

SlurmctldPort=6817

SlurmdPort=6818

SlurmdUser=root

#

################################################

#            LOGGING & OTHER PATHS             #

################################################

SlurmctldLogFile=/usr/local/slurm/log/slurmctld.log  # 主节点log文件

SlurmdLogFile=/usr/local/slurm/log/slurmd.log        # 子节点log文件

SlurmdPidFile=/usr/local/slurm/run/slurmd.pid # 子节点进程文件

SlurmdSpoolDir=/usr/local/slurm/slurm/d       # 子节点状态文件夹

#SlurmSchedLogFile=

SlurmctldPidFile=/usr/local/slurm/run/slurmctld.pid  # 主服务进程文件

StateSaveLocation=/usr/local/slurm/slurm/state       # 主节点状态文件夹

#

################################################

#                  ACCOUNTING                  #

################################################

#AccountingStorageBackupHost=psn2    #slurmdbd备机

AccountingStorageEnforce=associations,limits,qos

AccountingStorageHost=sw01     # 主节点

AccountingStoragePort=6819

AccountingStorageType=accounting_storage/slurmdbd

#AccountingStorageUser=

#AccountingStoreJobComment=Yes

AcctGatherEnergyType=acct_gather_energy/none

AcctGatherFilesystemType=acct_gather_filesystem/none

AcctGatherInterconnectType=acct_gather_interconnect/none

AcctGatherNodeFreq=0

#AcctGatherProfileType=acct_gather_profile/none

ExtSensorsType=ext_sensors/none

ExtSensorsFreq=0

JobAcctGatherFrequency=30

JobAcctGatherType=jobacct_gather/linux

#

################################################

#           SCHEDULING & ALLOCATION            #

################################################

PreemptMode=OFF

PreemptType=preempt/none

PreemptExemptTime=00:00:00

PriorityType=priority/basic

#SchedulerParameters=

SchedulerTimeSlice=30

SchedulerType=sched/backfill

#SelectType=select/cons_tres

SelectType=select/linear

#SelectTypeParameters=CR_CPU

SlurmSchedLogLevel=0

#

################################################

#                   TOPOLOGY                   #

################################################

TopologyPlugin=topology/none

#

################################################

#                    TIMERS                    #

################################################

BatchStartTimeout=10

CompleteWait=0

EpilogMsgTime=2000

GetEnvTimeout=2

InactiveLimit=0

KillWait=30

MinJobAge=300

SlurmctldTimeout=60

SlurmdTimeout=60

WaitTime=0

#

################################################

#                    POWER                     #

################################################

#ResumeProgram=

ResumeRate=300

ResumeTimeout=60

#SuspendExcNodes=

#SuspendExcParts=

#SuspendProgram=

SuspendRate=60

SuspendTime=NONE

SuspendTimeout=30

#

################################################

#                    DEBUG                     #

################################################

DebugFlags=NO_CONF_HASH

SlurmctldDebug=info

SlurmdDebug=info

#

################################################

#               EPILOG & PROLOG                #

################################################

#Epilog=/usr/local/etc/epilog

#Prolog=/usr/local/etc/prolog

#SrunEpilog=/usr/local/etc/srun_epilog

#SrunProlog=/usr/local/etc/srun_prolog

#TaskEpilog=/usr/local/etc/task_epilog

#TaskProlog=/usr/local/etc/task_prolog

#

################################################

#               PROCESS TRACKING               #

################################################

ProctrackType=proctrack/pgid

#

################################################

#             RESOURCE CONFINEMENT             #

################################################

#TaskPlugin=task/none

#TaskPlugin=task/affinity

#TaskPlugin=task/cgroup

#TaskPluginParam=

#

################################################

#                    OTHER                     #

################################################

#AccountingStorageExternalHost=

#AccountingStorageParameters=

AccountingStorageTRES=cpu,mem,energy,node,billing,fs/disk,vmem,pages

AllowSpecResourcesUsage=No

#AuthAltTypes=

#AuthAltParameters=

#AuthInfo=

AuthType=auth/munge

#BurstBufferType=

#CliFilterPlugins=

#CommunicationParameters=

CoreSpecPlugin=core_spec/none

#CpuFreqDef=

CpuFreqGovernors=Performance,OnDemand,UserSpace

CredType=cred/munge

#DefMemPerNode=

#DependencyParameters=

DisableRootJobs=No

EioTimeout=60

EnforcePartLimits=NO

#EpilogSlurmctld=

#FederationParameters=

FirstJobId=1

#GresTypes=

GpuFreqDef=high,memory=high

GroupUpdateForce=1

GroupUpdateTime=600

#HealthCheckInterval=0

#HealthCheckNodeState=ANY

#HealthCheckProgram=

InteractiveStepOptions=--interactive

#JobAcctGatherParams=

JobCompHost=localhost

JobCompLoc=/var/log/slurmjobcomp.log

JobCompPort=0

JobCompType=jobcomp/mysql

JobCompUser=slurm

JobCompPass=123456

JobContainerType=job_container/none

#JobCredentialPrivateKey=

#JobCredentialPublicCertificate=

#JobDefaults=

JobFileAppend=0

JobRequeue=1

#JobSubmitPlugins=

#KeepAliveTime=

KillOnBadExit=0

#LaunchParameters=

LaunchType=launch/slurm

#Licenses=

LogTimeFormat=iso8601_ms

#MailDomain=

#MailProg=/bin/mail

MaxArraySize=1001

MaxDBDMsgs=20012

MaxJobCount=10000       #最大的作业数

MaxJobId=67043328

MaxMemPerNode=UNLIMITED

MaxStepCount=40000

MaxTasksPerNode=512

MCSPlugin=mcs/none

#MCSParameters=

MessageTimeout=10

MpiDefault=pmi2    ##启用MPI

#MpiParams=

#NodeFeaturesPlugins=

OverTimeLimit=0

PluginDir=/usr/local/slurm/lib64/slurm

#PlugStackConfig=

#PowerParameters=

#PowerPlugin=

#PrEpParameters=

PrEpPlugins=prep/script

#PriorityParameters=

#PrioritySiteFactorParameters=

#PrioritySiteFactorPlugin=

PrivateData=none

#PrologEpilogTimeout=65534

#PrologSlurmctld=

#PrologFlags=

PropagatePrioProcess=0

PropagateResourceLimits=ALL

#PropagateResourceLimitsExcept=

#RebootProgram=

#ReconfigFlags=

#RequeueExit=

#RequeueExitHold=

#ResumeFailProgram=

#ResvEpilog=

ResvOverRun=0

#ResvProlog=

ReturnToService=0

RoutePlugin=route/default

#SbcastParameters=

#ScronParameters=

#SlurmctldAddr=

#SlurmctldSyslogDebug=

#SlurmctldPrimaryOffProg=

#SlurmctldPrimaryOnProg=

#SlurmctldParameters=

#SlurmdParameters=

#SlurmdSyslogDebug=

#SlurmctldPlugstack=

SrunPortRange=0-0

SwitchType=switch/none

TCPTimeout=2

TmpFS=/tmp

#TopologyParam=

TrackWCKey=No

TreeWidth=50

UsePam=No

#UnkillableStepProgram=

UnkillableStepTimeout=60

VSizeFactor=0

#X11Parameters=

#

################################################

#                    NODES                     #

################################################

#NodeName=Intel Sockets=2 CoresPerSocket=16 ThreadsPerCore=1 RealMemory=480000

#NodeName=Dell Sockets=2 CoresPerSocket=24 ThreadsPerCore=1 RealMemory=100000

#NodeName=swa  CPUS=16 CoresPerSocket=1 ThreadsPerCore=1 Sockets=16  RealMemory=48000 State=UNKNOWN

#NodeName=swb  CPUS=64 CoresPerSocket=32 ThreadsPerCore=1 Sockets=2  RealMemory=100000 State=UNKNOWN

#NodeName=sw5a0[1-3] CPUS=4 Sockets=4 CoresPerSocket=1 ThreadsPerCore=1 RealMemory=1

NodeName=sw01 CPUs=1 Sockets=1 CoresPerSocket=1 ThreadsPerCore=1 State=UNKNOWN

#

################################################

#                  PARTITIONS                  #

################################################

#PartitionName=x86 AllowGroups=all MinNodes=0 Nodes=Dell Default=YES State=UP

#PartitionName=multicore AllowGroups=all MinNodes=0 Nodes=swa,swb,swc,swd State=UP

#PartitionName=manycore Default=YES AllowGroups=all MinNodes=0 Nodes=sw5a0[1-3] State=UP

PartitionName=Manycore AllowGroups=all MinNodes=0 Nodes=sw01 State=UP Default=YES

(2)slurmdbd.conf配置文件

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

#

# Example slurmdbd.conf file.

#

# See the slurmdbd.conf man page for more information.

#

# Archive info

#ArchiveJobs=yes

#ArchiveDir="/tmp"

#ArchiveSteps=yes

#ArchiveScript=

#JobPurge=12

#StepPurge=1

#

# Authentication info

AuthType=auth/munge

#AuthInfo=/var/run/munge/munge.socket.2

#

# slurmDBD info为启用slurmdbd的管理服务器,与slurm.conf中的AccountingStorageHost一致

DbdHost=sw01

#DbdBackupAddr=172.17.0.2

#DbdBackupHost=mn02

DbdPort=6819

SlurmUser=root

MessageTimeout=30

DebugLevel=7

#DefaultQOS=normal,standby

LogFile=/usr/local/slurm/log/slurmdbd.log

PidFile=/usr/local/slurm/run/slurmdbd.pid

#PluginDir=/usr/lib/slurm

#PrivateData=accounts,users,usage,jobs

PrivateData=jobs

#TrackWCKey=yes

#

# Database info

StorageType=accounting_storage/mysql

StorageHost=localhost

#StorageBackupHost=mn02

StoragePort=3306

StoragePass=123456

StorageUser=slurm

StorageLoc=slurm_acct_db

CommitDelay=1

  

(2)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

########################################################

#  Configuration file for Slurm - 2021-08-20T10:27:23  #

########################################################

#

#

#

################################################

#                   CONTROL                    #

################################################

ClusterName=Sunway    #集群名称

SlurmUser=root

SlurmctldHost=Dell    #主控制器的主机名

#SlurmctldHost=Intel  #备控制器的主机名

SlurmctldPort=6817    #slurctld的监听端口

SlurmdPort=6818       #slurmd的通信端口

SlurmdUser=root

#

################################################

#            LOGGING & OTHER PATHS             #

################################################

SlurmctldLogFile=/var/log/slurmctld.log

SlurmdLogFile=/var/log/slurmd.log

SlurmdPidFile=/var/run/slurmd.pid

SlurmdSpoolDir=/var/spool/slurmd

#SlurmSchedLogFile=

SlurmctldPidFile=/var/run/slurmctld.pid

StateSaveLocation=/var/spool/slurmctld  #集群状态文件存放位置(全局文件系统)

#

################################################

#                  ACCOUNTING                  #

################################################

#AccountingStorageBackupHost=Intel  #slurmdbd备机

#AccountingStorageEnforce=none

AccountingStorageEnforce=associations,limits,qos

AccountingStorageHost=Dell  #slurmdbd主机,为数据库管理服务器,即slurmdbd运行的服务器

AccountingStoragePort=6819

AccountingStorageType=accounting_storage/slurmdbd

#AccountingStorageUser=

#AccountingStoreJobComment=Yes

AcctGatherEnergyType=acct_gather_energy/none

AcctGatherFilesystemType=acct_gather_filesystem/none

AcctGatherInterconnectType=acct_gather_interconnect/none

AcctGatherNodeFreq=0

AcctGatherProfileType=acct_gather_profile/none

ExtSensorsType=ext_sensors/none

ExtSensorsFreq=0

JobAcctGatherFrequency=30

JobAcctGatherType=jobacct_gather/linux

#

################################################

#           SCHEDULING & ALLOCATION            #

################################################

PreemptMode=OFF

PreemptType=preempt/none

PreemptExemptTime=00:00:00

PriorityType=priority/basic

#SchedulerParameters=

SchedulerTimeSlice=30

SchedulerType=sched/backfill

SelectType=select/cons_tres

#SelectType=select/linear  #为资源选择类型,参见资源选择说明

SelectTypeParameters=CR_CPU #CR_Core_Memory

SlurmSchedLogLevel=0

#

################################################

#                   TOPOLOGY                   #

################################################

TopologyPlugin=topology/none

#

################################################

#                    TIMERS                    #

################################################

BatchStartTimeout=10

CompleteWait=0

EpilogMsgTime=2000

GetEnvTimeout=2

InactiveLimit=0

KillWait=30

MinJobAge=300

SlurmctldTimeout=60  #控制器通信超时

SlurmdTimeout=60     #slurmd通信超时

WaitTime=0

#

################################################

#                    POWER                     #

################################################

#ResumeProgram=

ResumeRate=300

ResumeTimeout=60

#SuspendExcNodes=

#SuspendExcParts=

#SuspendProgram=

SuspendRate=60

SuspendTime=NONE

SuspendTimeout=30

#

################################################

#                    DEBUG                     #

################################################

DebugFlags=NO_CONF_HASH

SlurmctldDebug=info

SlurmdDebug=info

#

################################################

#               EPILOG & PROLOG                #

################################################

#Epilog=/usr/local/etc/epilog

#Prolog=/usr/local/etc/prolog

#SrunEpilog=/usr/local/etc/srun_epilog

#SrunProlog=/usr/local/etc/srun_prolog

#TaskEpilog=/usr/local/etc/task_epilog

#TaskProlog=/usr/local/etc/task_prolog

#

################################################

#               PROCESS TRACKING               #

################################################

ProctrackType=proctrack/pgid

#

################################################

#             RESOURCE CONFINEMENT             #

################################################

TaskPlugin=task/affinity

#TaskPlugin=task/cgroup

#TaskPluginParam=verbose

#TaskPluginParam=Sched

#

################################################

#                    OTHER                     #

################################################

#AccountingStorageExternalHost=

#AccountingStorageParameters=

AccountingStorageTRES=cpu,mem,energy,node,billing,fs/disk,vmem,pages

AllowSpecResourcesUsage=No

#AuthAltTypes=

#AuthAltParameters=

#AuthInfo=

AuthType=auth/munge

#BurstBufferType=

#CliFilterPlugins=

#CommunicationParameters=

CoreSpecPlugin=core_spec/none

#CpuFreqDef=

CpuFreqGovernors=Performance,OnDemand,UserSpace

CredType=cred/munge

#DefMemPerNode=

#DependencyParameters=

DisableRootJobs=No

EioTimeout=60

EnforcePartLimits=NO

#EpilogSlurmctld=

#FederationParameters=

FirstJobId=1

#GresTypes=

GpuFreqDef=high,memory=high

GroupUpdateForce=1

GroupUpdateTime=600

HealthCheckInterval=0

HealthCheckNodeState=ANY

#HealthCheckProgram=

InteractiveStepOptions=--interactive

#JobAcctGatherParams=

JobCompHost=localhost

JobCompLoc=/var/log/slurm_jobcomp.log

JobCompPort=0

#JobCompType=jobcomp/none

JobCompType=jobcomp/mysql

JobCompUser=slurm

JobCompPass=Nvmetest@123

JobContainerType=job_container/none

#JobCredentialPrivateKey=

#JobCredentialPublicCertificate=

#JobDefaults=

JobFileAppend=0

JobRequeue=1

#JobSubmitPlugins=

#KeepAliveTime=

KillOnBadExit=0

#LaunchParameters=

LaunchType=launch/slurm

#Licenses=

LogTimeFormat=iso8601_ms

#MailDomain=

MailProg=/bin/mail

MaxArraySize=1001

MaxDBDMsgs=20012

MaxJobCount=10000      #最大的作业数

MaxJobId=67043328

MaxMemPerNode=UNLIMITED

MaxStepCount=40000

MaxTasksPerNode=512

MCSPlugin=mcs/none

#MCSParameters=

MessageTimeout=10

MpiDefault=pmi2  ##启用MPI

#MpiParams=

#NodeFeaturesPlugins=

OverTimeLimit=0

PluginDir=/usr/local/lib/slurm

#PlugStackConfig=

#PowerParameters=

#PowerPlugin=

#PrEpParameters=

PrEpPlugins=prep/script

#PriorityParameters=

#PrioritySiteFactorParameters=

#PrioritySiteFactorPlugin=

PrivateData=none

PrologEpilogTimeout=65534

#PrologSlurmctld=

#PrologFlags=

PropagatePrioProcess=0

PropagateResourceLimits=ALL

#PropagateResourceLimitsExcept=

#RebootProgram=

#ReconfigFlags=

#RequeueExit=

#RequeueExitHold=

#ResumeFailProgram=

#ResvEpilog=

ResvOverRun=0

#ResvProlog=

ReturnToService=0

RoutePlugin=route/default

#SbcastParameters=

#ScronParameters=

#SlurmctldAddr=

#SlurmctldSyslogDebug=

#SlurmctldPrimaryOffProg=

#SlurmctldPrimaryOnProg=

#SlurmctldParameters=

#SlurmdParameters=

#SlurmdSyslogDebug=

#SlurmctldPlugstack=

SrunPortRange=0-0

SwitchType=switch/none

TCPTimeout=2

TmpFS=/tmp

#TopologyParam=

TrackWCKey=No

TreeWidth=50

UsePam=No

#UnkillableStepProgram=

UnkillableStepTimeout=60

VSizeFactor=0

#X11Parameters=

#

################################################

#                    NODES                     #

################################################

NodeName=intel CPUs=32 Sockets=2 CoresPerSocket=16 ThreadsPerCore=1 State=UNKNOWN

#NodeName=Dell Sockets=2 CoresPerSocket=24 ThreadsPerCore=1 RealMemory=100000

#NodeName=sw5a0[1-3] CPUS=4 Sockets=4 CoresPerSocket=1 ThreadsPerCore=1 RealMemory=1

NodeName=phytium CPUs=128 SocketsPerBoard=2 CoresPerSocket=64 ThreadsPerCore=1 State=UNKNOWN

NodeName=swa CPUS=16 Sockets=16 CoresPerSocket=1 ThreadsPerCore=1 State=UNKNOWN

NodeName=sw2cpu CPUs=64  Sockets=2 CoresPerSocket=32 ThreadsPerCore=1 State=UNKNOWN

NodeName=mcn[01-02] CPUs=6  Sockets=6 CoresPerSocket=1 ThreadsPerCore=1 State=UNKNOWN

NodeName=x86a,x86b,x86c CPUs=32 Sockets=2 CoresPerSocket=8 ThreadsPerCore=2 State=UNKNOWN

#

################################################

#                  PARTITIONS                  #

################################################

#PartitionName=manycore Default=YES AllowGroups=all MinNodes=0 Nodes=sw5a0[1-3] State=UP

PartitionName=q_Intel AllowGroups=all MinNodes=0 Nodes=intel State=UP

PartitionName=q_Kylin AllowGroups=all MinNodes=0 Nodes=phytium State=UP

PartitionName=q_sw6a AllowGroups=all MinNodes=0 Nodes=swa State=UP

PartitionName=q_sw6b AllowGroups=all MinNodes=0 Nodes=sw2cpu State=UP

PartitionName=q_sw9a AllowGroups=all MinNodes=0 Nodes=mcn[01-02] State=UP DEFAULT=YES

PartitionName=q_x86 AllowGroups=all MinNodes=0 Nodes=x86a,x86b,x86c State=UP

  

  

 -

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/890168.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

闭着眼学机器学习——朴素贝叶斯分类

引言&#xff1a; 在正文开始之前&#xff0c;首先给大家介绍一个不错的人工智能学习教程&#xff1a;https://www.captainbed.cn/bbs。其中包含了机器学习、深度学习、强化学习等系列教程&#xff0c;感兴趣的读者可以自行查阅。 1. 算法介绍 朴素贝叶斯是一种基于贝叶斯定理…

C# 屏幕录制工具

屏幕录制工具 开发语音&#xff1a;C# vb.net 下载地址&#xff1a;https://download.csdn.net/download/polloo2012/89879996 功能&#xff1a;屏幕录制&#xff0c;声卡采集&#xff0c;麦克风采集。 屏幕录制&#xff1a;录制屏幕所有操作&#xff0c;并转换视频格式&…

uniapp-小程序开发0-1笔记大全

uniapp官网&#xff1a; https://uniapp.dcloud.net.cn/tutorial/syntax-js.html uniapp插件市场&#xff1a; https://ext.dcloud.net.cn/ uviewui类库&#xff1a; https://www.uviewui.com/ 柱状、扇形、仪表盘库&#xff1a; https://www.ucharts.cn/v2/#/ CSS样式&…

Springboot 接入 WebSocket 实战

Springboot 接入 WebSocket 实战 前言&#xff1a; WebSocket协议是基于TCP的一种新的网络协议。它实现了浏览器与服务器全双工(full-duplex)通信——允许服务器主动发送信息给客户端。 简单理解&#xff1a; 1&#xff0c;常见开发过程中我们知道 Http协议&#xff0c;客户端…

详解安卓和IOS的唤起APP的机制,包括第三方平台的唤起方法比如微信

网页唤起APP是一种常见的跨平台交互方式&#xff0c;它允许用户从网页直接跳转到移动应用程序。 这种技术广泛应用于各种场景&#xff0c;比如让用户在浏览器中点击链接后直接打开某个应用&#xff0c;或者从网页引导用户下载安装应用。实现这一功能主要依赖于URL Scheme、Univ…

QD1-P21-P22 CSS 基础语法、注释、使用方法

本节学习&#xff1a;CSS 基础语法和注释&#xff0c;以及如何使用CSS定义的样式。 本节视频 https://www.bilibili.com/video/BV1n64y1U7oj?p21 CSS 基本语法 CSS&#xff08;层叠样式表&#xff09;的基本语法相对简单&#xff0c;由选择器和一组包含在花括号 {}​ 中的声…

深入Postman- 自动化篇

前言 在前两篇博文《Postman使用 - 基础篇》《玩转Postman:进阶篇》中,我们介绍了 Postman 作为一款专业接口测试工具在接口测试中的主要用法以及它强大的变量、脚本功能,给测试工作人员完成接口的手工测试带来了极大的便利。其实在自动化测试上,Postman 也能进行良好的支…

【Adobe全家桶】 Adobe 全家桶 AE AU PR ME WIN MAC 各个版本

话不多说今天直接分享 Adobe 全家桶&#xff0c;2017-2024版本 包含 window版本 和MAC版本 Adobe Photoshop 2017-2023 CS5-6 mac版本下载地址 WIN版本下载地址 Adobe After Effects 2017-2024 CS5-6 WIN版本下载地址 mac版本下载地址 Adobe Media Encoder 2017-2024 WIN版…

OceanBase + DolphinScheduler,搭建分布式大数据调度平台的实践

本文整理自白鲸开源联合创始人&#xff0c;Apache DolphinScheduler PMC Chair&#xff0c;Apache Foundation Member 代立冬的演讲。主要介绍了DolphinScheduler及其架构、DolphinScheduler与OceanBase 的联合大数据方案。 DolphinScheduler是什么&#xff1f; Apache Dolphi…

AOT漫谈专题(第二篇): 如何对C# AOT轻量级APM监控

一&#xff1a;背景 1. 讲故事 上一篇我们聊到了如何调试.NET Native AOT 程序&#xff0c;这是研究一个未知领域知识的入口&#xff0c;这篇我们再来看下如何对 Native AOT 程序进行轻量级的APM监控&#xff0c;当然这里的轻量级更多的是对 AOT 中的coreclr内容的挖掘。 二…

工业物联网关-ModbusTCP

Modbus-TCP模式把网关视作Modbus从端设备&#xff0c;主端设备可以通过Modbus-TCP协议访问网关上所有终端设备。用户可以自定义多条通道&#xff0c;每条通道可以配置为TCP Server或者TCP Slave。注意&#xff0c;该模式需要指定采集通道&#xff0c;采集通道可以是串口和网口通…

linux 下 verilog 简明开发环境附简单实例

author: hjjdebug date: 2024年 10月 12日 星期六 10:34:13 CST descripton: linux 下 verilog 简明开发环境附简单实例 甲: 安装软件 1. sudo apt install iverilog 该包verilog 源代码的编译器iverilog&#xff0c;其输出是可执行的仿真文件格式vvp格式 它可以检查源代码中…

跟踪一切学习笔记2024

目录 Track-Anything 多目标跟踪分割 masa 多目标检测跟踪: omnimotion iKUN Track-Anything 交互式,选择多个要跟踪的物体,最后是分割 多目标跟踪分割 https://github.com/gaomingqi/Track-Anything masa 多目标检测跟踪:

单臂路由实现vlan间互访

划分vlan 可以隔离广播域,但vlan 之间无法通信。既能隔离广播域,防止广播风暴的发生,又能实现vlan 之间的通信,就需要用到网络层的路由器,可以通过路由器,以单臂路由的方式来实现vlan 之间的通信。 以下是在神州交换机和路由器上实现单臂路由实现 VLAN 间互访的配置代码示…

Sentinel最全笔记,详细使用步骤教程清单

一、Sentinel的基本功能 1、流量控制 流量控制在网络传输中是一个常用的概念&#xff0c;它用于调整网络包的发送数据。然而&#xff0c;从系统稳定性角度考虑&#xff0c;在处理请求的速度上&#xff0c;也有非常多的讲究。任意时间到来的请求往往是随机不可控的&#xff0c;…

光伏项目难管理的问题如何解决?

1.数字化管理平台的应用 数字化是当前解决光伏项目管理难题的关键手段之一。通过建立统一的数字化管理平台&#xff0c;可以实现对光伏电站的远程监控、数据分析、故障预警及运维调度等功能。这类平台通常集成有智能算法&#xff0c;能够实时分析电站运行数据&#xff0c;及时…

Flink 批作业如何在 Master 节点出错重启后恢复执行进度?

摘要&#xff1a;本文撰写自阿里云研发工程师李俊睿&#xff08;昕程&#xff09;&#xff0c;主要介绍 Flink 1.20 版本中引入了批作业在 JM failover 后的进度恢复功能。主要分为以下四个内容&#xff1a; 背景解决思路使用效果如何启用 一、背景 在 Flink 1.20 版本之前&am…

LeetCode讲解篇之2320. 统计放置房子的方式数

文章目录 题目描述题解思路题解代码题目链接 题目描述 题解思路 我们首先发现一个规律街道两侧是否放置房子是独立的&#xff0c;即放置房子的方式数 一侧放置房子的方式数 * 另一侧放置房子的方案数 一侧放置房子的方式数的二次方 对于一侧[0, i]范围内地块放置房子的方式…

用无人机视角,打开哀牢山!

哀牢山危险且神秘&#xff0c;使用无人机进行探索可以极大地提高安全性和效率。通过无人机的关键性能&#xff0c;将哀牢山的情况记录并传输出来 一、高清摄像与图像传输 高清摄像头&#xff1a;无人机通常搭载高分辨率的摄像头&#xff0c;能够捕捉到哀牢山细腻的自然景观和…

opencv外接矩形cv2.boundingRect和cv2.minAreaRect区别

在OpenCV中&#xff0c;cv2.boundingRect和cv2.minAreaRect是两个用于获取图像中形状边界的函数&#xff0c;但它们在功能和返回结果上有所不同。以下是两者的详细区别&#xff1a; 1. cv2.boundingRect 和 cv2.minAreaRect 功能描述 cv2.boundingRect 主要是用来计算图像轮廓…