SLURM "srun module load" 命令因错误退出

SLURM "srun module load" command exits with error

我正在使用带有 Lmod 的 slurm 集群。我有 2 个节点,我想在两个节点上加载一个模块。当我 运行 命令

srun -n2 module load python/3.8.10 我收到 slurmstepd: error: execve(): module: No such file or directory。为什么不 运行ning module load 命令?它正在搜索名称为 module 的文件。我如何让它工作?谢谢!

module 命令是一个 shell 函数,因此它不像常规命令那样工作,因此 No such file or directory。 (试试 which moduletype module 你就会明白我的意思了)。

在任何情况下您都不需要使用 srun 来执行 module 命令,只需在 运行 您的代码之前在您的提交脚本中执行 module load python/3.8.10 (使用srun),新环境将传播到分配中的所有节点。