coLinux日記

coLinuxはフリーソフトを種として、よろずのシステムとぞなれりける。

Intel Fortran Compiler

2007-01-18 22:46:45 | コンピュータ言語
今回は、Fortran に挑戦してみます。

早速、Intel Fortran compiler (http://www.intel.com/) を試してみます。というのも、商用コンパイラでありながら、非商用の Linux 用コンパイラを提供してくれる大変ありがたいものだからです。Intel Chip ベースの共有のスーパーコンピュータを使っている場合など、coLinux でこのコンパイラが使えれば非常に役立つと思います。

非商用版の Linux 用コンパイラ Intel Fortran Compiler for Linux
l_fc_c_9.1.036_ia32.tar.gz

をインストールします。ダウンロード時に表示されたシリアルナンバーを用意します。普通にインストールすると、/opt/intel にインストールされてしまうので、あらかじめ /home の方にリンクしておきます。install.sh を実行して、質問にどんどん答えていけば簡単にインストールできるはずです。
$ cd ~/src
$ tar xvzf l_fc_c_9.1.036_ia32.tar.gz
$

# mkdir /home/intel
# cd /opt
# ln -s /home/intel intel
# cd ~espiya/src/l_fc_c_9.1.036
# ./install.sh
................
#

$ source /opt/intel/fc/9.1.036/bin/ifortvars.sh
$ ifort -help
                     Intel(R) Fortran Compiler Help
                     ==============================
.............................
Copyright (C) 1985-2006, Intel Corporation.  All rights reserved.

* Other brands and names are the property of their respective owners.
$

無事に fortran がインストールできました。
試しに、姫野ベンチ( http://accc.riken.jp/HPC/HimenoBMT/index.html)を実行してみます。
f90_xp.lzh

を実行することにします。
$ cd bench/f90_xp
$ ifort -fast himeno_BMTxp.f90
IPO: performing single-file optimizations
IPO: generating object file /tmp/ipo_ifort1KKy9n.o
himenoBMTxp.f90(315) : (col. 5) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(235) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(236) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(237) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(238) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(239) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(240) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(241) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(243) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(244) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(245) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(246) : (col. 2) remark: LOOP WAS VECTORIZED.
himenoBMTxp.f90(248) : (col. 5) remark: LOOP WAS VECTORIZED.
$ ls
a.out  bound.mod  himenoBMTxp.f90  mtrx.mod  others.mod  pres.mod  work.mod
$

うまくコンパイルできました。早速実行してみます。
$ ./a.out

Fatal Error : This program was not built to run on the processor in your 
                system.
$

うまく動きません。-fast オプションは使えないようです。

続きは次回に書きます。

コメント    この記事についてブログを書く
  • Twitterでシェアする
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« apache httpd 2.2.4 インスト... | トップ | Intel Fortran Compiler テスト »
最新の画像もっと見る

コメントを投稿

コンピュータ言語」カテゴリの最新記事