当前位置: 首页 > news >正文

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

  

  

 -

相关文章:

linux源码安装slurm以及mung和openssl

一、源码安装munge 1、编译安装munge &#xff08;1&#xff09;下载munge地址&#xff1a;https://github.com/dun/munge/releases &#xff08;2&#xff09;解压编译安装&#xff1a; 1 2 3 4 5 6 7 8 创建/data目录 复制文件munge-0.5.15.tar.xz 到/data目录下 tar -Jx…...

分享蓝牙耳机A2DP音频卡顿原因及解决思路

背景 最近一直在更新博客&#xff0c;我觉得写博客有三个好处&#xff0c;一是很多东西时间久了就会忘&#xff0c;记下来方便自己以后回忆和总结&#xff0c;二是记下来可以加深自己对知识的理解&#xff0c;三是可以知识分享&#xff0c;方便他人。 言归正传&#xff0c;今天…...

Mac 下编译 libaom 源码教程

AV1 AV1是一种开放、免版税的视频编码格式&#xff0c;由开放媒体联盟&#xff08;AOMedia&#xff09;开发&#xff0c;旨在提供高压缩效率和优秀的视频质量。AV1支持多种分辨率&#xff0c;包括SD、HD、4K和8K&#xff0c;并适用于视频点播&#xff08;VOD&#xff09;、直播…...

【成品设计】基于Arduino平台的物联网智能灯

《基于Arduino平台的物联网智能灯》 整体功能&#xff1a; 这个任务中要求实现一个物联网智能灯。实际测试环境中要求设备能够自己创建一个热点&#xff0c;连接这个热点后能自动弹出控制界面&#xff08;强制门户&#xff09;。 功能点 基础功能 (60分) 要求作品至少有2个灯…...

安装和配置k8s可视化UI界面dashboard-1.20.6

安装和配置k8s可视化UI界面dashboard-1.20.6 1.环境规划2.初始化服务器1&#xff09;配置主机名2&#xff09;设置IP为静态IP3&#xff09;关闭selinux4&#xff09;配置主机hosts文件5&#xff09;配置服务器之间免密登录6&#xff09;关闭交换分区swap&#xff0c;提升性能7&…...

VLAN:虚拟局域网

VLAN:虚拟局域网 交换机和路由器协同工作后&#xff0c;将原先的一个广播域&#xff0c;逻辑上&#xff0c;切分为多个广播域。 第一步:创建VLAN [SW1]dispaly vlan 查询vlan VID&#xff08;VLAN ID&#xff09;:用来区分和标定不同的vlan 由12位二进制构成 范围: 0-4…...

利用可解释性技术增强制造质量预测模型

概述 论文地址&#xff1a;https://arxiv.org/abs/2403.18731 本研究提出了一种利用可解释性技术提高机器学习&#xff08;ML&#xff09;模型性能的方法。该方法已用于铣削质量预测&#xff0c;这一过程首先训练 ML 模型&#xff0c;然后使用可解释性技术识别不需要的特征并去…...

FlexMatch: Boosting Semi-Supervised Learning with Curriculum Pseudo Labeling

FlexMatch: Boosting Semi-Supervised Learning with Curriculum Pseudo Labeling 摘要:引言:背景3 flexMatch3.1 Curriculum Pseudo Labeling3.2 阈值预热3.3非线性映射函数实验4.1 主要结果4.2 ImageNet上的结果4.3收敛速度加速4.4 消融研究5 相关工作摘要: 最近提出的Fi…...

Spring Cloud 3.x 集成eureka快速入门Demo

1.什么是eureka&#xff1f; Eureka 由 Netflix 开发&#xff0c;是一种基于REST&#xff08;Representational State Transfer&#xff09;的服务&#xff0c;用于定位服务&#xff08;服务注册与发现&#xff09;&#xff0c;以实现中间层服务的负载均衡和故障转移&#xff…...

线性代数 矩阵

一、矩阵基础 1、定义 一组数按照矩形排列而成的数表&#xff1b;形似行列式&#xff0c;区别点是 矩阵行列式符号()或[]| |形状方阵或非方阵方阵本质数表数属性A|A|是A诸多属性中的一种维度m *n (m 与n可以相等也可以不相等)n*n 同型矩阵 若A、B两个矩阵都是mn 矩阵&#x…...

【C语言】使用结构体实现位段

文章目录 一、什么是位段二、位段的内存分配1.位段内存分配规则练习1练习2 三、位段的跨平台问题四、位段的应用五、位段使用的注意事项 一、什么是位段 在上一节中我们讲解了结构体&#xff0c;而位段的声明和结构是类似的&#xff0c;它们有两个不同之处&#xff0c;如下&…...

univer实现excel协同

快速入门 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>Document</title><script src&q…...

JavaScript进阶笔记--深入对象-内置构造函数及案例

深入对象 创建对象三种方式 利用对象字面量new Object&#xff08;{…}&#xff09;利用构造函数 // 1. 字面量创建对象const obj1 {name: pig,age: 18};console.log(obj1); // {name: "pig", age: 18}// 2. 构造函数创建对象function Pig(name, age) {this.name…...

网络爬虫自动化Selenium模拟用户操作

自动化测试和网络爬虫在现代软件开发中占据着重要的位置。它们通过自动化用户操作,减少了人工重复操作的时间成本。Selenium作为一个功能强大且应用广泛的自动化工具,不仅能在不同的浏览器中运行自动化测试,还能进行跨平台测试,并允许与多种编程语言集成。本教程将介绍如何…...

尚硅谷rabbitmq 2024 流式队列2024指定偏移量 第55节答疑

