PowerPoint プレゼンテーション

Similar documents
PowerPoint プレゼンテーション

Red Hat Enterprise Linux 6 Portable SUSE Linux Enterprise Server 9 Portable SUSE Linux Enterprise Server 10 Portable SUSE Linux Enterprise Server 11 P

GNU Emacs GNU Emacs

X Window System X X &

Microsoft Word - Meta70_Preferences.doc

Introduction Purpose This training course describes the configuration and session features of the High-performance Embedded Workshop (HEW), a key tool

I I / 47

はじめに このドキュメントではftServerに関する障害調査を行う際に 必要となるログ データの取得方法を説明しています ログ データの取得には 初期解析用のデータの取得方法と 詳細な調査を行うときのデータ取得方法があります 特別な理由でOS 側のログが必要となった場合には RHELログの取得につ

GettingStartedTK2

Microsoft PowerPoint - 演習1:並列化と評価.pptx

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

Microsoft PowerPoint - Borland C++ Compilerの使用方法(v1.1).ppt [互換モード]

1. TSUBAME2.0 通常実行まで 1.1. 環境設定 (MPI ライブラリ & コンパイラ ) 最新の Open MPI と Intel コンパイラを使用するため,${HOME}/.bashrc 等で環境変数 ( パス等 ) を設定します. ~ 設定例 ~ export SELECT_MPI

01_OpenMP_osx.indd

PowerPoint プレゼンテーション

¥Ñ¥Ã¥±¡¼¥¸ Rhpc ¤Î¾õ¶·

Microsoft PowerPoint - InfPro_I6.pptx

情報処理概論(第二日目)

fx-9860G Manager PLUS_J

I117 II I117 PROGRAMMING PRACTICE II SOFTWARE DEVELOPMENT ENV. 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara

ProVAL Recent Projects, ProVAL Online 3 Recent Projects ProVAL Online Show Online Content on the Start Page Page 13

RT300/140/105シリーズ 取扱説明書

120802_MPI.ppt

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

Microsoft Word - appli_OpenMX_install.docx

昨年度までの研究紹介 および 研究計画

,,,,., C Java,,.,,.,., ,,.,, i

ThermoFisher

1 I EViews View Proc Freeze

<4D F736F F D2096C B838B B835E838A F B E92CA926D B838B5F E315

1. TSUBAME2.5 通常実行まで 1.1. 環境設定 (MPI ライブラリ & コンパイラ ) まずは para-tcci で使用する環境変数を.bashrc に定義します. 後述の Scalasca で OpenMPI を使用するため, ここでも最新の OpenMPI と Intel コン

EnSight 10.1の新機能

Maser - User Operation Manual

ドライバインストールガイド

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC

CPP46 UFO Image Analysis File on yucatan091206a By Tree man (on) BLACK MOON (Kinohito KULOTSUKI) CPP46 UFO 画像解析ファイル yucatan091206a / 黒月樹人 Fig.02 Targe

共通 障害調査依頼の際には ログの他に分かる範囲で以下の情報の提供をお願いします 障害の概要 ( 障害の具体的な内容どの様な現象が発生したか等の情報 ) 障害の発生日時 障害の発生手順 ( 障害発生時に どの様な操作 運用を行ったかの情報 ) 画面上に表示されているエラーメッセージ ネットワーク構成

2 2.1 Mac OS CPU Mac OS tar zxf zpares_0.9.6.tar.gz cd zpares_0.9.6 Mac Makefile Mekefile.inc cp Makefile.inc/make.inc.gfortran.seq.macosx make

2 I I / 61

手動操作によるパーティション作成方法 4. リストア方法 (3) システム情報の復元 の 3-2) の手順で sfdisk コマンドによるシステムのパーティション情報の復元に失敗する場合は fdisk コマンドにて手動でパーティションを作成してください 作成するパーティションのサイズは バックアップ

Microsoft Word - SI_Refinements_ docx

untitled

アラートの使用

インテル(R) Visual Fortran Composer XE 2013 Windows版 入門ガイド

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

情報処理概論(第二日目)

Metasploit 2012.indb

Microsoft PowerPoint - 演習2:MPI初歩.pptx

untitled

memo ii

