この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
fortran:ifort [2014/10/10 12:52] goto |
fortran:ifort [2017/10/03 12:55] (現在) |
||
---|---|---|---|
ライン 69: | ライン 69: | ||
ifort sample.f90 -mkl | ifort sample.f90 -mkl | ||
</code> | </code> | ||
+ | ====== CSRへの変換 ====== | ||
+ | pardisoはCSRフォーマットを用いるが,coordinateフォーマットから変換するサブルーチンが用意されている. | ||
+ | https://software.intel.com/en-us/node/468628 | ||
+ | |||
+ | フォーマットについてはこちらから. | ||
+ | |||
+ | https://software.intel.com/en-us/node/471374 | ||
+ | |||
+ | Fortranの場合,job(1:8)に与える数値は以下の通りで(だいたい)OK. | ||
+ | |job(1)=1|the matrix in the coordinate format is converted to the CSR format.| | ||
+ | |job(2)=1|one-based indexing for the matrix in CSR format is used.| | ||
+ | |job(3)=1|one-based indexing for the matrix in coordinate format is used.| | ||
+ | |job(4)|特に設定不要| | ||
+ | |job(5)=nnz| sets number of the non-zero elements of the matrix A if job(1)=1.| | ||
+ | |job(6)=0| all arrays acsr, ja, ia are filled in for the output storage.| | ||
+ | |||
+ | <code fortran> | ||
+ | |||
+ | </code> | ||
+ | ====== pardiso の使い方====== | ||
+ | pardisoを用いた連立一時方程式の解き方. | ||
+ | |||
+ | スパコンの | ||
+ | <code> | ||
+ | /opt/app/intel/composer_xe_2013.5.192/mkl/examples/solverf/source/ | ||
+ | </code> | ||
+ | に入っているサンプルデータを参考に,走らせたいプログラムを作成する. | ||
+ | include文が大事. | ||
+ | 自分のプログラムに | ||
+ | <code fortran> | ||
+ | include 'mkl_pardiso.f77' | ||
+ | </code> | ||
+ | か | ||
+ | <code fortran> | ||
+ | include 'mkl_pardiso.f90' | ||
+ | </code> | ||
+ | を入れる. | ||
+ | |||
+ | 配列の設定に注意が必要,詳しくは以下を参照 | ||
+ | [http://www.pardiso-project.org/manual/manual.pdf] | ||
+ | |||
+ | |||
+ | コンパイラオプションは | ||
+ | <code> | ||
+ | -mkl | ||
+ | </code> | ||
+ | でお手軽♪ |