{"id":576,"date":"2013-04-16T22:35:01","date_gmt":"2013-04-16T14:35:01","guid":{"rendered":"http:\/\/systemsci.org\/jinshanw\/?p=576"},"modified":"2013-04-16T22:35:01","modified_gmt":"2013-04-16T14:35:01","slug":"amd%e6%95%b0%e5%ad%a6%e6%a0%b8%e5%bf%83%e5%ba%93acml%e7%9a%84%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.systemsci.org\/jinshanw\/2013\/04\/16\/amd%e6%95%b0%e5%ad%a6%e6%a0%b8%e5%bf%83%e5%ba%93acml%e7%9a%84%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8\/","title":{"rendered":"AMD\u6570\u5b66\u6838\u5fc3\u5e93acml\u7684\u5b89\u88c5\u4f7f\u7528"},"content":{"rendered":"<p>\u7531\u4e8e\u9700\u8981\u5728\u5171\u4eab\u5185\u5b58\u673a\u5668\u4e0a\u5b9e\u73b0Lapack+openmp\uff0c\u5b89\u88c5acml\uff08Intel\u00ae MKL\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4e0d\u8fc7\u8003\u8651\u5230\u670d\u52a1\u5668\u4f7f\u7528\u7684\u662fAMD\u591a\u6838\u5fc3CPU\u5c31\u7528acml\u4e86)\u3002acml\u5305\u542bBLAS, Lapack, FFT, RNG\u56db\u4e2a\u90e8\u5206\uff0c\u5185\u5efa\u4e86openmp\uff0c\u4e5f\u5c31\u662f\u8bf4\u4e0d\u7528\u624b\u52a8\u63a7\u5236\u591a\u7ebf\u7a0b\u548c\u591a\u4efb\u52a1\u3002\u5728\u8fd0\u7528acml\u7684\u7a0b\u5e8f\u4e2d\uff0c\u53ea\u9700\u8981\u5728\u8fd0\u884c\u7684\u65f6\u5019\u8bbe\u7f6eOMP_NUM_THREADS=n\uff08\u4f8b\u5982export OMP_NUM_THREADS=n\uff09\u5c31\u4f1a\u4ee5n\u7ebf\u7a0b\u8fd0\u884c\u3002<\/p>\n<p>\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u548c\u7f16\u8bd1\u5668\uff0c\u9009\u62e9\u7684acml\u7248\u672c\uff0c\u76ee\u524d\u5b89\u88c5\u7684\u7248\u672c\u662facml_gfortran_64bit_fma4_mp_int64\u7528\u4e8egcc\/gfortran\u7f16\u8bd1\u5668\uff0cacml_open64_64_fma4_mp_int64\u7528\u4e8eopen64\u7f16\u8bd1\u5668\u3002<\/p>\n<p>\u5b89\u88c5\u76ee\u5f55\/opt\/acml\u3002<\/p>\n<p>\u7f16\u8bd1\u65b9\u5f0f\uff1agfortran -fopenmp -m64 test.f -L\/opt\/acml\/gfortran64_fma4_mp_int64\/lib -static -lacml_mp -lrt<br \/>\ngcc\u9700\u8981\u52a0\u4e0a-I, -lgfortran\u53c2\u6570\u3002<br \/>\nopenf95 -mp test.f -L\/opt\/acml\/open64_64_fma4_mp_int64\/lib -lacml_mp<br \/>\nopencc\u9700\u8981\u52a0\u4e0a-I\uff0c-lfortran\u53c2\u6570<br \/>\n\u5982\u679c\u4f7f\u7528\u52a8\u6001\u94fe\u63a5\u5e93so\u5e93\u6587\u4ef6\u800c\u4e0d\u662fa\u5e93\u6587\u4ef6\uff0c\u9700\u8981<br \/>\nexport LD_LIBRARY_PATH=open64_64_fma4_mp_int64\/lib:$LD_LIBRARY_PATH<\/p>\n<p>gcc\uff08gfortran\uff09\u662f\u4e00\u4e2a\u597d\u7684\u9009\u62e9\u3002<\/p>\n<p>\u5982\u679c\u4e00\u5b9a\u8981\u4f7f\u7528open64\u7684\u8bdd\uff0c\u9700\u8981\u505a\u4ee5\u4e0bopen64\u7684\u8def\u5f84\u8bbe\u7f6e\uff1a<br \/>\n\u5728\u4e2a\u4eba\u7528\u6237.profile\uff0c\u6216\u8005\/etc\/profile\u6587\u4ef6\u6dfb\u52a0\uff1a<br \/>\nAMDSDK_ROOT=\/opt\/amdsdk\/v1.0<br \/>\nCodeAnalyst=\/opt\/CodeAnalyst<br \/>\nexport  PATH=$AMDSDK_ROOT\/x86_open64-4.2.4\/bin:$PATH<br \/>\nexport  PATH=$CodeAnalyst\/bin:$PATH<\/p>\n<p>\u7531\u4e8eopen64\u7684\u90e8\u5206\u6838\u5fc3\u662f32\u4f4d\u7684\uff0c\u5fc5\u987b\u5b89\u88c5i386\u7684\u5e93\uff1asudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386<br \/>\n\u7136\u540e\u5efa\u7acblib64\u7684\u7b26\u53f7\u94fe\u63a5\uff1asudo ln -s \/usr\/lib\/x86_64-linux-gnu \/usr\/lib64<br \/>\n\u6ce8\u610f\uff0c\u4fee\u6539\u7684\u8def\u5f84\u5728sudo\u4e0b\u4e0d\u80fd\u8bc6\u522b\uff0c\u5fc5\u987b\u7528 sudo su &#8211; \u6a21\u62df\u4e00\u4e2a\u6709\u901a\u5e38\u8def\u5f84\u7684sudo\u7528\u6237\u3002<br \/>\n\uff08AMD\u7684open64\u8fd8\u662f\u505a\u7684\u4e0d\u591f\u597d\uff01\u96be\u9053\u5c31\u4e0d\u80fd\u5b8c\u516864bit\uff1f\uff09<\/p>\n<p>fma4\u5728Intel CPU\u4e0a\u4f1a\u51fa\u9519\uff0c\u56e0\u6b64\u5728Intel CPU\u4e0a\u7528acml_gfortran_mp\u5c31\u53ef\u4ee5\u3002\u5f53\u7136\uff0c\u8fd9\u79cd\u60c5\u51b5\u7528Intel\u00ae MKL\u66f4\u597d\u3002<\/p>\n<p>\u6211\u4f1a\u7f16\u8f91\u4e00\u4e2agcc\u7684\u548copen64\u7684Makefile\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u9700\u8981\u5728\u5171\u4eab\u5185\u5b58\u673a\u5668\u4e0a\u5b9e\u73b0Lapack+openmp\uff0c\u5b89\u88c5acml\uff08Intel\u00ae MKL\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4e0d\u8fc7\u8003\u8651 &hellip; <a href=\"https:\/\/www.systemsci.org\/jinshanw\/2013\/04\/16\/amd%e6%95%b0%e5%ad%a6%e6%a0%b8%e5%bf%83%e5%ba%93acml%e7%9a%84%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cAMD\u6570\u5b66\u6838\u5fc3\u5e93acml\u7684\u5b89\u88c5\u4f7f\u7528\u201d<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/posts\/576"}],"collection":[{"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":0,"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemsci.org\/jinshanw\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}