CLUSTERPRO MC StorageSaver istorage M シリーズ使用時の設定手順 (HP-UX 版 Linux 版 Windows 版 ) 2013(Apr) NEC Corporation istorage M シリーズを使用する場合の StorageSaver 設定手順 (H

RT300i/RT140x/RT105i 取扱説明書

Microsoft Word - PrivateAccess_UM.docx

Microsoft Word - appendix_b_srft.doc

PowerPoint Presentation

<4D F736F F F696E74202D D F95C097F D834F E F93FC96E5284D F96E291E85F8DE391E52E >

Text

HA8000シリーズ ユーザーズガイド ~BIOS編~ HA8000/RS110/TS10 2013年6月~モデル

Intel MPI Library Linux

3.Cygwin で日本語を使いたい Cygwin で以下のコマンドを実行すると それ以降 メッセージが日本語になります export LANG=ja_JP.UTF-8 これは 文字コードを日本語の UTF-8 に設定することを意味しています UTF-8 は Cygwin で標準の文字コードで, 多

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë

Geant4を使ってみよう

help gem gem gem my help

再起動した状態になり パスワードを入力すると 図 2 のように DEXCS2011 のアイコ ンがデスクトップ上に表示される 2 端末を準備する メニューバーにある端末の形を左クリック 図 2 デスクトップ メニューバーに端末の形がない場合 図 3 メニューバー アプリケーション アクセサリー 端末

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

cocos2d-x #cocos2d-x

Introduction Purpose This course explains how to use Mapview, a utility program for the Highperformance Embedded Workshop (HEW) development environmen

EMC VNX Monitoring and Reportingユーザー ガイド

Transcription:

Computer simulations create the future 性能解析ツール Scalasca Hands-On セットアップ 2014 年 3 月 7 日 中村朋健理化学研究所計算科学研究機構 RIKEN ADVANCED INSTITUTE FOR COMPUTATIONAL SCIENCE

作業環境の最初 作業環境 /home/ss/xxx/scalasca/npb_original/ 作業環境の最終形 /home/ss/xxx/scalasca/npb_original/ /NPB_Test/ /NPB_Summary/ /NPB_Filt/ /NPB_Trace/ /NPB_Papi/ /NPB_Pomp/ /NPB_User/ 2014/3/7 RIKEN AICS HPC Spring School 2

Nas Parallel Benchmarks 1. メールで送信 springschoolscalasca.tar.gz ファイル 2. 環境変数 ( パス ) の設定 (.bashrc などへ ) export PATH=/home/ss/scalasca/bin:$PATH 3. pi へ転送 1. sftp, scp などを使って pi へ転送 $ sftp xxxx@pi.ircpi.kobe-u.ac.jp $ put SpringSchoolScalasca.tar.gz 4. 展開 $ ssh xxxx@pi.ircpi.kobe-u.ac.jp $ tar zxvf SpringSchoolScalasca.tar.gz 2014/3/7 RIKEN AICS HPC Spring School 3

Nas Parallel Benchmarks 6. コピーを作成 $ cd ~/Scalasca $ cp r NPB_original NPB_test 7. NPB の config ファイルの設定 $ cd ~/Scalasca/NPB_test/config $ cp make.def.template make.def $ cp suite.def.template suite.def 1. suite.def ファイルの編集 mg A 4 ( この 1 行だけに ) 2014/3/7 RIKEN AICS HPC Spring School 4

Nas Parallel Benchmarks 7. NPB の config ファイルの設定 2. make.def ファイルの編集 32 行目 MPIF77 = f77 MPIF77 = mpifrtpx 39 行目 FMPI_LIB = -L/usr/local/lib lmpi FMPI_LIB = -L/opt/FJSVfxlang/1.2.1/lib64 44 行目 MPI_INC = -I/usr/local/include FMPI_INC = -I/opt/FJSVtclang/1.2.1/include/mpi/fujitsu 49 行目 FFLAGS = -O FFLAGS = -Kfast,parallel,ocl,openmp 55 行目 FLINKFLAGS = -O FLINKFLAGS = -Kfast,parallel,ocl,openmp 2014/3/7 RIKEN AICS HPC Spring School 5

NPB MG の動かし方 $ cd ~/Scalasca/NPB_test $ make suite $ cd ~/Scalasca/NPB_test/bin $ ls -l ( 作成した実行可能ファイルの確認 ) 実行 $ pjsub./run.sh run.sh.oxxxxx を確認 2014/3/7 RIKEN AICS HPC Spring School 6

Computer simulations create the future Scalasca Hands-on RIKEN ADVANCED INSTITUTE FOR COMPUTATIONAL SCIENCE

本日の Hands-on 1. 基本的なコマンド4つ 2. 自動 Instrumentation 1. Summary 解析 2. フィルタの使い方 3. Trace 解析 4. PAPIを用いた解析 3. 半自動 Instrumentation 4. 手動 Instrumentation 2014/3/7 RIKEN AICS HPC Spring School 8

X Window System の設定 X の設定 1. Mac Mountain Lion 以降 /Applications/Utilities/Xquartz.app がインストールされているか確認 http://xquartz.macosforge.org/landing/ 2. Mac Mountain Lion より前のバージョンなら問題ないはず 3. Windows cygwin で X11 をインストール X の確認 $ ssh Y user@pi.ircpi.kobe-u.ac.jp $ xeyes 2014/3/7 RIKEN AICS HPC Spring School 9

基本的なコマンド scalasca $ scalasca Scalasca 1.4.3 Toolset for scalable performance analysis of large-scale parallel applications usage: scalasca [-v][-n] {action} 1. prepare application objects and executable for measurement: scalasca -instrument <compile-or-link-command> # skin 2. run application under control of measurement system: scalasca -analyze <application-launch-command> # scan 3. interactively explore measurement analysis report: scalasca -examine <experiment-archive report> # square -v: enable verbose commentary -n: show actions without taking them -h: show quick reference guide (only) 2014/3/7 RIKEN AICS HPC Spring School 10

基本的なコマンド skin $ skin SCALASCA 1.4.3: application instrumenter usage: skin [-v] [-comp] [-pomp] [-user] <compile-or-link-command> -comp={all none...}: routines to be instrumented by compiler [default: all] (... custom instrumentation specification depends on compiler) -pomp: process source files for POMP directives -user: enable EPIK user instrumentation API macros in source code -v: enable verbose commentary when instrumenting 2014/3/7 RIKEN AICS HPC Spring School 11

基本的なコマンド scan $ scan ( フロントエンドでは使わない ) Scalasca 1.4.3: measurement collection & analysis nexus usage: scan {options} [launchcmd [launchargs]] target [targetargs] where {options} may include: -h Help: show this brief usage message and exit. -v Verbose: increase verbosity. -n Preview: show command(s) to be launched but don't execute. -q Quiescent: execution with neither summarization nor tracing. -s Summary: enable runtime summarization. [Default] -t Tracing: enable trace collection and analysis. -a Analyze: skip measurement to (re-)analyze an existing trace. -e epik : Experiment archive to generate and/or analyze. (overrides default experiment archive) -f filtfile : File specifying measurement filter. -l lockfile : File that blocks start of measurement. -m metrics : Metric specification for measurement. 2014/3/7 RIKEN AICS HPC Spring School 12

基本的なコマンド square $ square SCALASCA 1.4.3: analysis report explorer usage: square [-v] [-s] [-f filtfile] [-F] <experiment archive cube file> -F : Force remapping of already existing reports -f filtfile : Use specified filter file when doing scoring -s : Skip display and output textual score report -v : Enable verbose mode 2014/3/7 RIKEN AICS HPC Spring School 13

自動 Instrumentation Summary 解析 どんなとき? まず大雑把にアプリケーションの挙動を確認したい 2014/3/7 RIKEN AICS HPC Spring School 14

自動 Instrumentation Summary 解析 ( 準備 ) $ cd ~/Scalasca $ cp r NPB_test NPB_Summary $ cd NPB_Summary $ make clean ( 不要なものを削除 ) $ cd bin $ rm f mg* ( 不要なものを削除 ) $ cd../mg ( エディタで Makefile ファイルを編集 ) 13 行目 ${FLINK} skin ${FLINK} 16 行目 ${FCOMPILE} skin ${FCOMPILE} 2014/3/7 RIKEN AICS HPC Spring School 15

自動 Instrumentation Summary 解析 (instrumentation) $ cd ~/Scalasca/NPB_Summary $ make suite $ cd bin $ ls l ( 作成したファイルを確認 ) 2014/3/7 RIKEN AICS HPC Spring School 16

自動 Instrumentation Summary 解析 (measurement) (run.sh ファイルを編集 ) 以下の 1 行をコメントにする mpiexec -n 4./mg.A.4 以下の # を外す #. /home/ss/scalasca/env_scalasca #export SCAN_ANALYZE_OPTS="-i -s #scan e epik_summary mpiexec n 4./mg.A.4 $ pjsub./run.sh 2014/3/7 RIKEN AICS HPC Spring School 17

自動 Instrumentation Summary 解析 ( 解析 ) # cd ~/Scalasca/NPB_Summary/bin # square./epik_summary 2014/3/7 RIKEN AICS HPC Spring School 18

自動 Instrumentation Summary での解析 CUBE の操作 ツリーの展開 ( 展開後は子の処理コストを含まない ) 色によるコスト分類 metric tree 処理時間, 通信回数, 通信と演算の割合 ヘルプ ( オンラインドキュメント ) の表示 call tree 各関数の計算時間, 割合 ソースコード表示 検索 (ex. MPI_Wait) System tree 3 次元での表示 2014/3/7 RIKEN AICS HPC Spring School 19

Weak scaling の調べ方 等しい iteration 2.5 倍 等しい class: B, 4 procs class: C, 32 procs class: D, 256 procs class: E, 2048 procs resid_ 関数では weak scale で性能低下はない 2014/3/7 RIKEN AICS HPC Spring School 20

自動 Instrumentation Filter の使い方 ( 今回の MG は例として適当ではありませんが ) どんなとき? Summary 解析で不要な情報まで取得したくない オーバヘッドが大きくなりうまく性能を測れない 後で出てくる Trace 解析で Scalasca の制限にひっかかる イベントトレースの合計は 34GB まで 各ランクのトレースバッファサイズは 8.5GB まで 2014/3/7 RIKEN AICS HPC Spring School 21

$ cd ~/Scalasca $ cp r NPB_Summary NPB_Filter $ cd NPB_Filter/bin/epik_summary $ square s./ $ cat epik.score Filter の使い方 例えば resid_ 関数,ready_ 関数,take3_ 関数についてはトレース情報は必要ない場合以下のような scalasca.filt ファイルを作成 $ cat scalasca.filt resid_ ready_ take3_ (run.sh を編集 ) 以下の行をコメントに scan mpiexec -n 4./mg.A.4 以下の # を外す #scan f scalasca.filt e epik_filter mpiexec -n 4./mg.A.4 2014/3/7 RIKEN AICS HPC Spring School 22

自動 Instrumentation Trace 解析 どんなとき? フィルタで要らない情報を取らないようにした後, 通信待ちオペレーションの発生箇所を特定する 通信待ちオペレーションによるボトルネックを見つける 2014/3/7 RIKEN AICS HPC Spring School 23

自動 Instrumentation Trace 解析 ( 準備, instrumentation) $ cd ~/Scalasca $ cp r NPB_Summary NPB_Auto $ cd NPB_Auto $ make clean $ cd bin $ rm fr epik_* ( 実行ファイルは Summary 解析と同じものを使います ) (run.sh を編集 ) 以下の行をコメントに scan f scalasca.filt e epik_filter mpiexec -n 4./mg.A.4 以下の # を外す #scan -t e epik_auto mpiexec -n 4./mg.A.4 2014/3/7 RIKEN AICS HPC Spring School 24

自動 Instrumentation Trace 解析 (measurement, 表示 ) $ cd ~/Scalasca/NPB_Auto/bin (MG はフィルタを必要としないのでつけません ) $ pjsub./run.sh $ square./epik_auto 2014/3/7 RIKEN AICS HPC Spring School 25

自動 Instrumentation Trace 解析 ( 表示 & 解析 ) CUBE の操作 metric tree Late Sender などの待ち時間を確認 ヘルプ ( オンラインドキュメント ) の表示 2014/3/7 RIKEN AICS HPC Spring School 26

自動 Instrumentation Trace 解析 ( 表示 & 解析 ) ( 例として以下を確認 ) ホットスポットをみつける 各ノードの演算時間 通信と演算の比 Late Sender,Early Reciever など起こっている部分の確認 2014/3/7 RIKEN AICS HPC Spring School 27

自動 Instrumentation PAPI を使った解析 どんなとき? 以下のようなハードウェアカウンタの値を見たいとき キャッシュミス TLB ミス 浮動小数点演算回数 2014/3/7 RIKEN AICS HPC Spring School 28

PAPI を使った解析 (instrumentation, measurement) $ cd ~/Scalasca $ cp r NPB_Summary NPB_Papi $ cd NPB_Papi/bin $ rm fr epik* (run.sh ファイル編集 ) 以下のコメントを外す #/opt/fjsvxospa/bin/xospastop ( 課金 PA 機能を止める ) #scan t m L1_MISS: 以下をコメントに scan -t e epik_auto mpiexec -n 4./mg.A.4 $ pjsub./run.sh $ square./epik_papi 2014/3/7 RIKEN AICS HPC Spring School 29

PAPI を使った解析 Metric tree に L1_MISS L1_I_MISS など -m オプションで指定したものが表示 例として以下を確認 L1_MISS が多い関数 resid_, psinv_, ready_, give3_, take3_ L1_I_MISS が多い関数 rprj3_, psinv_, interp_, resid_ FLOATING_POINT が多い関数 zran3_, resid_, rprj3_, psinv_ scan の -m オプションに指定可能なものは以下のファイルを参照 /home/scalasca/doc/papi_avail.txt ただし, ハードウェアカウンタが 8 個あり, バッティングしないものなら同時に調べられる (SPARC64TM VIIIfx Extensions p304,305 を参照 ) 2014/3/7 RIKEN AICS HPC Spring School 30

半自動 POMP User Instrumentation どんなとき? 自動 Instrumentation で失敗する場合 プログラムの一部の詳細を分析したい場合 2014/3/7 RIKEN AICS HPC Spring School 31

半自動 POMP User Instrumentation $ cd ~/Scalasca $ cp r NPB_Summary NPB_Pomp $ cd ~/Scalasca/NPB_Pomp/MG (mg.f を半手動でのインストルメント ) rpj3 サブルーチンのループ部分の詳細を分析したいときの例 (91 行目あたり )!POMP$ INST INIT! main プログラムに 1 回だけ (824 行目あたり )!POMP$ INST BEGIN(rprj3_loop) (857 行目あたり )!POMP$ INST END(rprj3_loop) 実行は同様 $ cd ~/Scalasca/NPB_Pomp 2014/3/7 RIKEN AICS HPC Spring School 32

手動 EPIK User Instrumentation どんなとき? 自動や半自動で Instrumentation に失敗する場合 プログラムの一部の詳細を分析したい場合 2014/3/7 RIKEN AICS HPC Spring School 33

手動 EPIK User Instrumentation 準備 $ cd ~/Scalasca $ cp r NPB_Summary NPB_User $ cd NPB_User/bin $ rm fr (runmg_*.sh 以外削除 ) $ cd.. $ make clean $ cd MG $ mv mg.f mg.f (CPP を通すため ) (Makefile を編集 ) mg.f を mg.f に変更 skin を skin user に変更自動 instrumentation が必要なければ.o ファイル作成時に -comp=none をつける 2014/3/7 RIKEN AICS HPC Spring School 34

手動 EPIK User Instrumentation Instrumentation mg.f ファイルの編集 54 行目あたりに以下を追加 #include "/home/ss/scalasca/include/fe/epik_user.inc (Makefile に -I オプションでディレクトリを指定しても構いません ) subroutine mg3p(u,v,r,a,c,n1,n2,n3,k) EPIK_FUNC_REG( func_mg3p ) EPIK_USER_REG(r_name1, iter_loop ) EPIK_USER_REG(r_name2, iter_loop_4call ) 2014/3/7 RIKEN AICS HPC Spring School 35

手動 EPIK User Instrumentation Instrumentation mg.f ファイルの編集つづき EPIK_FUNC_START() EPIK_USER_START(r_name1) do k = lb+1, lt-1 j = k-1 EPIK_USER_START(r_name2) call zero3(u(ir(k)),m1(k),m2(k),m3(k)) call interp(u(ir(j)),m1(j),m2(j),m3(j),u(ir(k)),m1(k),m2(k),m3(k),k) call resid(u(ir(k)),r(ir(k)),r(ir(k)),m1(k),m2(k),m3(k),a,k) call psinv(r(ir(k)),u(ir(k)),m1(k),m2(k),m3(k),c,k) EPIK_USER_END(r_name2) enddo EPIK_USER_END(r_name1) EPIK_FUNC_END() return end 2014/3/7 RIKEN AICS HPC Spring School 36

EPIK User Instrumentation C #include " /home/ /epik_user.inc "... void foo() { EPIK_FUNC_START();... if (...) { EPIK_FUNC_END(); return; } else { EPIK_USER_REG(r_name,"region"); EPIK_USER_START(r_name);... EPIK_USER_END(r_name); } EPIK_FUNC_END(); return; } Fortran #include /home/ /epik_user.inc"... subroutine bar() EPIK_FUNC_REG("bar") EPIK_USER_REG(r_name, "region") EPIK_FUNC_START() if (...) then EPIK_FUNC_END() return else EPIK_USER_START(r_name)... EPIK_USER_END(r_name) endif EPIK_FUNC_END() return end subroutine bar 2014/3/7 RIKEN AICS HPC Spring School 37