{"id":592,"date":"2021-11-23T17:07:54","date_gmt":"2021-11-23T09:07:54","guid":{"rendered":"https:\/\/airy.cn\/WordPress\/?p=592"},"modified":"2021-11-23T17:08:33","modified_gmt":"2021-11-23T09:08:33","slug":"hpc-resolution-slurm","status":"publish","type":"post","link":"https:\/\/airy.cn\/WordPress\/?p=592","title":{"rendered":"HPC Resolution \u4e4b Slurm"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic1.zhimg.com\/v2-8ecd0286adce8704a72649e350393a42_1440w.jpg?source=172ae18b\" alt=\"HPC Resolution \u4e4b Slurm (1)\"\/><\/figure>\n\n\n\n<p><em>\u7eb2\u8981\uff1a\u672c\u6587\u4ecb\u7ecdslurm\u4e4b\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Slurm \u6982\u8ff0<\/li><li>Slurm \u67b6\u6784<\/li><li>Slurm \u63d0\u4ea4\u4f5c\u4e1a\u6a21\u5f0f\u4e0e\u539f\u7406<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001Slurm\u6982\u8ff0<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 \u6982\u5ff5<\/h3>\n\n\n\n<p>Slurm\uff08Simple Linux Utility for Resource Management\uff09\uff0c\u662f\u4e00\u4e2a\u5f00\u6e90\u3001\u5bb9\u9519\u3001\u9ad8\u53ef\u4f38\u7f29\u7684\u96c6\u7fa4\u7ba1\u7406\u548c\u5927\u578b\u5c0f\u578b Linux \u96c6\u7fa4\u4f5c\u4e1a\u8c03\u5ea6\u7cfb\u7edf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 \u4e3b\u8981\u529f\u80fd<\/h3>\n\n\n\n<p>a. slurm\u53ef\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u4e3a\u7528\u6237\u5206\u914d\u72ec\u5360\u6216\u8005\u975e\u72ec\u5360\u7684\u8ba1\u7b97\u8d44\u6e90\uff0c\u4ee5\u4fbf\u4ed6\u4eec\u80fd\u591f\u6267\u884c\u5de5\u4f5c\u4efb\u52a1\uff1b<\/p>\n\n\n\n<p>b. slurm\u63d0\u4f9b\u4e00\u4e2a\u6846\u67b6\uff0c\u4ee5\u4fbf\u7ba1\u7406\u5e76\u884c\u4efb\u52a1\u5728\u8282\u70b9\u4e0a\u7684\u542f\u52a8\u3001\u6267\u884c\u548c\u76d1\u89c6\uff1b<\/p>\n\n\n\n<p>c. slurm\u901a\u8fc7\u7ba1\u7406\u6302\u8d77\u7684\u5de5\u4f5c\u961f\u5217\uff0c\u6765\u4ef2\u88c1\u8d44\u6e90\u4e89\u593a\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.3 \u7279\u6027<\/h3>\n\n\n\n<p>a. \u7b80\u5355\uff1a\u6e90\u7801\u7b80\u5355\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u7406\u89e3\u5176\u6e90\u7801\u5e76\u6dfb\u52a0\u529f\u80fd\uff1b<\/p>\n\n\n\n<p>b. \u5f00\u6e90\uff1a\u4efb\u4f55\u4e00\u4e2a\u4f7f\u7528\u8005\u90fd\u53ef\u4ee5\u5728\u7f51\u4e0a\u514d\u8d39\u4e0b\u8f7d\uff1b<\/p>\n\n\n\n<p>c. \u4fbf\u643a\uff1aSlurm\u7528C\u8bed\u8a00\u7f16\u5199\u7684\uff0c\u53ef\u4ee5\u79fb\u690d\u4e8e\u4efb\u4f55\u4e00\u4e2a\u7c7bUNIX\u7cfb\u7edf\u4e0a\uff1b<\/p>\n\n\n\n<p>d. \u53ef\u6269\u5c55\uff1a\u53ef\u642d\u8f7d\u4e8e\u6570\u5341\u4e2a\u8282\u70b9\u7684\u5c0f\u96c6\u7fa4\uff0c\u4e5f\u53ef\u642d\u8f7d\u4e8e\u6570\u5343\u4e2a\u8282\u70b9\u7684\u5927\u96c6\u7fa4\u4e0a\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001Slurm\u67b6\u6784<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">2.1 \u7f51\u7edc\u67b6\u6784<\/h3>\n\n\n\n<p>a.\u4e09\u7ef4\u73af\u9762\u7ed3\u6784<\/p>\n\n\n\n<p>Cray XT\u548cXE\u652f\u6301\u6b64\u6a21\u5f0f\uff0c\u6b64\u6a21\u5f0f\u4e0d\u9700\u8981\u4f5c\u4e1a\u5728\u7269\u7406\u4e0a\u76f8\u90bb\u8282\u70b9\u6267\u884c\u3002\u5728\u6b64\u6a21\u5f0f\u4e0b\uff0cSlurm\u4f7f\u7528\u5e0c\u5c14\u4f2f\u7279\u66f2\u7ebf\u5c06\u8282\u70b9\u4ece\u4e09\u7ef4\u7a7a\u95f4\u6620\u5c04\u5230\u4e00\u7ef4\u7a7a\u95f4\u3002<\/p>\n\n\n\n<p>b.\u5c42\u6b21\u7f51\u7edc\u7ed3\u6784<\/p>\n\n\n\n<p>\u6b64\u6a21\u5f0f\u4e0b\uff0cslurm\u7f51\u7edc\u62d3\u6251\u7ed3\u6784\u4e3a\u4e00\u68f5\u6811\uff0c\u975e\u53f6\u5b50\u8282\u70b9\u4e3a\u4ea4\u6362\u673a\uff0c\u53f6\u5b50\u8282\u70b9\u4e3a\u8ba1\u7b97\u8282\u70b9\uff0c\u5982\u56fe2.1\u6240\u793a\uff0cSlurm\u4f7f\u7528\u6700\u4f73\u5339\u914d\u7b97\u6cd5\u6765\u9009\u62e9\u6700\u4f4e\u5c42\u7684\u4ea4\u6362\u673a\uff0c\u4f7f\u5f97\u6b64\u4ea4\u6362\u673a\u5c42\u4e0b\u9762\u7684\u53f6\u5b50\u5c42\u8d44\u6e90\u6ee1\u8db3\u4f5c\u4e1a\u9700\u6c42\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic4.zhimg.com\/80\/v2-47e9684c65bc9bc61dbeb8408998d257_720w.jpg\" alt=\"\"\/><figcaption>\u56fe 2.1 slurm\u5c42\u6b21\u7f51\u7edc\u7ed3\u6784<\/figcaption><\/figure>\n\n\n\n<p>\u5176\u7f51\u7edc\u62d3\u6251\u7ed3\u6784\u9700\u5728topology.conf\u6587\u4ef6\u4e2d\u660e\u786e\u5199\u51fa\u3002\u56fe2.1\u6240\u5bf9\u5e94\u7684topology.conf\u5982\u56fe2.2\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic1.zhimg.com\/80\/v2-6a69491d9e0841fbdabc5bf1f4bca5e4_720w.jpg\" alt=\"\"\/><figcaption>\u56fe 2.2 \u56fe2.1\u6240\u5bf9\u5e94\u7684\u914d\u7f6e\u6587\u4ef6<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 \u8d44\u6e90\u7ba1\u7406\u67b6\u6784<\/h3>\n\n\n\n<p>\u5982\u56fe2.3\u6240\u793a\uff0cslurm\u8d44\u6e90\u7ba1\u7406\u67b6\u6784\u4e3b\u8981\u5305\u62ec\u56db\u90e8\u5206\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-7a878a5a5f6fcc20baa620772f64f36a_720w.jpg\" alt=\"\"\/><figcaption>\u56fe 2.3 Slurm\u8d44\u6e90\u7ba1\u7406\u67b6\u6784<\/figcaption><\/figure>\n\n\n\n<p>\u7ba1\u7406\u5458\u2014\u2014\u2014slurmctld<\/p>\n\n\n\n<p>\u8ba1\u7b97\u8282\u70b9\u2014\u2014slurmd<\/p>\n\n\n\n<p>\u6570\u636e\u5e93\u2014\u2014\u2014slurmdbd<\/p>\n\n\n\n<p>\u7528\u6237\u2014\u2014\u2014\u2014\u7528\u6237\u547d\u4ee4<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.2.1 slurmctld<\/h3>\n\n\n\n<p>slurmctld (Slurm Central Daemon)\u4e3a\u591a\u7ebf\u7a0b\u8fdb\u7a0b\uff0c\u652f\u6301\u5bf9\u591a\u79cd\u6570\u636e\u7ed3\u6784\u7684\u8bfb\u5199\u9501\u673a\u5236\uff0c\u5f53\u8be5\u8fdb\u7a0b\u542f\u52a8\u65f6\uff0c\u5b83\u4f1a\u8bfb\u53d6slurm.conf\u6587\u4ef6\uff0c\u6839\u636e\u6587\u4ef6\u5bf9\u7cfb\u7edf\u8fdb\u884c\u914d\u7f6e\u3002Slurmctld\u5305\u542b\u4e09\u5927\u90e8\u5206\uff1a<strong>Node Manager<\/strong>\uff1a\u8d1f\u8d23\u76d1\u89c6\u96c6\u7fa4\u4e2d\u6bcf\u4e2a\u8282\u70b9\u7684\u72b6\u6001\uff0c\u5468\u671f\u6027\u5730\u68c0\u67e5slurmd\u7684\u4fe1\u606f\uff0c\u5e76\u5f02\u6b65\u5730\u4eceslurmd\u63a5\u53d7\u66f4\u65b0\u540e\u7684\u914d\u7f6e\u4fe1\u606f\u3002<strong>Partition Manager<\/strong>\uff1a\u4f9d\u636e\u8282\u70b9\u548c\u5206\u533a\u7684\u72b6\u6001\u4e3a\u4f5c\u4e1a\u5206\u914d\u5206\u533a\u3002<strong>Job Manager<\/strong>\uff1a\u63a5\u53d7\u7528\u6237\u7684\u4f5c\u4e1a\u8bf7\u6c42\uff0c\u5e76\u6839\u636e\u8c03\u5ea6\u7b97\u6cd5\u548c\u4f18\u5148\u7ea7\u51b3\u5b9a\u662f\u5426\u5bf9\u4f5c\u4e1a\u6267\u884c\u6302\u8d77\u3001\u6267\u884c\u3001\u5b8c\u6210\u7b49\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.2.2 slurmd<\/h3>\n\n\n\n<p>slurmd(Slurm local daemon)\u662f\u4e00\u4e2a\u8fd0\u884c\u5728\u6bcf\u4e2acompute node\u4e0a\u7684\u591a\u7ebf\u7a0b\u8fdb\u7a0b\uff0c\u8d1f\u8d23\u901a\u77e5central daemon\u6b64\u8282\u70b9\u5904\u4e8e\u7b49\u5f85\u3001\u6267\u884c\u3001\u8fd4\u56de\u7b49\u72b6\u6001\u3002\u5982\u56fe2.4\u6240\u793a\uff0cslurmd\u4e3b\u8981\u5305\u542b5\u4e2a\u529f\u80fd\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-026886c5e437bbbaa319d7f14d4c9b5e_720w.jpg\" alt=\"\"\/><figcaption>\u56fe2.4 slurmd\u4e94\u5927\u529f\u80fd<\/figcaption><\/figure>\n\n\n\n<p><strong>Machine and Job Status Services<\/strong>:\u5468\u671f\u6027\u5730\u5411slurmctld\u53cd\u9988\u8282\u70b9\u548c\u4f5c\u4e1a\u7684\u72b6\u6001\u4fe1\u606f\u3002<strong>Remote Execution<\/strong>:\u5728user\u6267\u884c\u5b8c\u547d\u4ee4\u6216slurmctldf\u6307\u5b9a\u5b8c\u4efb\u52a1\u540e\uff0c\u5bf9\u8be5\u4efb\u52a1\u6267\u884c\u5f00\u59cb\u3001\u76d1\u89c6\u548c\u6e05\u9664\u64cd\u4f5c\u3002\u5176\u4e2d\u5f00\u59cb\u6267\u884c\u8fdb\u7a0b\u4e4b\u524d\u8981\u8bbe\u7f6e\u8fdb\u7a0b\u7684limits\uff0c\u8bbe\u7f6e\u5b9e\u9645\u548c\u6709\u6548\u7684user id\uff0c\u5efa\u7acb\u73af\u5883\u53d8\u91cf\uff0c\u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55\uff0c\u8bbe\u7f6e\u6838\u5fc3\u6587\u4ef6\u8def\u5f84\u3001\u521d\u59cb\u5316Stream Copy Service\u7b49\u3002<strong>Stream Copy Service<\/strong>:\u8d1f\u8d23\u5904\u7406\u8f93\u5165\u8f93\u51fa\u6d41\u91cd\u5b9a\u5411\u3002<strong>Job Control<\/strong>:\u8d1f\u8d23\u5c06Job\u7ec8\u7aef\u8bf7\u6c42\u4f20\u9012\u7ed9\u4efb\u4f55\u4e00\u7ec4\u672c\u5730\u7ba1\u7406\u8fdb\u7a0b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.3 slurm \u5b89\u5168\u8ba4\u8bc1\u673a\u5236<\/h3>\n\n\n\n<p>Slurm\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u5b89\u5168\u6a21\u578b\uff1a<\/p>\n\n\n\n<p>a.\u4efb\u4f55\u4e00\u4e2a\u7528\u6237\u53ef\u4ee5\u63d0\u4ea4\u3001\u6267\u884c\u548c\u5220\u9664\u81ea\u5df1\u7684\u4efb\u52a1\uff1b<\/p>\n\n\n\n<p>b.\u4efb\u4f55\u4e00\u4e2a\u7528\u6237\u53ef\u4ee5\u67e5\u770bslurm configuration and state information<\/p>\n\n\n\n<p>c.\u53ea\u6709\u6388\u6743\u7528\u6237\u53ef\u4ee5\u66f4\u6539slurm configuration and cancel any jobs<\/p>\n\n\n\n<p>\u5176\u8ba4\u8bc1\u539f\u7406\u5982\u56fe2.5\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic4.zhimg.com\/80\/v2-291406d5a932ee9e2e8205abbb891f1b_720w.jpg\" alt=\"\"\/><figcaption>\u56fe 2.5 Munge\u8ba4\u8bc1\u673a\u5236<\/figcaption><\/figure>\n\n\n\n<p>Slurm\u91c7\u7528munge\u673a\u5236\u8fdb\u884c\u5b89\u5168\u8ba4\u8bc1:<\/p>\n\n\n\n<p>a.Munge \u8fdb\u7a0b\u8fd0\u884c\u5728\u6bcf\u4e00\u4e2a\u8282\u70b9\u4e0a\uff0c\u901a\u8fc7getpeername()\u51fd\u6570\u6765\u786e\u8ba4\u7528\u6237\u4fe1\u606f\uff0c\u5e76\u4ea7\u751f\u4e00\u4e2a\u51ed\u8bc1\u4fe1\u606f\u3002\u8be5\u51ed\u8bc1\u4fe1\u606f\u5305\u62ec\uff1auser ID\uff0c\u7ec4ID\uff0c\u65f6\u95f4\u6233\uff0c\u751f\u547d\u5468\u671f\uff0c\u4f2a\u968f\u673a\u6570\u7b49\u3002<\/p>\n\n\n\n<p>b.Munge\u5229\u7528\u79c1\u94a5\u751f\u6210\u4e00\u4e2aMAC(Message Authentication Code)\u7528\u4e8e\u8ba4\u8bc1\u3002<\/p>\n\n\n\n<p>c.\u7136\u540eMunge \u7528\u516c\u94a5\u52a0\u5bc6\u5305\u542bMAC\u4fe1\u606f\u7684\u8ba4\u8bc1\u3002<\/p>\n\n\n\n<p>d.Slurm\u8fdb\u7a0b\u4e4b\u95f4\u4e92\u76f8\u4f20\u9012\u52a0\u5bc6\u540e\u7684\u8ba4\u8bc1\u4fe1\u606f\uff0c\u5e76\u5c06\u81ea\u5df1\u63a5\u53d7\u5230\u7684\u8ba4\u8bc1\u4fe1\u606f\u53d1\u9001\u7ed9\u81ea\u5df1\u7684munge\u3002<\/p>\n\n\n\n<p>e.Munge\u5229\u7528\u81ea\u5df1\u7684\u79c1\u94a5\u53bb\u89e3\u5bc6\u8ba4\u8bc1\uff0c\u83b7\u5f97user ID\uff0cgroup ID\u7b49\u4fe1\u606f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001Slurm\u63d0\u4ea4\u4f5c\u4e1a\u6a21\u5f0f\u4e0e\u539f\u7406<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">3.1 Job Initiation Survey<\/h3>\n\n\n\n<p>\u5982\u56fe3.1\u6240\u793a\u3002<\/p>\n\n\n\n<p>1. Srun\u8fdb\u7a0b\u8fde\u63a5slurm central daemon\u5e76\u8bf7\u6c42\u8d44\u6e90\u548c\u4f5c\u4e1a\u6b65\u521d\u59cb\u5316\u4fe1\u606f\uff08\u5305\u62ecjob ID\uff0c\u53ef\u5206\u914d\u8282\u70b9\u5217\u8868\uff0cjob\u8ba4\u8bc1\u4ee5\u53ca\u8be5\u4f5c\u4e1a\u662f\u5426\u53ef\u4ee5\u88ab\u6388\u6743\u6267\u884c\uff09\uff1b<\/p>\n\n\n\n<p>2. Slurmctld issue \u4e00\u4e2a\u5e94\u7b54\u7ed9srun\uff0c\u8be5\u5e94\u7b54\u5305\u62ec\u8282\u70b9\u5217\u8868\u548c\u4f5c\u4e1a\u8ba4\u8bc1<\/p>\n\n\n\n<p>3. Srun \u4e3a\u6bcf\u4e2a\u4efb\u52a1\u521d\u59cb\u5316\u4e00\u4e2a\u76d1\u542c\u7aef\u53e3\uff0c\u5e76\u5411slurmd\u53d1\u9001\u4e00\u4e2amessage\uff0c\u8981\u6c42\u8be5\u8282\u70b9\u505a\u521d\u59cb\u5316\u51c6\u5907<\/p>\n\n\n\n<p>4. Slurmd\u521d\u59cb\u5316\u4f5c\u4e1a\u6b65\uff0c\u5e76\u8fde\u63a5srun\u7b49\u5f85\u8f93\u5165\u6d41<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic2.zhimg.com\/80\/v2-fd5f59b53d84af5f559c8aeab03b52cd_720w.jpg\" alt=\"\"\/><figcaption>\u56fe3.1 slurm\u4f5c\u4e1a\u521d\u59cb\u5316\u6d41\u7a0b<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3.2 Three Modes for Submission of Jobs<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">3.2.1 Interactive Mode<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic3.zhimg.com\/80\/v2-4ce580975ea495f07108a3eef26f5d0e_720w.jpg\" alt=\"\"\/><figcaption>\u56fe3.2 Interactive Mode<\/figcaption><\/figure>\n\n\n\n<p>\u5982\u56fe3.2\u6240\u793a\uff0c\u4ea4\u4e92\u6a21\u5f0f\u4ee5\u7528\u6237\u8fd0\u884csrun\u5f00\u59cb\u6267\u884c\u3002Srun\u4f1a\u5411slurmctld\u53d1\u9001\u4e00\u4e2a\u4fe1\u606f\uff0c\u6765\u8bf7\u6c42\u8d44\u6e90\u548c\u4f5c\u4e1a\u6b65\u7684\u521d\u59cb\u5316\u3002\u7531\u4e8e\u8d44\u6e90\u5206\u914d\u4f18\u5148\u7ea7\u7684\u95ee\u9898\uff0csrun\u53ef\u80fd\u4e0d\u4f1a\u7acb\u5373\u5f97\u5230\u56de\u5e94\u3002\u5f53\u8d44\u6e90\u53ef\u7528\u65f6\uff0cslurmctld\u5411srun\u53d1\u9001\u56de\u5e94\u4fe1\u606f\uff0c\u8be5\u4fe1\u606f\u5305\u62ec\u4f5c\u4e1a\u6b65\u7684\u8ba4\u8bc1\uff0c\u53ef\u7528\u8282\u70b9\u5217\u8868\u7b49\u3002\u6536\u5230\u56de\u590d\u4fe1\u606f\u540esrun\u5411slurmd\u53d1\u9001\u4f5c\u4e1a\u6b65\u521d\u59cb\u5316\u8bf7\u6c42\uff0cslurmd\u5224\u65ad\u6536\u5230\u7684\u8bf7\u6c42\u4f5c\u4e1a\u662f\u5426\u5408\u6cd5\uff0c\u7136\u540e\u56de\u590dsrun\u3002\u6bcf\u4e00\u4e2aslurmd\u8c03\u7528\u4e00\u4e2a\u4f5c\u4e1a\u7ebf\u7a0b\u6765\u5904\u7406\u8bf7\u6c42\uff0c\u5bf9\u6bcf\u4e00\u4e2a\u8bf7\u6c42\u8fd4\u56de\u4e00\u4e2a\u4efb\u52a1\u7ebf\u7a0b\uff0c\u4efb\u52a1\u7ebf\u7a0b\u8fde\u63a5srun\u4e3b\u673a\u7684\u7aef\u53e3\u6765\u51c6\u5907stdout\u548cstderr\u7ebf\u7a0b\u3002\u4e00\u65e6\u6b64\u8fde\u63a5\u6210\u529f\uff0c\u4efb\u52a1\u7ebf\u7a0b\u4fbf\u5f00\u59cb\u521d\u59cb\u5316\u7528\u6237\u5728\u8ba1\u7b97\u8282\u70b9\u4e0a\u7684\u8fd0\u884c\u73af\u5883\uff0c\u5de5\u4f5c\u76ee\u5f55\u548c\u6240\u9700\u8d44\u6e90\u7b49\u3002\u4e00\u65e6\u7528\u6237\u8fdb\u7a0b\u9000\u51fa\uff0c\u4efb\u52a1\u7ebf\u7a0b\u4fbf\u8bb0\u5f55\u9000\u51fa\u65f6\u72b6\u6001\u7136\u540e\u53d1\u9001\u4efb\u52a1\u7ed3\u675f\u4fe1\u606f\u7ed9srun\uff0c\u5f53\u6240\u6709\u7684\u8fdb\u7a0b\u7ed3\u675f\uff0c\u4f5c\u4e1a\u7ebf\u7a0b\u4fbf\u9000\u51fa\u3002\u5f53\u6240\u6709\u4efb\u52a1\u5b8c\u6210\uff0csrun\u4fbf\u5411slurmctld\u53d1\u9001\u4fe1\u606f\u91ca\u653e\u8d44\u6e90\u3002\u5f53slurmctld\u786e\u8ba4srun\u4e0d\u5728\u9700\u8981\u8d44\u6e90\uff0c\u4fbf\u5411slurmd\u53d1\u9001\u6267\u884cepilog\u547d\u4ee4\u3002Slurmd\u5411slurmctld\u53d1\u9001epilog\u8fd0\u884c\u6210\u529f\u4fe1\u606f\u540e\uff0c\u6240\u6709\u8d44\u6e90\u624d\u4f1a\u88ab\u5f52\u8fd8\u5230\u5206\u533a\u4e2d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.2.2 Batch Mode<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic4.zhimg.com\/80\/v2-64cd700bd80e9f424dc132a40f8efb2f_720w.jpg\" alt=\"\"\/><figcaption>\u56fe3.3 batch mode<\/figcaption><\/figure>\n\n\n\n<p>\u5982\u56fe3.3\u6240\u793a\uff0c\u4e00\u65e6batch\u4f5c\u4e1a\u63d0\u4ea4\uff0csrun\u7ed9slurmctld\u53d1\u9001\u4e00\u4e2abatch\u4f5c\u4e1a\u8bf7\u6c42\uff0c\u8be5\u8bf7\u6c42\u5305\u542b\u4f5c\u4e1ainput\/output\u7684\u4f4d\u7f6e\uff0c\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u73af\u5883\uff0c\u8bf7\u6c42\u7684\u8282\u70b9\u6570\u3002Slurmctld\u5c06\u6240\u6709\u7684\u8bf7\u6c42\u6309\u7167\u67d0\u79cd\u4f18\u5148\u7ea7\u961f\u5217\u89c4\u5219\u5bf9\u4ed6\u4eec\u8fdb\u884c\u6392\u5e8f\u3002\u4e00\u65e6\u8d44\u6e90\u6ee1\u8db3\u5e76\u4e14\u4f5c\u4e1a\u4f18\u5148\u7ea7\u5f53\u524d\u53ef\u4ee5\u6267\u884c\uff0cslurm central daemon\u5c06\u7ed9\u8be5\u4f5c\u4e1a\u5206\u914d\u8d44\u6e90\u5e76\u4e14\u544a\u8bc9\u7b2c\u4e00\u4e2a\u88ab\u5206\u914d\u7684\u8282\u70b9\u8be5\u4f5c\u4e1a\u53ef\u4ee5\u5f00\u59cb\u6267\u884c\u3002\u6b64\u65f6\u4f5c\u4e1a\u4e3a\u4e00\u4e2a\u5305\u542b\u591a\u4e2asrun\u547d\u4ee4\u7684\u4f5c\u4e1a\u811a\u672c\u3002\u8ba1\u7b97\u8282\u70b9\u4e0a\u7684slurmd\u5e94\u7b54slurmctld\u7684\u8fd0\u884c\u4f5c\u4e1a\u8bf7\u6c42\u3001\u521d\u59cb\u5316\u4f5c\u4e1a\u7ebf\u7a0b\u3001\u4efb\u52a1\u7ebf\u7a0b\u3002\u811a\u672c\u4e2d\u7684srun\u8fdb\u7a0b\u68c0\u6d4b\u5230\u5206\u914d\u7ed9\u5b83\u7684\u8d44\u6e90\uff0c\u7136\u540e\u5f00\u59cb\u521d\u59cb\u5316\u4f5c\u4e1a\u6b65\uff0c\u51c6\u5907\u6267\u884c\u3002\u5f53\u4f5c\u4e1a\u6b65\u6267\u884c\u5b8c\u6bd5\uff0c\u811a\u672c\u4e2d\u7684srun\u8fdb\u7a0b\u901a\u77e5slurmctld\u5e76\u7ec8\u6b62\u6267\u884c\u3002\u800c\u4f5c\u4e1a\u811a\u672c\u6b64\u65f6\u7ee7\u7eed\u6267\u884c\u4e0b\u4e00\u6761srun\u8fdb\u7a0b\u3002\u4e00\u65e6\u4f5c\u4e1a\u811a\u672c\u6267\u884c\u5b8c\u6bd5\uff0c\u8fd0\u884c\u8be5\u811a\u672c\u7684\u4efb\u52a1\u7ebf\u7a0b\u4fbf\u6536\u96c6\u9000\u51fa\u72b6\u6001\uff0c\u5c06\u4efb\u52a1\u9000\u51fa\u4fe1\u606f\u53d1\u9001\u7ed9slurm central daemon\uff0cslurm central daemon\u6ce8\u610f\u5230\u4f5c\u4e1a\u6267\u884c\u5b8c\u6bd5\uff0c\u8981\u6c42\u6240\u6709\u5206\u914d\u7684\u8282\u70b9\u6267\u884cepilog\u7a0b\u5e8f\u3002\u5f53\u6240\u6709slurmd\u56de\u5e94\u6210\u529f\u6267\u884c\u5b8c\u6bd5epilog\u540e\uff0c\u8282\u70b9\u624d\u4f1a\u88ab\u5f52\u8fd8\u7ed9\u4f5c\u4e1a\u5206\u533a\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.2.3 Allocate Mode<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/pic2.zhimg.com\/80\/v2-475fb499d6ca5dca466bb48927d635e5_720w.jpg\" alt=\"\"\/><figcaption>\u56fe3.4 allocate mode<\/figcaption><\/figure>\n\n\n\n<p>\u5982\u56fe3.4\u6240\u793a\uff0c\u5728\u6b64\u6a21\u5f0f\u4e2d\uff0c\u7528\u6237\u5e0c\u671b\u80fd\u7533\u8bf7\u8d44\u6e90\uff0c\u4ea4\u4e92\u5f0f\u5730\u5728\u8d44\u6e90\u4e0a\u8fd0\u884c\u4efb\u52a1\u3002Srun\u7ed9slurmctld\u53d1\u9001\u4e00\u4e2a\u5206\u914d\u8bf7\u6c42\uff0c\u5982\u679c\u8d44\u6e90\u53ef\u5206\u914d\uff0c\u5219slurmctld\u5e94\u7b54srun\u3002Srun\u5728\u7528\u6237\u7ec8\u7aef\u4ea7\u751f\u4e00\u4e2ashell\u4ee5\u4fbf\u5176\u4f7f\u7528\u8d44\u6e90\u3002shell\u9000\u51fa\uff0c\u5219\u8ba4\u5b9a\u4f5c\u4e1a\u6267\u884c\u5b8c\u6bd5\u3002Shell\u4e2d\u7684srun\u8bfb\u53d6\u73af\u5883\u53d8\u91cf\u548c\u7528\u6237\u547d\u4ee4\uff0c\u5e76\u901a\u77e5slurmctld\uff0c\u6b64\u65f6\u6267\u884c\u7684\u4f5c\u4e1a\u4e3a\u5f53\u524d\u4f5c\u4e1a\u4e0b\u7684\u4e00\u4e2a\u4f5c\u4e1a\u6b65\u3002Slurmctld\u8bb0\u5f55\u4f5c\u4e1a\u6b65\u4fe1\u606f\u5e76\u8fd4\u56de\u4e00\u4e2a\u4f5c\u4e1a\u8ba4\u8bc1\u3002\u63a5\u4e0b\u6765Srun\u7528\u548c\u4ea4\u4e92\u6a21\u5f0f\u76f8\u540c\u7684\u65b9\u6cd5\u6765\u521d\u59cb\u5316\u4f5c\u4e1a\u6b65\u3002\u5f53\u7528\u6237\u9000\u51fashell\uff0c\u539f\u59cb\u7684srun\u63a5\u6536\u5230\u9000\u51fa\u72b6\u6001\u4fe1\u606f\uff0c\u901a\u77e5slurmctld\u4f5c\u4e1a\u5df2\u5b8c\u6210\uff0c\u5e76\u9000\u51fa\u3002Slurm central daemon\u5728\u6bcf\u4e00\u4e2a\u88ab\u5206\u914d\u8282\u70b9\u4e0a\u8fd0\u884cepilog\u7a0b\u5e8f\uff0c\u5f53\u6240\u6709\u88ab\u5206\u914d\u8282\u70b9\u8fd0\u884c\u5b8c\u6bd5\u8be5\u7a0b\u5e8f\uff0c\u8282\u70b9\u624d\u4f1a\u88ab\u653e\u56de\u5206\u533a\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u4e3b\u8981\u53c2\u8003\uff1a<\/p>\n\n\n\n<p>1.<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/slurm.schedmd.com\/quickstart.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/slurm.schedmd.com\/quickstart.html<\/a><\/p>\n\n\n\n<p>2.<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/slurm.schedmd.com\/slurmctld.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/slurm.schedmd.com\/slurmctld.html<\/a><\/p>\n\n\n\n<p>3.<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/slurm.schedmd.com\/slurmd.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/slurm.schedmd.com\/slurmd.html<\/a><\/p>\n\n\n\n<p>4.Andy B. Yoo, Morris A. Jette, Mark Grondona SLURM: Simple Linux Utility for Resource Management. JSSPP 2003: 44-60.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7eb2\u8981\uff1a\u672c\u6587\u4ecb\u7ecdslurm\u4e4b\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a Slurm \u6982\u8ff0 Slurm \u67b6\u6784 Slurm \u63d0\u4ea4\u4f5c\u4e1a\u6a21\u5f0f\u4e0e\u539f\u7406  &#8230; <a title=\"HPC Resolution \u4e4b Slurm\" class=\"read-more\" href=\"https:\/\/airy.cn\/WordPress\/?p=592\" aria-label=\"\u9605\u8bfb HPC Resolution \u4e4b Slurm\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-592","post","type-post","status-publish","format-standard","hentry","category-airy-tech"],"_links":{"self":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=592"}],"version-history":[{"count":2,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/592\/revisions"}],"predecessor-version":[{"id":594,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/592\/revisions\/594"}],"wp:attachment":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}