<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[slurm rest api 提交任务job id和系统squene差1]]></title><description><![CDATA[<p dir="auto">接口地址：<a href="http://192.168.0.135:6820/slurm/v0.0.40/job/submit" rel="nofollow ugc">http://192.168.0.135:6820/slurm/v0.0.40/job/submit</a></p>
<pre><code>{
    "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"
}
</code></pre>
<p dir="auto">原因分析：通过slurm rest api 提交任务，实际是用sbatch做了封装，在script中只需要写运行的job命令，不能用sbatch提交sh脚本。<br />
这种错误做法等价于： <a href="http://xn--test-ft4g.sh" rel="nofollow ugc">在test.sh</a> 中写入  sbatch sleep 20s,  然后再用 sbatch <a href="http://test.sh" rel="nofollow ugc">test.sh</a></p>
]]></description><link>http://an.forum.genostack.com/topic/1065/slurm-rest-api-提交任务job-id和系统squene差1</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 12:32:26 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/1065.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 May 2024 06:21:09 GMT</pubDate><ttl>60</ttl></channel></rss>