Navigation : Top/Intel C++ and Fortan for Linux
[[Programing]]

* Install [#w35497ab]

** Installの前に [#m279b73a]
webで登録し,シリアル番号を頂く.その後,登録したメールアドレスにライセンスファイルが送られてくる.
- シリアル番号
- ライセンスファイル

** 手順 [#y6e2c33b]

遅ればせながらIntel Compilerを入れる。
+ www.intel.comで名前を登録し、メールが送られて来るのを待つ。
+ 添付メールを/opt/intel/licensesの下に保存
+ 添付メールにあるアドレスからファイルをダウンロード
+ ファイルを伸張する。
+ ./install.shを実行
+ 後は、指示に従うだけ。

** Ubuntu 12.10 [#p2b9061e]
特に特別な設定はない.
- 以下のライブラリーが必要
-- zlib

** Ubuntu 10.4 [#k7b8d763]
Ubuntu9.10からlibstdc++のバージョンが6にあがり、Intel Compilerが必要とするlibstd++5がなくなった.これは困った.
*** Step 1 [#ob3ea9ed]
- apt-get install g++
*** Step 2 [#b3ea5475]
- 以下の2つをダウンロード.細かいバージョンは問わない.
-- libstdc++5_3.3.6-18_amd64.deb
-- libstdc++5_3.3.6-18_i386.deb
- 64bitのlibraryを入れる.
 dpkg -i libstdc++5_3.3.6-18_amd64.deb
- 32bitの方も入れる.こっちは/usr/lib32に入れたいので,手で解凍して移動.
 dpkg --extract libstdc++5_3.3.6-18_i386.deb  ./
 cd usr/lib
 cp libstdc++.so.5.0.7 /usr/lib32
 cd /usr/lib32
 ln -s libstdc++.so.5.0.7 libstdc++.so.5
*** Step 3 [#p322a994]
- l_cproc_p_xxx, l_cprof_p_xxxのinstall.shを実行
- glibcが無いといわれるが無視してインストールを進める.


** 参照 [#z4df66d2]
- http://software.intel.com/en-us/articles/using-intel-compilers-for-linux-with-ubuntu/




* 設定 [#mb8d0164]
** 一般 [#s2b9063e]
*** /opt/intel/composer_xe_2013.1.117 [#h19f65ca]
-csh/tcsh の場合:
 $ source install-dir/bin/compilervars.csh intel64
-bash の場合:
 $ source install-dir/bin/compilervars.sh intel64
-コンパイラーの起動コマンドは次の通りです。
 C++ の場合: icpc
 C の場合: icc
*** /opt/intel/composer_xe_2013.1.117 [#hb48af15]
- 次のいずれかの方法で、ターミナルウィンドウの環境変数を設定してください。
--"intel64" を "ia32"
-csh/tcsh の場合:
 source install-dir/bin/compilervars.csh intel64
-bash の場合:
 source install-dir/bin/compilervars.sh intel64
- コンパイラーの起動コマンドは次の通りです。
 Fortran の場合: ifort
- ヘルプは、-help オプションまたは man コマンドを使用して表示します。
- 次のファイルにドキュメントの一覧があります。
-- install-dir/Documentation/en_US/get_started_lf.htm


** 直接書く場合のサンプル [#yea37cfd]
***.tcshrc [#h4b8a35d]
 # intel C and Fortran Version 7.1
 setenv   IA32ROOT        '/opt/intel/compiler70/ia32/bin'
 setenv   FC                  $IA32ROOT/ifc
 setenv   FC90              $IA32ROOT/ifc
 setenv   CC                 $IA32ROOT/icc
 setenv   CXX                $IA32ROOT/icc
 setenv   CPPFLAGS        '-DNAGf90Fortran'
 setenv   INTEL_FLEXLM_LICENSE /opt/intel/licenses/
 set      path = ( $path $IA32ROOT/bin )
 set      LIBRARY_PATH = ( $LD_LIBRARY_PATH $IA32ROOT/lib )

*** 参考 [#p677f897]
- [[Compiler Option:http://sauron.urban.eng.osaka-cu.ac.jp/~mori/computer/manual_program/guide_intelcompiler.pdf]]