11.07.2015 Views

intel - XLsoft.com - XLsoft Corporation

intel - XLsoft.com - XLsoft Corporation

intel - XLsoft.com - XLsoft Corporation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

インテル コンパイラー入 門 セミナー[ 対 象 製 品 ]インテル ® C++ コンパイラー 9.1 Windows* 版インテル ® Visual Fortran コンパイラー 9.1 Windows* 版資 料 作 成 : エクセルソフト 株 式 会 社Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 1


<strong>intel</strong>softwareインテル ® コンパイラー 入 門本 セミナーの 内 容1.インテル ® コンパイラーとは2. 開 発 環 境3.インストール 手 順4.コンパイルCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 2


<strong>intel</strong>softwareインテル ® コンパイラー 入 門本 セミナーの 内 容1.インテル ® コンパイラーとは2. 開 発 環 境3.インストール 手 順4.コンパイルCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 3


<strong>intel</strong>softwareインテル ® コンパイラーとは『Visual Studio 環 境 に 統 合 』『インテル ® 互 換 プロセッサーに最 適 化 された 高 速 実 行 型 コード』ソースファイル・EXE・・・・・・・・・・・・・『Visual Studio プロジェクトをサポート』『マルチスレッド 化 され最 適 化 された並 列 実 行 型 コード』Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 4


<strong>intel</strong>softwareインテル ® コンパイラー 入 門本 セミナーの 内 容1.インテル ® コンパイラーとは2. 開 発 環 境3.インストール 手 順4.コンパイルCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 5


<strong>intel</strong>softwareVisual Studio の 必 要 性開 発 環 境 は Visual Studio により 提 供 されますインテル ® コンパイラーは Visual Studio に 統 合 し、コンパイル/リンクを 行 うことができます。Visual Studio 2005 に 統 合 したインテル コンパイラー9.1Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 6


<strong>intel</strong>softwareVisual Studio 製 品 の 選 択 (Fortran)それぞれの 開 発 環 境 と Visual Studio 製 品 の 対 応 表※ 詳 細 : http://www.xlsoft.<strong>com</strong>/jp/products/<strong>intel</strong>/<strong>com</strong>pilers/<strong>com</strong>piler91_matrix.htmlCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 7


<strong>intel</strong>softwareインテル ® コンパイラー 入 門本 セミナーの 内 容1.インテル ® コンパイラーとは2. 開 発 環 境3.インストール 手 順4.コンパイルCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 8


<strong>intel</strong>softwareインストール 手 順1 Visual Studio 製 品 のインストール2 ライセンスファイルの 取 得3インテル ® コンパイラーのインストールCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 9


<strong>intel</strong>software1 Visual Studio 製 品 インストール注 意 事 項 :Visual Studio 2005 を 使 用 してインテル ® 64/IA-64 アプリケーションを 作 成 する 場合 は、「カスタム・インストール」 を 選 択 して、それぞれのインストール・コンポーネントを 追 加 する 必 要 があります。図 :Visual Studio 2005 Team Editionインテル ® コンパイラーのインストールには C++ のコンポーネントが必 要 です。IA-64 アプリケーションを作 成 する 場 合 はチェック(Team Edition 以 上 のみ 対 応 )インテル ® 64 アプリケーションを 作 成 する 場 合 はチェックCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 10


<strong>intel</strong>software2 ー1 シリアル 番 号 の 登 録以 下 の「インテル ® レジストレーション・センター」にアクセスしてシリアル 番 号 を 登 録 。https://registrationcenter.<strong>intel</strong>.<strong>com</strong>/regcenter/register.aspxメールアドレスを 入 力登 録 するシリアル 番 号を 入 力Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 11


<strong>intel</strong> 2 ー2 新 規 アカウントの 作 成softwareシリアル 番 号 を 登 録 するアカウントが 存 在 しない 場 合 は、「 新 規 アカウント 作 成 」 画 面が 表 示 されます。アカウント 情 報 を 入 力 して 最 後 に [ 送 信 ] ボタンをクリックしてください。Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 12


