{"id":395,"date":"2023-02-09T12:29:35","date_gmt":"2023-02-09T04:29:35","guid":{"rendered":"https:\/\/lehuo1999.top\/?p=395"},"modified":"2024-12-01T20:06:01","modified_gmt":"2024-12-01T12:06:01","slug":"wsl2-%e7%bc%96%e8%af%91lammps-with-gpu","status":"publish","type":"post","link":"https:\/\/my-matlab.com\/index.php\/2023\/02\/09\/wsl2-%e7%bc%96%e8%af%91lammps-with-gpu\/","title":{"rendered":"WSL2 \u7f16\u8bd1LAMMPS with GPU"},"content":{"rendered":"<h2>1\u3001\u51c6\u5907\u5de5\u4f5c<\/h2>\n<p>Win10\u7cfb\u7edf\u4e0b\u5b89\u88c5WSL2 ubuntu<u>2204<\/u><\/p>\n<p>\u5728ubuntu\u5185\u5b89\u88c5cuda\u9a71\u52a8<\/p>\n<pre class=\"prettyprint linenums\">wget https:\/\/developer.download.nvidia.com\/compute\/cuda\/repos\/ubuntu2204\/x86_64\/cuda-keyring_1.0-1_all.deb\r\nsudo dpkg -i cuda-keyring_1.0-1_all.deb\r\n<\/pre>\n<p>\u5b89\u88c511.8\u7248\u672c\u9a71\u52a8<\/p>\n<pre class=\"prettyprint linenums\">sudo apt-get update\r\nsudo apt-get install cuda-toolkit-11-8\r\n<\/pre>\n<p>\u6709\u95ee\u9898\u53ef\u53c2\u8003Nvidai\u5b98\u65b9\u8d44\u6599<br \/>\n<a class=\"dl\" href=\"https:\/\/docs.nvidia.com\/cuda\/cuda-installation-guide-linux\/index.html#ubuntu\" target=\"_blank\" rel=\"nofollow\"><i class=\"fa fa-external-link\"><\/i>navidia\u5b98\u65b9\u8d44\u6599<\/a><\/p>\n<p>\u9a71\u52a8\u5b89\u88c5\u6210\u529f\u540e\uff0cubuntu\u7ec8\u7aef\u8f93\u5165nvidia-smi<\/p>\n<pre class=\"prettyprint linenums\">nvidia-smi\r\n<\/pre>\n<p>\u53ef\u4ee5\u770b\u5230gpu\u4fe1\u606f\u5219\u8868\u793acuda\u5b89\u88c5\u6210\u529f<br \/>\n<a href=\"https:\/\/my-matlab.com\/wp-content\/uploads\/2023\/02\/2023020904462040.png\" rel=\"box\" class=\"fancybox\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"512\" class=\"aligncenter size-full wp-image-401\" src=\"https:\/\/my-matlab.com\/wp-content\/uploads\/2023\/02\/2023020904462040.png\" alt=\"\" \/><\/a><\/p>\n<h2>2\u3001\u7f16\u8bd1lammps<\/h2>\n<pre class=\"prettyprint linenums\">cmake -C ..\/cmake\/presets\/most.cmake -D BUILD_MPI=yes -D PKG_GPU=on -D GPU_API=cuda -D GPU_ARCH=sm_86 -D BIN2C=\/usr\/local\/cuda-11.8\/bin\/bin2c ..\/cmake\r\nmake\r\n<\/pre>\n<p>LATTE<\/p>\n<pre class=\"prettyprint linenums\">cmake -C ..\/cmake\/presets\/most.cmake -D BUILD_MPI=yes -D PKG_GPU=on -D GPU_API=cuda -D GPU_ARCH=sm_86 -D BIN2C=\/usr\/local\/cuda-11.8\/bin\/bin2c -D PKG_LATTE=yes -D DOWNLOAD_LATTE=yes -D USE_INTERNAL_LINALG=on ..\/cmake\r\nmake\r\n\r\ncmake -C ..\/cmake\/presets\/most.cmake -C ..\/cmake\/presets\/oneapi.cmake -D LAMMPS_MACHINE=intel -D PKG_OPENMP=yes ..\/cmake\r\n\r\n<\/pre>\n<h2>\u53c2\u8003\u4fe1\u606f<\/h2>\n<p>\u663e\u5361CUDA\u76f8\u5173\u4fe1\u606f<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/CUDA\" rel=\"nofollow\">https:\/\/en.wikipedia.org\/wiki\/CUDA<\/a><\/p>\n<h3>\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef<\/h3>\n<pre class=\"prettyprint linenums\">Cuda driver error 1 in call at file \u2018geryon\/nvd_kernel.h\u2019 in line 338.<\/pre>\n<p>Cuda\u7248\u672c\u4e0d\u517c\u5bb9\uff0c\u8c03\u6574cuda\u7248\u672c<br \/>\n\u5b9e\u6d4b3080\u5b89\u88c511.8\u53ef\u6b63\u5e38\u8fd0\u884c<\/p>\n<blockquote><p><a href=\"https:\/\/matsci.org\/t\/cuda-driver-error-1-in-call-at-file-geryon-nvd-kernel-h-in-line-338\/46644\" rel=\"nofollow\">https:\/\/matsci.org\/t\/cuda-driver-error-1-in-call-at-file-geryon-nvd-kernel-h-in-line-338\/46644<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u51c6\u5907\u5de5\u4f5c Win10\u7cfb\u7edf\u4e0b\u5b89\u88c5WSL2 ubuntu2204 \u5728ubuntu\u5185\u5b89\u88c5cuda\u9a71\u52a8 wget  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[13,14,12],"class_list":["post-395","post","type-post","status-publish","format-standard","hentry","category-lammps","tag-lammps","tag-14","tag-12"],"_links":{"self":[{"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":26,"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":552,"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions\/552"}],"wp:attachment":[{"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/my-matlab.com\/index.php\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}