{"id":6144,"date":"2022-06-15T17:45:58","date_gmt":"2022-06-15T14:45:58","guid":{"rendered":"https:\/\/hpc-education.unn.ru\/?page_id=6144"},"modified":"2022-06-16T16:09:51","modified_gmt":"2022-06-16T13:09:51","slug":"%d1%80%d0%b0%d0%b7%d0%b4%d0%b5%d0%bb%d1%8f%d0%b5%d0%bc%d0%b0%d1%8f-%d0%bf%d0%b0%d0%bc%d1%8f%d1%82%d1%8c-%d1%80%d0%b0%d0%b7%d0%b4%d0%b5%d0%bb-gpu","status":"publish","type":"page","link":"https:\/\/hpc-education.unn.ru\/ru\/%d1%80%d0%b5%d1%81%d1%83%d1%80%d1%81%d1%8b\/%d0%b8%d0%bd%d1%81%d1%82%d1%80%d1%83%d0%ba%d1%86%d0%b8%d1%8f\/%d1%80%d0%b0%d0%b7%d0%b4%d0%b5%d0%bb%d1%8f%d0%b5%d0%bc%d0%b0%d1%8f-%d0%bf%d0%b0%d0%bc%d1%8f%d1%82%d1%8c-%d1%80%d0%b0%d0%b7%d0%b4%d0%b5%d0%bb-gpu","title":{"rendered":"\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 OpenMP\/TBB\/OpenCL\/oneAPI\/&#8230;) \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;gpu&#187;"},"content":{"rendered":"<h2>\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C\/\u0421++<\/h2>\n<p>\u041d\u0430 \u0441\u0443\u043f\u0435\u0440\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f gcc 4.8.5, \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c.<\/p>\n<pre>user@master ~$ module load gcc-9.4.0 # \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f gcc 9.4.0\r\nuser@master ~$ module load intel2017 # \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f icc 17.0.0 \r\nuser@master ~$ module load compiler\/2022.0.2 # \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f icpc (ICC) 2021.5.0 (\u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 oneAPI)<\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0443 \u0432\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<pre>user@master ~$ echo '#include &lt;stdio.h&gt;\r\nint main() {\r\n&nbsp;&nbsp; &nbsp;printf(\"Hello World!\\n\");\r\n&nbsp; &nbsp; return 0;\r\n}' &gt;hello.c\r\nuser@master ~$ cc -o hello_gcc_4.8.5 hello.c # \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0438\u043b\u0438\r\nuser@master ~$ icc -o hello_icc_17.0.0 # &nbsp;\u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c load intel2017<\/pre>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c Slurm<\/h2>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<pre>user@master ~$ srun -N 1 -p gpu -t 10 .\/hello_gcc_4.8.5 # \u041f\u0440\u0438\u043c\u0435\u0440 \u21161\r\nHello World!\r\nuser@master ~$ srun -N 1 -p gpu -t 5 \/home\/user\/hello_icc_17.0.0 # \u041f\u0440\u0438\u043c\u0435\u0440 \u21162\r\nHello World!<\/pre>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0439:<\/p>\n<pre>user@master ~$ echo '#!\/bin\/sh\r\n#SBATCH --time=10\r\n#SBATCH --partition=gpu\r\n.\/hello_gcc_4.8.5' &gt;batch_hello_gcc_4.8.5.sh\r\nuser@master ~$ sbatch -N 1 batch_hello_gcc_4.8.5.sh\r\nSubmitted batch job 2420505<\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f (time, partition, N etc) \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a \u0432 \u0444\u0430\u0439\u043b\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 sbatch. \u041d\u043e\u043c\u0435\u0440 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u044b slurm-JOBID.out \u0438&nbsp;slurm-JOBID.err (\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438).<\/p>\n<pre>user@master ~$ scontrol show job 2420505\r\nJobId=2420505 JobName=batch_hello_gcc_4.8.5.sh\r\nUserId=user(userid) GroupId=Users(10000) MCS_label=N\/A\r\nPriority=1052937772 Nice=0 Account=user QOS=normal\r\nJobState=PENDING Reason=None Dependency=(null)\r\nRequeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0\r\nRunTime=00:00:00 TimeLimit=00:10:00 TimeMin=N\/A\r\n...\r\nuser@master ~$ cat slurm-2420505.out\r\nHello World!<\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0435\u0435 \u0441\u0431\u043e\u0440\u043a\u0435.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C\/\u0421++ \u041d\u0430 \u0441\u0443\u043f\u0435\u0440\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f gcc 4.8.5, \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c. user@master ~$ module load gcc-9.4.0 # \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f gcc 9.4.0 user@master ~$ module load intel2017 # &hellip; <a href=\"https:\/\/hpc-education.unn.ru\/ru\/%d1%80%d0%b5%d1%81%d1%83%d1%80%d1%81%d1%8b\/%d0%b8%d0%bd%d1%81%d1%82%d1%80%d1%83%d0%ba%d1%86%d0%b8%d1%8f\/%d1%80%d0%b0%d0%b7%d0%b4%d0%b5%d0%bb%d1%8f%d0%b5%d0%bc%d0%b0%d1%8f-%d0%bf%d0%b0%d0%bc%d1%8f%d1%82%d1%8c-%d1%80%d0%b0%d0%b7%d0%b4%d0%b5%d0%bb-gpu\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":40,"featured_media":0,"parent":6126,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0},"_links":{"self":[{"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/pages\/6144"}],"collection":[{"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/comments?post=6144"}],"version-history":[{"count":2,"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/pages\/6144\/revisions"}],"predecessor-version":[{"id":6169,"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/pages\/6144\/revisions\/6169"}],"up":[{"embeddable":true,"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/pages\/6126"}],"wp:attachment":[{"href":"https:\/\/hpc-education.unn.ru\/ru\/wp-json\/wp\/v2\/media?parent=6144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}