<strong>intel</strong> 2 ー3 ライセンスファイルの 受 信softwareシリアル 番 号 の 登 録 が 完 了 すると、 米 国 インテル 社 よりライセンスファイルが 添 付 されたEmailが 送 信 されます注 意 事 項 :1. このライセンスファイルは、インテル ® コンパイラーのインストール 時 に 使 用 しますので、 日 本 語 を 含 まないフォルダーに 保 存 してください。2. ライセンスファイルの 拡 張 子 (.lic)は 変 更 しないで 下 さい。Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 13


<strong>intel</strong>software3 インテル ® コンパイラーのインストールCD-ROM からインストールする 場 合• インテル ® コンパイラーの CD-ROM をドライブに 挿 入 すると、 自 動 でインストーラーが 起 動 します。ダウンロード・パッケージからインストールする 場 合• パッケージ( 例 :w_cc_p_9.1.022_jp.exe)をダブルクリックしてファイルの 解 凍 先 を 選 択 するとインストールが 開 始 されます。( 図 :インストール 開 始 画 面 )注 意 事 項 :インストール 作 業 は、 管 理 者 権 限 のあるユーザーで 実 行 してください。また、 日 本 語 を 含 まないユーザー 名を 使 用 することを 推 奨 します。例 : ○ “エクセルソフト 株 式 会 社 ”◎ “<strong>XLsoft</strong>KK”Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 14


<strong>intel</strong>softwareインストール・ツールの 選 択1 IA-32 および IA-64 アプリケーションを 作 成 するためのコンパイラー(※IA-64 アプリケーションを 作 成 しない 場 合 でも 必 ずチェックが 必 要 )2インテル ® 64 アプリケーションを 作 成 するためのコンパイラー(※インテル ® 64 対 応 アプリケーションを 作 成 しない 場 合 は 不 要 )3 インテル・デバッガー(※ 使 用 しない 場 合 は 不 要 )12344 Visual Studio への統 合 コンポーネントCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 16


<strong>intel</strong>softwareインテル ® コンパイラー 入 門本 セミナーの 内 容1.インテル ® コンパイラーとは2. 開 発 環 境3.インストール 手 順4.コンパイルCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 17


<strong>intel</strong>softwareコンパイル■ Visual Studio からのコンパイル■ コマンドラインからのコンパイルインテル ® コンパイラー 付 属 のサンプルコードC:¥Program Files¥Intel¥Compiler¥C++¥9.1¥samples¥int_sin.cpp※デモに 関 して本 章 で 行 うデモは、 以 下 のツールを 使 用 します。・ インテル ® C++ コンパイラー 9.1 Windows日 本 語 版 スペシャル・エディション・ Microsoft Visual Studio 2005 Standard EditionCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 18


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )[ステップ1] Visual Studio を 起 動 する[ステップ2] プロジェクトを 作 成 する[ステップ3] ソースファイルをプロジェクトに 追 加 する[ステップ4] プロジェクトをビルドする[ステップ5] プロジェクトを 実 行 するCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 19


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )[ステップ1、2] Visual Studio を 起 動 し、Fortranプロジェクトを 作 製 する[ ファイル ]-[ 新 規 作 成 ]-[ プロジェクト ] により、新 規 プロジェクトを作 製 することができます。Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 20


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )[ステップ3] ソースファイルをプロジェクトに 追 加 するソリューションエクスプローラー 内 のIntel プロジェクトにあるSource Filesを 右 クリックし、[ 追 加 ] にて 新 規 まは、既 存 のソースコードを 追 加 することができます。Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 21


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )※ ビルド 構 成 (Debug/Release)を 変 更 する。インテル ® 64/IA-64 アプリケーションを 作 成 する 際 もこの[ 構 成 マネージャ] でビルド 構 成 を 変 更 します。※ 構 成 マネージャは、[ ソリューションエクスプローラ ] から、ソリューションを 右 クリックし、プロパティで 表 示 しますCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 22


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )[ステップ4] プロジェクトをビルドする[ ビルド ]-[ ソリューションのリビルド ]は 一 部 ファイルの 削 除 /コンパイル/リンクの3つが 行 われます。※ ビルドは、コンパイル/リンクが行 われます。Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 23


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )[ステップ5] プロジェクトを 実 行 する[ デバッグ ]-[ デバッグなしで 開 始 ]にて、デバッグなしの 実 行 を行 います。[ デバッグ ]-[ デバッグ 開 始 ] を選 択 した 場 合 はVisual Studioでデバッグすることができます。( 次 ページ 参 照 )Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 24


