slurm rest api 提交任务job id和系统squene差1
-
接口地址:http://192.168.0.135:6820/slurm/v0.0.40/job/submit
{ "job": { "name": "slurm_test220240428_13_55_34", "current_working_directory": "/cephfs_data/slurm_hpc/genostack_v3/genostack_core/genostack_php/slurm_run/c1/09c/42a-c99c-37ed-0e3f-2b2c8ddf3860", "standard_output": "/cephfs_data/slurm_hpc/genostack_v3/genostack_core/genostack_php/slurm_run/c1/09c/42a-c99c-37ed-0e3f-2b2c8ddf3860/output.out", "standard_error": "/cephfs_data/slurm_hpc/genostack_v3/genostack_core/genostack_php/slurm_run/c1/09c/42a-c99c-37ed-0e3f-2b2c8ddf3860/error.out", "environment": { "PATH": "/bin:/usr/bin/:/usr/local/bin/", "LD_LIBRARY_PATH": "/lib/:/lib64/:/usr/local/lib" }, "partition": "debug", "cpus_per_task": 1, "memory_per_node":100, "required_nodes":["node3"] }, "script": "#!/bin/bash \nsbatch test.sh" }原因分析:通过slurm rest api 提交任务,实际是用sbatch做了封装,在script中只需要写运行的job命令,不能用sbatch提交sh脚本。
这种错误做法等价于: 在test.sh 中写入 sbatch sleep 20s, 然后再用 sbatch test.sh