rabbitmq的stream&#xff1a; 4、对比 autoTrackingstrategy方式:始终监听Stream中的新消息(狗狗看家&#xff0c;忠于职守)指定偏移量方式:针对指定偏移量的消息消费之后就停止(狗狗叼飞盘&#xff0c;回来就完) 这两种分别怎么写&#xff1f;java 在 RabbitMQ 中&#xff0c…...

NSSCTF-WEB-pklovecloud

目录 前言 正文 思路 尝试 结尾 前言 许久未见,甚是想念. 今天来解一道有意思的序列化题 正文 思路 <?php include flag.php; class pkshow {function echo_name(){return "Pk very safe^.^";} }class acp {protected $cinder;public $neutron;public $…...

深入Postman- 自动化篇

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

react-JSX

JSX理念 jsx在编译的时候会被babel编译为react.createELement方法 在使用jsx的文件中&#xff0c;需要引入react。import React from "react" jsx会被编译为React.createElement,所有jsx的运行结果都是react element React Component 在react中&#xff0c;常使用…...

深度对比:IPguard与Ping32在企业网络管理中的应用

随着网络安全形势日益严峻&#xff0c;企业在选择网络管理工具时需慎之又慎。IPguard与Ping32是目前市场上两款颇具代表性的产品&#xff0c;它们在功能、性能以及应用场景上各有优势。本文将对这两款产品进行深度对比&#xff0c;以帮助企业找到最合适的解决方案。 IPguard以其…...

AI测试之 TestGPT

如今最火热的技术莫非OpenAI的ChatGPT莫属&#xff0c;AI技术也在很多方面得到广泛应用。今天我们要介绍的TestGPT就是一个软件测试领域中当红的应用。 TestGPT是什么&#xff1f; TestGPT是一家总部位于以色列特拉维夫的初创公司 CodiumAI Ltd.&#xff0c;发布的一款用于测…...

【Java学习笔记】Arrays类

Arrays 类 1. 导入包&#xff1a;import java.util.Arrays 2. 常用方法一览表 方法描述Arrays.toString()返回数组的字符串形式Arrays.sort()排序&#xff08;自然排序和定制排序&#xff09;Arrays.binarySearch()通过二分搜索法进行查找&#xff08;前提&#xff1a;数组是…...

在rocky linux 9.5上在线安装 docker

前面是指南&#xff0c;后面是日志 sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo dnf install docker-ce docker-ce-cli containerd.io -y docker version sudo systemctl start docker sudo systemctl status docker …...

基础测试工具使用经验

背景 vtune&#xff0c;perf, nsight system等基础测试工具&#xff0c;都是用过的&#xff0c;但是没有记录&#xff0c;都逐渐忘了。所以写这篇博客总结记录一下&#xff0c;只要以后发现新的用法&#xff0c;就记得来编辑补充一下 perf 比较基础的用法&#xff1a; 先改这…...

DBAPI如何优雅的获取单条数据

API如何优雅的获取单条数据 案例一 对于查询类API&#xff0c;查询的是单条数据&#xff0c;比如根据主键ID查询用户信息&#xff0c;sql如下&#xff1a; select id, name, age from user where id #{id}API默认返回的数据格式是多条的&#xff0c;如下&#xff1a; {&qu…...

【Zephyr 系列 10】实战项目:打造一个蓝牙传感器终端 + 网关系统(完整架构与全栈实现)

🧠关键词:Zephyr、BLE、终端、网关、广播、连接、传感器、数据采集、低功耗、系统集成 📌目标读者:希望基于 Zephyr 构建 BLE 系统架构、实现终端与网关协作、具备产品交付能力的开发者 📊篇幅字数:约 5200 字 ✨ 项目总览 在物联网实际项目中,**“终端 + 网关”**是…...

WordPress插件:AI多语言写作与智能配图、免费AI模型、SEO文章生成

厌倦手动写WordPress文章&#xff1f;AI自动生成&#xff0c;效率提升10倍&#xff01; 支持多语言、自动配图、定时发布&#xff0c;让内容创作更轻松&#xff01; AI内容生成 → 不想每天写文章&#xff1f;AI一键生成高质量内容&#xff01;多语言支持 → 跨境电商必备&am…...

12.找到字符串中所有字母异位词

&#x1f9e0; 题目解析 题目描述&#xff1a; 给定两个字符串 s 和 p&#xff0c;找出 s 中所有 p 的字母异位词的起始索引。 返回的答案以数组形式表示。 字母异位词定义&#xff1a; 若两个字符串包含的字符种类和出现次数完全相同&#xff0c;顺序无所谓&#xff0c;则互为…...

学习STC51单片机32(芯片为STC89C52RCRC)OLED显示屏2

每日一言 今天的每一份坚持&#xff0c;都是在为未来积攒底气。 案例&#xff1a;OLED显示一个A 这边观察到一个点&#xff0c;怎么雪花了就是都是乱七八糟的占满了屏幕。。 解释 &#xff1a; 如果代码里信号切换太快&#xff08;比如 SDA 刚变&#xff0c;SCL 立刻变&#…...

大语言模型(LLM)中的KV缓存压缩与动态稀疏注意力机制设计

随着大语言模型&#xff08;LLM&#xff09;参数规模的增长&#xff0c;推理阶段的内存占用和计算复杂度成为核心挑战。传统注意力机制的计算复杂度随序列长度呈二次方增长&#xff0c;而KV缓存的内存消耗可能高达数十GB&#xff08;例如Llama2-7B处理100K token时需50GB内存&a…...

C++使用 new 来创建动态数组

问题&#xff1a; 不能使用变量定义数组大小 原因&#xff1a; 这是因为数组在内存中是连续存储的&#xff0c;编译器需要在编译阶段就确定数组的大小&#xff0c;以便正确地分配内存空间。如果允许使用变量来定义数组的大小&#xff0c;那么编译器就无法在编译时确定数组的大…...