SLURM 无法识别 prolog 脚本中的命令

SLURM doesn't recognize the commands in prolog script

I 运行 命令,例如: SLURM prolog 脚本中的 ifconfig、sminfo,但这些命令未执行且 return 错误:未找到命令且如果我检查输出文本文件则输出为空。如果我尝试以下命令:ls, hostname;他们工作得很好。 我尝试手动执行脚本,它正在运行,命令:sminfo、ifconfig 运行良好。

有什么问题??

我的脚本:

 #!/bin/bash

echo "==Pre job==:"
work_dir=`scontrol strong textshow job $SLURM_JOBID | grep ' WorkDir' | awk '{print }' | awk -F'=' '{print }'`
sminfo_out=`sminfo`
cd $work_dir
echo $sminfo_out > /tmp/sminfo_out3
python check_sm.py --sm_input "$sminfo_out"  

Slurm documentation on prolog and epilog scripts的第二句是:

Note that for security reasons, these programs do not have a search path set. Either specify fully qualified path names in the program or set the "PATH" environment variable

所以您要么在脚本的开头明确设置 PATH(运行 echo $PATH 以找出它包含的内容),要么使用您要执行的命令的完整路径运行ning(使用 which command 找出命令的完整路径)。