86

Similar documents

スライド 1

MPI コミュニケータ操作

Microsoft PowerPoint MPI.v...O...~...O.e.L.X.g(...Q..)

Microsoft PowerPoint - KHPCSS pptx

C/C++ FORTRAN FORTRAN MPI MPI MPI UNIX Windows (SIMD Single Instruction Multipule Data) SMP(Symmetric Multi Processor) MPI (thread) OpenMP[5]

2 T 1 N n T n α = T 1 nt n (1) α = 1 100% OpenMP MPI OpenMP OpenMP MPI (Message Passing Interface) MPI MPICH OpenMPI 1 OpenMP MPI MPI (trivial p

NUMAの構成

演習準備 2014 年 3 月 5 日神戸大学大学院システム情報学研究科森下浩二 1 RIKEN AICS HPC Spring School /3/5

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

目 目 用方 用 用 方

<4D F736F F F696E74202D C097F B A E B93C782DD8EE682E890EA97705D>

Microsoft PowerPoint - 講義:コミュニケータ.pptx

スライド 1

スライド 1

WinHPC ppt

untitled

講義の流れ 並列プログラムの概要 通常のプログラムと並列プログラムの違い 並列プログラム作成手段と並列計算機の構造 OpenMP による並列プログラム作成 処理を複数コアに分割して並列実行する方法 MPI による並列プログラム作成 ( 午後 ) プロセス間通信による並列処理 処理の分割 + データの

Microsoft PowerPoint 並列アルゴリズム04.ppt

Microsoft PowerPoint - 講義:片方向通信.pptx


演習準備

演習 II 2 つの講義の演習 奇数回 : 連続系アルゴリズム 部分 偶数回 : 計算量理論 部分 連続系アルゴリズム部分は全 8 回を予定 前半 2 回 高性能計算 後半 6 回 数値計算 4 回以上の課題提出 ( プログラム + 考察レポート ) で単位

スライド 1

Microsoft PowerPoint - S1-ref-F.ppt [互換モード]

かし, 異なったプロセス間でデータを共有するためには, プロセス間通信や特殊な共有メモリ領域を 利用する必要がある. このためマルチプロセッサマシンの利点を最大に引き出すことができない. こ の問題はマルチスレッドを用いることで解決できる. マルチスレッドとは,1 つのプロセスの中に複 数のスレッド

120802_MPI.ppt

MPI () MPIMessage Passing Interface MPI MPI OpenMP 7 ( ) 1

Microsoft PowerPoint _MPI-01.pptx

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

コードのチューニング

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

MPI MPI MPI.NET C# MPI Version2

Microsoft PowerPoint _MPI-03.pptx

para02-2.dvi

課題 S1 解説 Fortran 編 中島研吾 東京大学情報基盤センター

±é½¬£²¡§£Í£Ð£É½éÊâ

<4D F736F F F696E74202D C097F B A E B93C782DD8EE682E890EA97705D>

コードのチューニング

課題 S1 解説 C 言語編 中島研吾 東京大学情報基盤センター

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

PowerPoint プレゼンテーション

Microsoft PowerPoint - scls_biogrid_lecture_v2.pptx

MPI

XcalableMP入門

Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データ グループ通信 (Collective Communication) 1 対 1 通信 (Point-to-Point Communication)

Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データタ グループ通信 (Collective Communication) 1 対 1 通信 (Point-to-Point Communication)

MPI usage

CS

Microsoft PowerPoint - MPIprog-C1.ppt [互換モード]

MPI 超 入門 (FORTRAN 編 ) 東京大学情報基盤センター C 言語編は以下 /ohshima/seminars/t2k201111/ (MPI による並列アプリケーション開発入門 2)

untitled

05-opt-system.ppt

Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データタ グループ通信 (Collective Communication) 1 対 1 通信 (Point-to-Point Communication)

MPI コミュニケータ操作

Sae x Sae x 1: 1. {x (i) 0 0 }N i=1 (x (i) 0 0 p(x 0) ) 2. = 1,, T a d (a) i (i = 1,, N) I, II I. v (i) II. x (i) 1 = f (x (i) 1 1, v(i) (b) i (i = 1,

untitled

44 6 MPI 4 : #LIB=-lmpich -lm 5 : LIB=-lmpi -lm 7 : mpi1: mpi1.c 8 : $(CC) -o mpi1 mpi1.c $(LIB) 9 : 10 : clean: 11 : -$(DEL) mpi1 make mpi1 1 % mpiru

nakao

Microsoft PowerPoint - MPIprog-C1.ppt [互換モード]

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

Microsoft PowerPoint - MPIprog-C [互換モード]

chap2.ppt

Page 2 本資料は, 東北大学サイバーサイエンスセンターと NEC の共同により作成され, 大阪大学サイバーメディアセンターの環境で実行確認を行い, 修正を加えたものです. 無断転載等は, ご遠慮下さい.

Microsoft PowerPoint - MPIprog-F1.ppt [互換モード]

Microsoft PowerPoint - 阪大CMSI pptx

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

Microsoft PowerPoint - MPIprog-F [互換モード]

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

Microsoft PowerPoint - MPIprog-F1.ppt [互換モード]

Microsoft PowerPoint - ishikawa.ppt

浜松医科大学紀要

4th XcalableMP workshop 目的 n XcalableMPのローカルビューモデルであるXMPのCoarray機能を用 いて Fiberミニアプリ集への実装と評価を行う PGAS(Pertitioned Global Address Space)言語であるCoarrayのベ ンチマ

Microsoft PowerPoint - 第10回講義(2015年12月22日)-1 .pptx

情報処理演習 II

LC304_manual.ai

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

AtCoder Regular Contest 073 Editorial Kohei Morita(yosupo) A: Shiritori if python3 a, b, c = input().split() if a[len(a)-1] == b[0] and b[len(

Studies of Foot Form for Footwear Design (Part 9) : Characteristics of the Foot Form of Young and Elder Women Based on their Sizes of Ball Joint Girth

Microsoft PowerPoint - MPIprog-F1.ppt [互換モード]

2007年度 計算機システム演習 第3回

untitled

MPI によるプログラミング概要 C 言語編 中島研吾 東京大学情報基盤センター

IEC :2014 (ed. 4) の概要 (ed. 2)


PowerPoint プレゼンテーション

Huawei G6-L22 QSG-V100R001_02

Microsoft PowerPoint - 高速化WS富山.pptx

Tab 5, 11 Tab 4, 10, Tab 3, 9, 15Tab 2, 8, 14 Tab 1, 7, 13 2

Microsoft PowerPoint - MPIprog-C1.ppt [互換モード]

untitled

Journal of Geography 116 (6) Configuration of Rapid Digital Mapping System Using Tablet PC and its Application to Obtaining Ground Truth

XACC講習会

alternating current component and two transient components. Both transient components are direct currents at starting of the motor and are sinusoidal

MIDI_IO.book

00_1512_SLIMLINE_BOOK.indb

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1

Transcription:

86

86

86

main() {... } main() { main() { main() {......... } } } 86

main() { main() { main() {......... } } } main() { if(rank==)... } main() { if(rank==)... } main() { if(rank==x)... } 86

P(N) P(N) / P(M) * ( M / N ) 86

.8.7.5.6 Execution Time.4..8.6.4. Number of Ranks 86

.8.6.7.5 4.7.5 Execution Time.4..8.6.4. Number of Ranks Execution Speed 8 6 4 Number of Ranks 86

86

86

86

main() { if(rank==)... } main() { if(rank==)... } main() { if(rank==n-)... } main() { if(rank==)... } main() { if(rank==)... } main() { if(rank==4)... } main() { if(rank==7)... } main() { if(rank==8)... } main() { if(rank==9)... } 86

86

double A[]; double A[]; double A[]; 86

86

86

C:! int MPI_Init( int **argc, char **argv )!! int MPI_Finalize( void ) F:!! MPI_INIT( ierr )!! MPI_FINALIZE( ierr ) 86

C:!! int MPI_Comm_rank( MPI_COMM_WORLD, int *rank )!! int MPI_Comm_size( MPI_COMM_WORLD, int *size ) F:!! MPI_COMM_RANK( MPI_COMM_WORLD, rank, ierr )!! MPI_COMM_SIZE( MPI_COMM_WORLD, size, ierr ) 86

86

86

86

86

C:! MPI_Send( void *data, int count, MPI_Datatype type,!!! int dest, int tag, MPI_COMM_WORLD ) F:! MPI_SEND( data, count, type, dest, tag, MPI_COMM_WORLD,!!! ierr )!! 86

C:!! MPI_Recv( void *data, int count, MPI_Datatype type,!!! int src, int tag, MPI_COMM_WORLD, MPI_Status status ) F:!! MPI_RECV( data, count, type, src, tag, MPI_COMM_WORLD,!!! status, ierr )!! 86

The send bu er specified by the MPI_SEND operation consists of count succ the type indicated by datatype, starting with the entry at address buf. Note the message length in terms of number of elements, not number of bytes. machine independent and closer to the application level. The data part of the message consists of a sequence of count values, e indicated by datatype. count may be zero, in which case the data part of empty. The basic datatypes that can be specified for message data values co POINT-TO-POINT COMMUNICATION basic datatypes of the host language. Possible values of this argument for F C datatype corresponding Fortran types are listed in Table.. char MPIにおけるデータ型 8 C言語のデータ型との対応 CHAPTER. MPI datatype MPI_CHAR 4 5 6 7 8 9 MPI_SHORT MPI_INT MPI_LONG MPI_LONG_LONG_INT MPI_LONG_LONG (as a synonym) MPI_SIGNED_CHAR MPI_UNSIGNED_CHAR 4 5 6 7 8 9 MPI_UNSIGNED_SHORT MPI_UNSIGNED MPI_UNSIGNED_LONG MPI_UNSIGNED_LONG_LONG MPI_FLOAT MPI_DOUBLE MPI_LONG_DOUBLE MPI_WCHAR 4 5 6 7 8 9 4 MPI_C_BOOL MPI_INT8_T MPI_INT6_T MPI_INT_T MPI_INT64_T MPI_UINT8_T MPI_UINT6_T MPI_UINT_T MPI_UINT64_T MPI_C_COMPLEX MPI_C_FLOAT_COMPLEX (as a synonym) MPI_C_DOUBLE_COMPLEX MPI_C_LONG_DOUBLE_COMPLEX MPI_BYTE MPI_PACKED FORTRAN言語のデータ 型との対応 (treated as printable character) signed short int MPI datatype Fortran datatype signed int signed long int MPI_INTEGER INTEGER signed long long int MPI_REAL REAL signed long long int signed char MPI_DOUBLE_PRECISION DOUBLE PRECISION (treated as integral value) unsigned char MPI_COMPLEX COMPLEX (treated as integral value) MPI_LOGICAL LOGICAL unsigned short int unsigned int MPI_CHARACTER CHARACTER() unsigned long int MPI_BYTE unsigned long long int float MPI_PACKED double long double wchar_t (defined in <stddef.h>) Table.: Predefined MPI datatypes corresponding to Fortran dat (treated as printable character) _Bool int8_t Possible values for this argument for C and the corresponding C typ int6_t int_t Table.... BLOCKING SEND AND RECEIVE OPERATIONS int64_t The datatypes MPI_BYTE and MPI_PACKED do not correspond to uint8_t uint6_t datatype C datatype consists Fortran datatype datatype. A value MPI of type MPI_BYTE of a byte (8 binary digi uint_t MPI_Aint INTEGER (KIND=MPI_ADDRESS_KIND) uninterpreted and ismpi_aint di erent from a character. Di erent machines may uint64_t MPI_OFFSET MPI_Offset INTEGER (KIND=MPI_OFFSET_KIND) float _Complex representations for characters, or may use more than one byte to represent float _Complex byte has the binary value on all Cmachines. The double _Complexthe other hand, Tablea.: Predefined MPIsame datatypes corresponding to both and Fortran datatype long double _Complex C言語とFORTRAN言語 両方に対応するデータ型 MPI_PACKED is explained in Section 4.. Thesupport datatypes of MPI_AINT MPI_OFFSET correspond to the C ty MPI requires these and datatypes, which match thempi-defined basic datat MPI_Aint and MPI_O set and their Fortran equivalents INTEGER (KIND= and ISO C. Additional MPI datatypes should be provided if the host languag MPI_ADDRESS_KIND) and INTEGER (KIND=MPI_OFFSET_KIND). This is described in Table.: Predefined MPI datatypes corresponding to C datatypes types: ble MPI_DOUBLE_COMPLEX for double precisioncommunication complex in Fortth RIKEN AICS HPC Summer Schooldata 5.. See Section 6.. for information on interlanguage with types. be of type DOUBLE COMPLEX; MPI_REAL, MPI_REAL4 and MPI_REAL8 fo 年8月6日火曜日 Rationale. The datatypes MPI_C_BOOL, MPI_INT8_T, MPI_INT6_T, 5 6 7 8 9 4 4 4

86

86

86

86

86

MPI_Send Sender CTS RTS Message Receiver MPI_Recv Rendezvous Protocol Sender MPI_Send Message Receiver MPI_Recv Eager Protocol 86

int rank; char data[len] MPI_Status status; if( rank == ) { MPI_Send( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD ); MPI_Recv( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD, &status ); } else if( rank == ) { MPI_Send( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD ); MPI_Recv( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD, &status ); } 86

B Rendezvous J Eager Intel Nehalem (.67 GHz) Infiniband QDR MVAPICH Bandwidth [MB/s] 86 BJ BJ BJ BJ BJ BJ BJ B J B J BJ BJ B J J Message Size [Byte]

C:! MPI_Isend( void *data, int count, MPI_Datatype type,!!! int dst, int tag, MPI_COMM_WORLD, MPI_Request *req)! MPI_Irecv( void *data, int count, MPI_Datatype type,!!! int src, int tag, MPI_COMM_WORLD, MPI_Request *req )! MPI_Wait( MPI_Request *req, MPI_Status *status ) F:! MPI_ISEND( data, count, type, dst, tag, MPI_COMM_WORLD,!!! req, ierr )!! MPI_IRECV( data, count, type, src, tag, MPI_COMM_WORLD,!!! req, ierr )! MPI_WAIT( req, status, ierr ) 86

MPI_Isend MPI_Wait Sender CTS RTS Message Receiver MPI_Irecv MPI_Wait 86

int rank; char data[len]; MPI_Status status; MPI_Request request; if(! rank == ) { MPI_Irecv( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD, &request ); MPI_Send( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD ); } else if( rank == ) { MPI_Irecv( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD, &request ); MPI_Send( data, LEN, MPI_CHAR,, TAG, MPI_COMM_WORLD ); } MPI_Wait( &request, &status ); 86

int rank; char data[len] data[len]; MPI_Status status; if( rank == ) { MPI_Sendrecv(!data, LEN, MPI_CHAR,, TAG,! %!!!! data, LEN, MPI_CHAR,, TAG,! %!!!! MPI_COMM_WORLD, &status ); } else if( rank == ) { MPI_Sendrecv(!data, LEN, MPI_CHAR,, TAG,! % }!!!! data, LEN, MPI_CHAR,, TAG,! %!!!! MPI_COMM_WORLD, &status ); 86

86

86

86

86

86

C: MPI_Bcast( void *data, int count, MPI_Datatype type,!!!!!! int root, MPI_COMM_WORLD ) F:! MPI_BCAST( data, count, type, root, MPI_COMM_WORLD, ierr ) 4 5 6 7 8 9 root= 4 5 6 7 8 9 4 5 6 7 8 9 4 5 6 7 8 9 4 5 6 7 8 9 4 count = 86

C:!MPI_Gather( void *sdat, int scount, MPI_Datatype stype,!!!!!! void *rdat, int rcount, MPI_Datatype rtype,!!!!!! int root, MPI_COMM_WORLD ) F:! MPI_GATHER( sdat, scount, stype, rdat, rcount, rtype,!!!!!! root, MPI_COMM_WORLD, ierr ) root= scount = rcount = 86

C:!MPI_Scatter( void *sdat, int scount, MPI_Datatype stype,!!!!!! void *rdat, int rcount, MPI_Datatype rtype,!!!!!! int root, MPI_COMM_WORLD ) F:! MPI_SCATTER( sdat, scount, stype, rdat, rcount, rtype,!!!!!! root, MPI_COMM_WORLD, ierr ) 4 5 6 7 8 root= 4 5 6 7 8 scount = rcount = 86

C:!MPI_Reduce( void *sdat, void *rdat, int count,!!!!!! MPI_Datatype type, MPI_Op op, int root,!!!!!! MPI_COMM_WORLD ) F:! MPI_REDUCE( sdat, rdat, count, type, op, root,!!!!!! MPI_COMM_WORLD, ierr ) count = 8, op = MPI_SUM root= 4 8 6 4 4 4 4 5 5 5 5 4 6 6 6 6 8 7 7 7 7 8 8 8 8 86

MPI_MAX MPI_MIN MPI_SUM MPI_PROD MPI_LAND MPI_BAND MPI_LOR MPI_BOR MPI_LXOR MPI_BXOR MPI_MAXLOC MPI_MINLOC maximum minimum sum product logical and bit-wise and logical or bit-wise or logical exclusive or (xor) bit-wise exclusive or (xor) max value and location min value and location 86

C:!MPI_Allgather( void *sdat, int scount, MPI_Datatype stype,!!!!!! void *rdat, int rcount, MPI_Datatype rtype,!!!!!! MPI_COMM_WORLD ) F:! MPI_ALLGATHER( sdat, scount, stype, rdat, rcount, rtype,!!!!!! MPI_COMM_WORLD, ierr ) scount = rcount = 86

C:!MPI_Gather( void *sdat, int scount, MPI_Datatype stype,!!!!!! void *rdat, int rcount, MPI_Datatype rtype,!!!!!! int root, MPI_COMM_WORLD ) F:! MPI_GATHER( sdat, scount, stype, rdat, rcount, rtype,!!!!!! root, MPI_COMM_WORLD, ierr ) root= scount = rcount = 86

C:!MPI_Allreduce( void *sdat, void *rdat, int count,!!!!!!! MPI_Datatype type, MPI_Op op,!!!!!!! MPI_COMM_WORLD ) F:! MPI_ALLREDUCE( sdat, rdat, count, type, op,!!!!!!! MPI_COMM_WORLD, ierr ) count = 8, op = MPI_PROD 6 6 6 6 8 8 8 8 4 56 4 56 4 56 4 56 5 65 5 65 5 65 5 65 6 96 6 96 6 96 6 96 7 7 7 7 86

C:!MPI_Reduce( void *sdat, void *rdat, int count,!!!!!! MPI_Datatype type, MPI_Op op, int root,!!!!!! MPI_COMM_WORLD ) F:! MPI_REDUCE( sdat, rdat, count, type, op, root,!!!!!! MPI_COMM_WORLD, ierr ) count = 8, op = MPI_SUM root= 4 8 6 4 4 4 4 5 5 5 5 4 6 6 6 6 8 7 7 7 7 8 8 8 8 86

for( root=; root<n-; root++ ) MPI_Gather(..., root,... ); for( root=; root<n-; root++ ) MPI_Reduce(..., root,... ); 86

C: MPI_Alltoall( void *sdat, int scount, MPI_Datatype stype,!!!!! void *rdat, int rcount, MPI_Datatype rtype,!!!!! MPI_COMM_WORLD ) F:! MPI_ALLTOALL( sdat, scount, stype, rdat, rcount, rtype,!!!!! MPI_COMM_WORLD, ierr ) scount = rcount = 8 9 6 7 4 5 4 5 6 7 8 9 8 9 6 7 4 5 4 5 6 7 8 9 8 9 6 7 4 5 4 5 6 7 8 9 86

C: MPI_Alltoall( void *sdat, int scount, MPI_Datatype stype,!!!!! void *rdat, int rcount, MPI_Datatype rtype,!!!!! MPI_COMM_WORLD ) F:! MPI_ALLTOALL( sdat, scount, stype, rdat, rcount, rtype,!!!!! MPI_COMM_WORLD, ierr ) scount = rcount = 8 9 rank 6 7 4 5 4 5 6 7 8 9 rank 8 9 6 7 4 5 4 5 6 7 8 9 rank 8 9 6 7 4 5 4 5 6 7 rank 8 9 86

C:!MPI_Barrier( MPI_COMM_WORLD ) F:!MPI_BARRIER( MPI_COMM_WORLD, ierr ) 86

86

C:!MPI_Comm_dup( MPI_Comm comm, MPI_Comm *new )! MPI_Comm_free( MPI_Comm *comm ) F:!MPI_COMM_DUP( comm, new, ierr)! MPI_COMM_FREE( comm, ierr ) 86

C:!MPI_Comm_split( MPI_Comm comm, int color, int key,!!!!!!!! MPI_Comm *new ) F:!MPI_COMM_SPLIT( COMM, color, key, new, ierr ) 86

86

86

86

86

86