{"id":614,"date":"2016-11-02T16:52:35","date_gmt":"2016-11-02T07:52:35","guid":{"rendered":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/?p=614"},"modified":"2019-10-29T11:42:18","modified_gmt":"2019-10-29T02:42:18","slug":"gpu%e5%af%be%e5%bf%9cgromacs%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/2016\/11\/02\/gpu%e5%af%be%e5%bf%9cgromacs%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab\/","title":{"rendered":"GPU\u5bfe\u5fdcGromacs 2016\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb on macOS Sierra (OpenCL)"},"content":{"rendered":"<p>Updated on October 12, 2017.<\/p>\n<p>\u74b0\u5883: macOS Sierra 10.12.6, 3.3 GHz Intel Core i5, \u30e1\u30e2\u30ea8 GB\uff0c\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9 AMD Radeon R9 M395 2048 MB.<\/p>\n<p>Gromacs\u3067\u306f\uff0cGPU\u306bnonbonded force\u3092\u8a08\u7b97\u3055\u305b\u308b\u3053\u3068\u3067\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u9ad8\u901f\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff0eMacBook Pro\u306a\u3069\u3067\u306fGPU\u306fIntel HD Graphics \u3067GPU\u8a08\u7b97\u306b\u306f\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u304c\uff0ciMac\u306fAMD\u306eGPU\u3092\u7a4d\u3093\u3067\u3044\u308b\u306e\u3067\u5229\u7528\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\uff0e\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u7b49\u306fHomebrew\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\uff0eFFTW library for Gromacs must be compiled &#8220;<a href=\"http:\/\/www.gromacs.org\/Documentation\/Installation_Instructions_5.0#fftw\"><em>only<\/em> with &#8211;enable-sse2 (regardless of precision) even if your processors can take advantage of AVX extensions<\/a>&#8220;. So, use &#8220;bottled&#8221; Homebrew FFTW not &#8220;self-compiled&#8221; Homebrew FFTW.\u00a0If you compile fftw like &#8220;brew install fftw &#8211;with-fortran&#8221;, it enables\u00a0SSE2, AVX, and AVX2\uff0e<\/p>\n<pre class=\"command-line language-bash\"><code class=\"\" data-line=\"\">$ brew &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt; gcc cmake open-mpi boost fftw\n$ curl ftp:\/\/ftp.gromacs.org\/pub\/gromacs\/gromacs-2016.4.tar.gz -o gromacs-2016.4.tar.gz\n$ &lt;span class=&quot;token function&quot;&gt;tar&lt;\/span&gt; xvzf gromacs-2016.4.tar.gz\n$ &lt;span class=&quot;token function&quot;&gt;cd&lt;\/span&gt; gromacs-2016.4\n$ &lt;span class=&quot;token function&quot;&gt;mkdir&lt;\/span&gt; build\n$ &lt;span class=&quot;token function&quot;&gt;cd&lt;\/span&gt; build\n$ ccmake &lt;span class=&quot;token punctuation&quot;&gt;..&lt;\/span&gt; -DCMAKE_C_COMPILER&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;gcc -DCMAKE_CXX_COMPILER&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;g++<\/code><\/pre>\n \u3092\u62bc\u3057\u3066configure\u3092\u958b\u59cb\u3057\u307e\u3059\uff0e<\/p>\n<p>\u307e\u305a\uff0c\u975eGPU\u7248\u306eGromacs\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\uff0eBUILD_SHARED_LIBS\u3092OFF\u306b\uff0cBUILD_TESTING\u3092OFF\u306b\uff0cCMAKE_INSTALL_PREFIX\u306f \/opt\/gromacs-2016.4 \u306b\u3057\u307e\u3057\u305f\uff0e \u3092\u62bc\u3057\u3066\u518dconfigure\u3057\u3066\u304b\u3089\uff0c[g] \u3092\u62bc\u3057\u3066Makefile\u3092\u751f\u6210\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"command-line language-bash\"><code class=\"\" data-line=\"\">$ &lt;span class=&quot;token function&quot;&gt;make&lt;\/span&gt; -j 8\n$ &lt;span class=&quot;token function&quot;&gt;sudo&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;make&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt;<\/code><\/pre>\n<p>\u6b21\u306bGPU\u7248\u306emdrun\u30d0\u30a4\u30ca\u30ea\u3068\u95a2\u9023\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u307f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\uff0e\u540c\u3058build\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4e2d\u3067\uff0c<\/p>\n<pre class=\"command-line language-bash\"><code class=\"\" data-line=\"\">$ ccmake &lt;span class=&quot;token punctuation&quot;&gt;..&lt;\/span&gt; -DCMAKE_C_COMPILER&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;gcc-7 -DCMAKE_CXX_COMPILER&lt;span class=&quot;token operator&quot;&gt;=&lt;\/span&gt;g++-7<\/code><\/pre>\n<p>\u3092\u518d\u3073\u5b9f\u884c\u3057\uff0c\u4eca\u56de\u306fGMX_GPU\uff0cGMX_USE_OPENCL\uff0cBUILD_MDRUN_ONLY\u3092ON\u306b\u3057\u307e\u3059\uff0e \u3092\u62bc\u3057\u3066\u518dconfigure\u3057\u3066\u304b\u3089\uff0c[g] \u3092\u62bc\u3057\u3066Makefile\u3092\u751f\u6210\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"command-line language-bash\"><code class=\"\" data-line=\"\">$ &lt;span class=&quot;token function&quot;&gt;make&lt;\/span&gt; -j 8\n$ &lt;span class=&quot;token function&quot;&gt;sudo&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;make&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt;<\/code><\/pre>\n<p>\u3053\u308c\u3067\uff0cGPU\u7248\u306eMD\u5b9f\u884c\u30d0\u30a4\u30ca\u30ea (mdrun) \u7b49\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\uff0e<\/p>\n<p>GPU\u306b\u3088\u3063\u3066\u3069\u306e\u7a0b\u5ea6\u9ad8\u901f\u5316\u3055\u308c\u3066\u3044\u308b\u304b\uff0cCPU\u306e\u307f\u306e\u5834\u5408\u3068\u6bd4\u8f03\u3057\u307e\u3057\u305f\uff0e<\/p>\n<p>\u901a\u5e38\u7248\u306f &#8220;gmx mdrun&#8221;\uff0cGPU\u7248\u306f\u5358\u306b &#8220;mdrun&#8221; \u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\uff0emdrun\u3092\u5b9f\u884c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\uff0cGPU\u3067\u8a08\u7b97\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\uff0e<\/p>\n<pre class=\"prettyprint\">Running on 1 node with total 4 logical cores, 1 compatible GPU\nHardware detected:\n  CPU info:\n    Vendor: GenuineIntel\n    Brand:  Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz\n    SIMD instructions most likely to fit this hardware: AVX2_256\n    SIMD instructions selected at GROMACS compile time: AVX2_256\n  GPU info:\n    Number of GPUs detected: 1\n    #0: name: AMD Radeon R9 M395 Compute Engine, vendor: AMD, device version: OpenCL 1.2 , stat: compatible\n\nReading file nvtem.tpr, VERSION 5.1.4 (single precision)\nUsing 1 MPI thread\nUsing 4 OpenMP threads \n\n1 compatible GPU is present, with ID 0\n1 GPU auto-selected for this run.\nMapping of GPU ID to the 1 PP rank in this node: 0\n\nSelecting kernel for AMD<\/pre>\n<p>\u539f\u5b50\u65701\u4e072\u5343, 100 ps, cutoff 1.4 nm\uff1a<\/p>\n<ul>\n<li>CPU (4 cores) \u306e\u307f, 247\u79d2<\/li>\n<li>CPU (4 cores) + 1 GPU\uff0c166\u79d2\uff0cGPU\u8a08\u7b97\u6642\u9593\/CPU\u8a08\u7b97\u6642\u9593 = 3.005<\/li>\n<\/ul>\n<p>\u9ad8\u901f\u5316\u3055\u308c\u3066\u3044\u307e\u3057\u305f\uff0eCPU\u306e\u307f\u3067\u306f4 cores\u304c\u30d5\u30eb\u53ef\u52d5\u3057\u3066\u3044\u307e\u3057\u305f\u304c\uff0cGPU\u7248\u3067\u306fGPU\u306e\u8a08\u7b97\u304c\u7d42\u308f\u308b\u306e\u3092CPU\u304c\u5f85\u3063\u3066\u3044\u308b\u30d0\u30e9\u30f3\u30b9\u306e\u305f\u3081CPU\u306e\u7a3c\u50cd\u7387\u306f1\/3\u3050\u3089\u3044\u3067\u3057\u305f\uff0eAMBER\u529b\u5834\u306fvdW\u76f8\u4e92\u4f5c\u7528\u306e\u30ab\u30c3\u30c8\u30aa\u30d5\u30921.0 nm (10 \u00c5) \u3068\u3057\u3066\u30d5\u30a3\u30c3\u30c6\u30a3\u30f3\u30b0\u3055\u308c\u3066\u3044\u3066Gromacs\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30821.0 nm\u306a\u306e\u3067\uff0ccutoff\u3092 1.0 nm\u306b\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<br \/>\n\u539f\u5b50\u65701\u4e072\u5343, 100 ps, cutoff 1.0 nm\uff1a<\/p>\n<ul>\n<li>CPU (4 cores) \u306e\u307f, 140\u79d2<\/li>\n<li>CPU (4 cores) + 1 GPU\uff0c123\u79d2\uff0cGPU\u8a08\u7b97\u6642\u9593\/CPU\u8a08\u7b97\u6642\u9593 = 1.785<\/li>\n<\/ul>\n<p>GPU\/CPU\u6bd4\u306f\u6539\u5584\u3055\u308c1\u306b\u8fd1\u4ed8\u304d\u307e\u3057\u305f\u304c\uff0cCPU\u306e\u307f\u3068\u306e\u8a08\u7b97\u6642\u9593\u306e\u5dee\u304c\u7e2e\u307e\u308a\u307e\u3057\u305f\uff0e<\/p>\n<p>\u539f\u5b50\u657025\u4e07, 10 ps, cutoff 1.4 nm\uff1a<\/p>\n<ul>\n<li>CPU (4 cores) \u306e\u307f, 520\u79d2<\/li>\n<li>CPU (4 cores) + 1 GPU\uff0c285\u79d2\uff0cGPU\u8a08\u7b97\u6642\u9593\/CPU\u8a08\u7b97\u6642\u9593 = 2.686<\/li>\n<\/ul>\n<p>1.8\u500d\u901f\u3067\u3057\u305f\uff0e\u30b9\u30d4\u30fc\u30c9\u306f7.9 h\/ns\u3067\u3057\u305f\uff0e\u30b9\u30d1\u30b3\u30f3\u306eCPU 8 cores\u3067\u306f13.1 h\/ns\u3067\u3057\u305f\uff0e<\/p>\n<p>\u753b\u9762\u3092\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u3066\u3044\u308c\u3070\uff0cGPU\u8a08\u7b97\u306e\u52b9\u7387\u304c\u3055\u3089\u306b\u4e0a\u304c\u308a\u307e\u3059\uff0e<br \/>\n(\u4e86)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updated on October 12, 2017. \u74b0 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_locale":"","_original_post":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-5","ja"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"onepress-blog-small":false,"onepress-small":false,"onepress-medium":false},"uagb_author_info":{"display_name":"RCY","author_link":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/author\/charlesy\/"},"uagb_comment_info":0,"uagb_excerpt":"Updated on October 12, 2017. \u74b0 ...","_links":{"self":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/comments?post=614"}],"version-history":[{"count":22,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":1766,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/posts\/614\/revisions\/1766"}],"wp:attachment":[{"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ag.kagawa-u.ac.jp\/charlesy\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}