1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,162 +0,0 @@ |
1 |
-title: 'Intel oneAPI コンパイラ' |
|
2 |
-taxonomy: |
|
3 |
- category: |
|
4 |
- - docs |
|
5 |
-external_links: |
|
6 |
- process: true |
|
7 |
- no_follow: true |
|
8 |
- target: _blank |
|
9 |
- mode: active |
|
10 |
-published: false |
|
11 |
- |
|
12 |
-[toc] |
|
13 |
- |
|
14 |
-## 利用環境{#enviroment} |
|
15 |
- |
|
16 |
-### 利用できるバージョン・システム{#version} |
|
17 |
- |
|
18 |
-バージョン | モジュールファイル名 | システムB/C | システムG | クラウドシステム | 備考 |
|
19 |
-2022.3 | intel/2022.3 | + | - | + | 2022年11月導入 |
|
20 |
- |
|
21 |
-\+ : すべてのユーザが利用可能 |
|
22 |
-\- : 利用不可 |
|
23 |
- |
|
24 |
-システムB、C、クラウドでは、システムにログインした時点で、Intelコンパイラがデフォルトで設定されています。システムGではIntelコンパイラは使えません。 |
|
25 |
- |
|
26 |
-```nohighlight |
|
27 |
-$ module list |
|
28 |
-Currently Loaded Modulefiles: |
|
29 |
-x) SysB/2022 x) PrgEnvIntel/2022 x) intel/2022 |
|
30 |
-``` |
|
31 |
- |
|
32 |
-<!-- |
|
33 |
-コンパイラのバージョンは、上表に記載のデフォルトのバージョンが設定されています。 |
|
34 |
-Intelコンパイラのバージョンを切り替えたい場合は、PrgEnvIntel がロードされている状態で、以下のようにmoduleコマンドを実行してください。 |
|
35 |
- |
|
36 |
-```nohighlight |
|
37 |
-$ module switch intel/2022 intel/2019 |
|
38 |
-``` |
|
39 |
- |
|
40 |
-ログイン時に自動で環境設定を行いたい場合は、ログインシェルの起動ファイルに必要なmoduleコマンドを記述してください。詳細は [環境設定](/config) をご覧ください。 |
|
41 |
-moduleコマンドの詳細は [Modules](/config/modules) をご覧ください。 |
|
42 |
- |
|
43 |
-## コンパイル方法{#usage} |
|
44 |
- |
|
45 |
-### コマンド{#command} |
|
46 |
- |
|
47 |
-| 言語 | コマンド | 実行形式 | |
|
48 |
-| - | - | - | |
|
49 |
-| C | icx | icx [オプション] ファイル名 | |
|
50 |
-| C++ | icpx | icpx [オプション] ファイル名 | |
|
51 |
-| Fortran | ifx | ifx [オプション] ファイル名 | |
|
52 |
-<!-- |
|
53 |
-| DPC++ | dpcpp | dpcpp [オプション] ファイル名 | |
|
54 |
- |
|
55 |
- |
|
56 |
-### オプション{#option} |
|
57 |
-|オプション名 |説明| |
|
58 |
-|-|-| |
|
59 |
-|-o FILENAME |オブジェクトファイルの名前を指定します。| |
|
60 |
-|-mcmodel=medium |2Gbyteを超えてメモリを利用できるようになります。<br>※SYCLでは使用できません。| |
|
61 |
-|-shared-intel |インテルが提供するライブラリをすべて動的にリンクします。<br>指定した GPU へのオフロードを有効にするには、-fopenmp-targets を併せて使用します。 | |
|
62 |
-|-fpic |位置に依存しないコードを生成します。| |
|
63 |
-|-qopenmp |OpenMP指示子を有効にしてコンパイルします。| |
|
64 |
-|-O0/-O1/-O2/-O3 |最適化のレベルを指定します(デフォルトは-O2)。| |
|
65 |
-|-fast |プログラムの実行速度が最大になるように最適化します。-fast オプションにより、次のオプションが付与されます。<br>`-ipo, -O3, -no-prec-div, -static, -fp-model fast=2 -xHost (ifx)` <br>`-ipo, -O3, -static, -fp-model fast=2 (dpcpp, icx, icpx)`| |
|
66 |
-|-ipo |複数ファイル間で、手続き間の処理を最適化します。| |
|
67 |
-|-qopt-report |実施した最適化についての情報をYAMLで表示します。| |
|
68 |
-<!-- |
|
69 |
-(\*1) dpc++, icx, icpx, ifx で使用可 |
|
70 |
-(\*1) icx, icpx, ifx で使用可 |
|
71 |
- |
|
72 |
-## コンパイル例{#sample} |
|
73 |
- |
|
74 |
-### 逐次プログラム{#serial} |
|
75 |
-```nohighlight |
|
76 |
-$ icx test.c # C言語の例 |
|
77 |
-$ icpx test.cpp # C++の例 |
|
78 |
-$ ifx test.f90 # Fortranの例 |
|
79 |
-$ tssrun ./a.out # 実行 |
|
80 |
-``` |
|
81 |
-<!-- $ dpcpp test.cpp # dpc++の例 |
|
82 |
-### OpenMPの利用{#openmp} |
|
83 |
- |
|
84 |
-OpenMPは、プログラムの並列化のためのオープン規格です。 |
|
85 |
-ソースコードに#pragma ompで始まる指示を書き込み、所定のオプションをつけてコンパイルするだけで、コンパイラに自動で並列化を行わせることができます。 |
|
86 |
- |
|
87 |
-OpenMPへの指示を書き込んだソースコードをコンパイルするには、-qopenmpオプションをつけます。 |
|
88 |
- |
|
89 |
-```nohighlight |
|
90 |
-$ icx -qopenmp test.c |
|
91 |
-``` |
|
92 |
- |
|
93 |
-コンパイルしたプログラムを実行する際、--rscオプションでtとcに並列数を指定すると、その並列数でプログラムが実行されます。 |
|
94 |
- |
|
95 |
-```nohighlight |
|
96 |
-$ tssrun --rsc p=1:t=8:c=8 ./a.out # 並列数8を指定して実行 |
|
97 |
-``` |
|
98 |
- |
|
99 |
-## コンパイル時メッセージ{#compile_message} |
|
100 |
-Intel コンパイラは、プログラムの誤りや通知すべき情報があるときに、以下に示す形式でメッセージを出力します。 |
|
101 |
-* Intel oneAPI DPC++/C++コンパイラ クラシック |
|
102 |
-```nohighlight |
|
103 |
-ファイル名(行番号): XXX #YYY: メッセージ本文 |
|
104 |
-ソースコードの該当行の内容 |
|
105 |
-^ |
|
106 |
-``` |
|
107 |
-* Fortranコンパイラ |
|
108 |
-```nohighlight |
|
109 |
-ファイル名(行番号): XXX #YYY: メッセージ本文 |
|
110 |
-ソースコードの該当行の内容 |
|
111 |
-``` |
|
112 |
- |
|
113 |
- - XXX : メッセージ種別(error/warning) |
|
114 |
- - YYY : メッセージの通し番号 |
|
115 |
- - ポインタ(^) : ソースコードの該当行でエラーが発見された正確な場所 |
|
116 |
- |
|
117 |
-**出力例** |
|
118 |
-* Intel oneAPI DPC++/C++コンパイラ クラシック |
|
119 |
-```nohighlight |
|
120 |
-sample.c(27): warning #175: subscript out of range |
|
121 |
- printf(" %d , %d\n",c[1][0],c[1][10]); |
|
122 |
- ^ |
|
123 |
-``` |
|
124 |
-* Fortranコンパイラ |
|
125 |
-```nohighlight |
|
126 |
-sample.f90(26): error #5560: Subscript #2 of the array C has value 20 which is greater than the upper bound of 2 |
|
127 |
-print *, c(1,1),",", c(1,20) |
|
128 |
-compilation aborted for sample.f90 (code 1) |
|
129 |
-``` |
|
130 |
- |
|
131 |
-## 利用可能なライブラリ{#library} |
|
132 |
- |
|
133 |
-### MPIライブラリ{#mpi_library} |
|
134 |
-Intel MPIライブラリが利用できます。MPIプログラムのコンパイル、リンク、実行方法については、[Intel MPIライブラリ](/compilers/intelmpi) をご覧ください。 |
|
135 |
- |
|
136 |
-### 数値計算ライブラリ{#numerical_library} |
|
137 |
-Intelコンパイラを利用する場合、以下の数値計算ライブラリを利用できます。各ライブラリの利用方法については、個別のページをご覧ください。 |
|
138 |
- |
|
139 |
-ライブラリ | システム |
|
140 |
-- | - |
|
141 |
-[MKLライブラリ](/compilers/mkl) | + |
|
142 |
-<!-- |
|
143 |
-[NAGライブラリ](/compilers/nag) | AU |
|
144 |
-[IMSLライブラリ](/compilers/imsl) | AU |
|
145 |
-\+ : すべてのユーザが利用可能 |
|
146 |
-AU : 学術研究機関限定で利用可能 |
|
147 |
-\- : 利用不可 |
|
148 |
- |
|
149 |
- |
|
150 |
-## マニュアル{#manual} |
|
151 |
-* [Intel oneAPI DPC++/C++ Compiler Developer Guide and Reference](https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top.html) |
|
152 |
-* [Intel Fortran Compiler Classic and Intel Fortran Compiler Developer Guide and Reference](https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top.html) |
|
153 | 0 |
\ No newline at end of file |