<strong>intel</strong>softwareコンパイル(Visual Studio 編 )[ステップ5] プロジェクトを 実 行 する (デバッグ)この 列 にブレークポイントを 設 定 することができますブレークポイントを追 加 し、デバッグ 構成 でビルドした 後 に[ デバッグ 開 始 ] を実 行 した 場 合 には、変 数 の 値 が 表 示されます。Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 25


<strong>intel</strong>softwareFortran コンパイル(コマンドライン 編 )[ステップ1] インテル ® コンパイラー 専 用 コマンドプロンプト 起 動[ステップ2] コンパイル 例• > cd “C:¥Program Files¥Intel¥Compiler¥C++¥9.1¥samples”• > icl int_sin.cpp(ファイル 名 の 指 定 がない 場 合 、ソースファイルに 従 ったファイル 名 のint_sin.exe が 作 成 される)[ステップ3] 実 行 例• > int_sin.exeCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 26


<strong>intel</strong>softwareコンパイル 基 本 形> ifort [オプション] 入 力 ファイル [/link リンクオプション]※ [オプション] と [/linkリンクオプション]は 省 略 可例 : > icl /O3 /FeOutFile.exe file.cpp /link /FIXED:NO /STACK:0x100000入 力 ファイル/link の 後 ろにあるオプションはすべてリンカーへ 渡 されるicl /O3 /FeOutFile.exe file.cpp /link /FIXED:NO /STACK:0x100000コンパイラーへ 渡 されるオプションリンカーへ 渡 されるオプションCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 27


<strong>intel</strong>softwareその 他 のコンパイル複 数 ソースファイルのコンパイル/リンク(OutFile.exe が 作 成 される)• > icl /FeOutFile.exe file1.cpp file2.cpp file3.cpp※ “/Fe”オプションは 作 成 するファイル 名 を 指 定 しますオブジェクト・ファイルを 含 むコンパイル/リンク• > icl file1.cpp file2.obj file3.obj特 定 のライブラリーを 含 むコンパイル/リンク• > icl file1.c file2.c file3.lib file4.libCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 28


<strong>intel</strong>software最 適 化 コンパイルデモ1. デフォルト コンパイル> コンパイルオプション 無 し実 行 時 間 : 秒2. 高 レベルの 最 適 化 とベクトル 化> /O3 /QxP を 指 定実 行 時 間 : 秒3. 自 動 並 列 化 オプションを 2 に 追 加> /O3 /QxP /Qparallel を 指 定実 行 時 間 : 秒※ 最 適 化 結 果 はソースコード、ハードウェアによって 異 なる 場 合 がありますCopyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 29


<strong>intel</strong>softwareインテル ® コンパイラー 入 門まとめ・ 製 品 登 録 について・Visual Studio に 統 合 したビルドと 実 行・Visual Studio のデバッガを 使 用・コマンドラインからの 実 行 が 可 能・ 様 々な 最 適 化 機 能 を 提 供各 種 お 問 い 合 わせはエクセルソフト 株 式 会 社 まで本 セミナー 内 容 に 関 するお 問 い 合 わせ: <strong>intel</strong>@xlsoft.<strong>com</strong>お 見 積 等 、 購 買 に 関 するお 問 い 合 わせ: xlsoftkk@xlsoft.<strong>com</strong>Copyright © 1998-2007 <strong>XLsoft</strong> <strong>Corporation</strong>. All Rights Reserved. 30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!