untitled

Size: px
Start display at page:

Download "untitled"

Transcription

1 RIKEN AICS Summer School 3 4 MPI

2 6 MPI MPI 2

3 allocatable 2 Fox mpi_sendrecv 3

4 3 FFT mpi_alltoall MPI_PROC_NULL 4

5 FX10 /home/guest/guest07/school/ 5

6 1 A (i, j) i+j x i i y = Ax A x y y 1 y i A i x do i=1, n y(i)=zero do j=1, n y(i)=y(i)+a(i,j)*x(j) 6

7 mv.f90 program mv implicit none integer, parameter :: n=100 integer :: i,j integer, parameter :: SP = kind(1.0) integer, parameter :: DP = selected_real_kind(2*precision(1.0_sp)) real(dp), dimension(n,n) :: a real(dp), dimension(n) :: x,y real(dp) :: ans,err real(dp), parameter :: zero=0.0 do i=1, n x(i)=i do i=1, n do j=1, n A x a(i,j)=i+j do i=1, n y(i)=zero do j=1, n y = Ax y(i)=y(i)+a(i,j)*x(j) err=0.0d0 do i=1, n ans=dble(i*n*(n+1)/2+n*(n+1)*(2*n+1)/6) err=err+abs(y(i)-ans) print *, 'error =', err end program mv 7

8 1-1 mv.f90 cp /home/guest/guest07/school/mv.f90. cp /home/guest/guest07/school/sample1.sh. frtpx mv.f90 FORTRAN pjsub sample1.sh C fccpx -O1 -Klib mv.c more sample1.sh.oxxxx error =

9 A x PU A x mpi_reduce PU0 y A x y PU0 PU1 PU2 PU3 + 9

10 mpi_reduce root call mpi_reduce(sendbuff,recvbuff,count,datatype,op,root, comm,ierr) sendbuff recvbuff count datatype op root comm ierr root 10

11 mpi_reduce 1 mpi_sum mpi_prod, mpi_max, mpi_min x 1 x 2 x m n x = x 1 + x x m count n 11

12 Mpi_Reduce C root int MPI_Reduce(void *sendbuff, void *recvbuff, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) sendbuff recvbuff count datatype op root comm root 12

13 1-2 mv.f90 istart iend MPI istart=n*myrank/nprocs+1 iend=n*(myrank+1)/nprocs istart iend A x A : istart iend x : istart iend j=istart, iend y yp mpi_reduce yp PU0 y mpi_reduce 3 count n 13

14 MPI mpifrtpx xxx.f90 mpifccpx -O1 -Klib xxx.c FORTRAN C /home/guest/guest07/school/sample_mpi.sh 8 -n 4 pjsub sample_mpi.sh 14

15 A x A: istart iend x: istart iend allocatable allocate x istart 15

16 program mv_reduce2 use mpi implicit none integer, parameter :: n=100 integer :: i,j,istart,iend integer, parameter :: SP = kind(1.0) integer, parameter :: DP = selected_real_kind(2*precision(1.0_sp)) real(dp), dimension(:,:), allocatable :: a real(dp), dimension(:), allocatable :: x MPI istart iend allocate(a(n,istart:iend)) allocate(x(istart:iend)) A x mpi_reduce y 0 A x A x A x istart deallocate(a) deallocate(x) call mpi_finalize(ierr) end program mv_reduce2 A x 16

17 mpi_wtime mpi_reduce n=

18 2 n n A B C P n P A B C A B C Fox 18

19 Fox program fox MPI A,B,C,A TMP,B TMP I num,j num 0 I num, J num < P A,B C 0 do K = 1, P IF (J num = MOD(I num +K-1, P)) A A TMP A TMP IF (K > 1) THEN 1 B TMP 1 B END IF B B TMP C += A TMP B TMP C MPI stop end 19

20 Fox A TMP I num mpi_bcast B 0 B 1 B 2 B 3 = B 0 B 1 B 2 B 3 B TMP 1 PU 1 PU B 0 B 1 B 2 B 3 = B 0 B 1 B 2 B 3 20

21 2 0 1 a0 1 0 a1 0 1 program main parameter(n= ) double precision a0(n),a1(n) if (myrank.eq.0) then call mpi_send(a0,n,mpi_double,1,100,mpi_comm_world,ierr) call mpi_recv(a1,n,mpi_double,1,200,mpi_comm_world,istat,ierr) else call mpi_send(a1,n,mpi_double,0,200,mpi_comm_world,ierr) call mpi_recv(a0,n,mpi_double,0,100,mpi_comm_world,istat,ierr) end if stop end a0 a1 21

22 0 a0 a1 0 1 a0 a0 22

23 mpi_sendrecv mpi_send mpi_recv send recv call mpi_sendrecv(sendbuff,sendcount,sendtype,dest,sendtag, recvbuff,recvcount,recvtype,source,recvtag, comm,status,ierr) 23

24 MPI_Sendrecv C mpi_send mpi_recv send recv int Mpi_Sendrecv(void *sendbuff, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuff, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status status) 24

25 Fox K>1 mpi_sendrecv B TMP 1 P B B 1 P 25

26 icolor mpi_comm_split key mpi_comm_split call mpi_comm_split(old_comm,icolor,key,new_comm,ierr) old_comm icolor key new_comm ierr 26

27 MPI_Comm_split C Int Mpi_Comm_split(MPI_Comm old_comm, int icolor, int key, MPI_Comm new_comm) old_comm icolor key new_comm 27

28 mpi_comm_world I num key myrank call mpi_comm_split(mpi_comm_world,inum,myrank,new_comm,ierr) J num new_comm J num mpi_comm_world myrank new_comm J num I num =0 I num =1 I num =2 I num = mpi_comm_world new_comm 28

29 Fox fox.f90 program fox use mpi implicit none integer, parameter :: n=100 integer :: i,j,k,kk,myrank,nprocs,nblock,nblock2,npsqrt integer :: inum,jnum,newcomm,idst,isrc,itag,ierr,ig,jg MPI dnprocs=nprocs npsqrt=sqrt(dnprocs) nblock=n/npsqrt npsqrt nblock nblock2=nblock*nblock inum=myrank/npsqrt jnum=mod(myrank,npsqrt) inum jnum new_comm a b c mpi_sendrecv idst isrc 29

30 Fox do kk=1,npsqrt if (jnum == mod(inum+kk-1,npsqrt)) atmp(:,:) = a(:,:) A ATMP new_comm ATMP if (kk > 1) then mpi_sendrecv BTMP end if btmp(:,:) = b(:,:) B BTMP do j=1,nblock do i=1,nblock do k=1,nblock c(i,j)=c(i,j)+atmp(i,k)*btmp(k,j) C += ATMP BTMP MPI end program fox 30

31 2-1 Fox 4 16 error 0 result OK n=

32 3 3 FFT u m P P 3 P u 2 m P 2 u 3 PU PU0 PU1 PU2 PU3 PU4 PU5 PU6 PU7 P m P 2 PU

33 mpi_alltoall sendbuf sendcount 0, 1,, nprocs-1 0, 1,, nprocs-1 recvcount recvbuf call mpi_alltoall(sendbuff,sendcount,sendtype,recvbuf, recvcount,recvtype,comm,ierr) sendbuff sendcount sendtype recvbuff recvcount recvtype comm ierr 33

34 Mpi_Alltoall C sendbuf sendcount 0, 1,, nprocs-1 0, 1,, nprocs-1 recvcount recvbuf int Mpi_Alltoall(void *sendbuff, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) sendbuff sendcount sendtype recvbuff recvcount recvtype comm 34

35 mpi_alltoall alltoall.f90 program alltoall use mpi implicit none integer, parameter :: m=99 integer :: j,k real(dp), dimension(:,:), allocatable :: u,un MPI u: un allocate(u(m,nprocs)) allocate(un(m,nprocs)) do k=1, nprocs do j=1, m u(j,k)=real(j+k-1,dp) u un u mpi_alltoall err=0.0_dp do k=1,nprocs do j=1,m err=err+(abs(un(j,k))-myrank-j) MPI end program alltoall 35

36 3-1 2 u(m,nprocs) 1 u(m*nprocs) m 0, 1,, nprocs-1 2 un(m,nprocs) 1 un(m*nprocs) 4 16 error 0 result OK 36

37 4 2 [0,1] [0,1] 0 u(0, y) = 0 u(1, y) = 0 u(x, 0) = 0 u(x, 1) = 0 y x 37

38 u/ t = 2 u + f u: f n (i, j) u ij (n) y 1 (i,j+1) (i-1,j) (i,j) (i+1,j) u ij (n+1) = (u i-1,j (n) + u i+1,j (n) + u i,j-1 (n) + u i,j+1 (n) ) / 4 + f ij 0 (i,j-1) 1 x 38

39 do j=1, m do i=1, m u ij (n+1) = (u i-1,j (n) + u i+1,j (n) + u i,j-1 (n) + u i,j+1 (n) ) / 4 + f ij y 1 y 1 (i,j+1) (i,j+1) (i-1,j) (i,j) (i+1,j) (i-1,j) (i,j) (i+1,j) (i,j-1) (i,j-1) 0 n 1 x 0 n+1 1 x 39

40 heat1.f90 program heat1 implicit none integer, parameter :: m=49, nmax=20000 integer :: i,j,n integer, parameter :: SP = kind(1.0) integer, parameter :: DP = selected_real_kind(2*precision(1.0_sp)) real(dp), dimension(:,:), allocatable :: u, un real(dp) :: h, heat=1.0_dp allocate(u(0:m+1,0:m+1)) allocate(un(m,m)) h=1.0_dp/(m+1) u=0.0_dp do n=1, nmax do j=1, m do i=1, m un(i,j)=(u(i-1,j)+u(i+1,j)+u(i,j-1)+u(i,j+1))/4.0_dp+heat*h*h u(1:m,1:m) = un(1:m,1:m) if (mod(n,100)==0) print *, n, u((m+1)/2,(m+1)/2) end program heat ,000 u: 1 un: un u 40

41 4-1 heat1.f90 ((m+1)/2, (m+1)/2)

42 PU0 PU1 PU2 PU3 u PU 1 42

43 jstart jend jstart-1 jend+1 mpi_sendrecv jend jstart-1 jstart jend+1 MPI_PROC_NULL 1 sendrecv 2 sendrecv 43

44 sendrecv.f90 program sendrecv use mpi implicit none integer, parameter :: m=99 integer :: i,j,jstart,jend integer, parameter :: SP = kind(1.0) integer, parameter :: DP = selected_real_kind(2*precision(1.0_sp)) real(dp), dimension(:,:), allocatable :: u real(dp) :: err integer :: nprocs,myrank,ierr,left,right integer, dimension(mpi_status_size) :: istat call mpi_init(ierr) call mpi_comm_size(mpi_comm_world,nprocs,ierr) call mpi_comm_rank(mpi_comm_world,myrank,ierr) jstart=m*myrank/nprocs+1 jend=m*(myrank+1)/nprocs allocate(u(m,jstart-1:jend+1)) do i=1, m do j=jstart, jend u(i,j)=real(i+j,dp) jstart-1 jend+1 44

45 left=myrank-1 if (myrank==0) left=mpi_proc_null right=myrank+1 if (myrank==nprocs-1) MPI_PROC_NULL call mpi_sendrecv(u(1,jend),m,mpi_double_precision,right,100, & & u(1,jstart-1),m,mpi_double_precision,left,100, & & MPI_COMM_WORLD,istat,ierr) call mpi_sendrecv(u(1,jstart),m,mpi_double_precision,left,100, & & u(1,jend+1),m,mpi_double_precision,right,100, & & MPI_COMM_WORLD,istat,ierr) err=0.0_dp if (myrank/=0) then do i=1, m err=err+abs(u(i,jstart-1)-real(i+mod(jstart+m-2,m)+1,dp)) end if if (myrank/=nprocs-1) then do i=1, m err=err+abs(u(i,jend+1)-real(i+mod(jend,m)+1,dp)) end if print *, 'myrank =', myrank, 'error =', err call mpi_finalize(ierr) end program sendrecv MPI_PROC_NULL mpi_sendrecv 45

46 4-2 sendrecv.f error =

47 heat1.f90 2 u un un jstart jend u jstart-1 jend+1 un u jstart-1 u jend+1 sendrecv.f90 mpi_sendrecv un jstart jend 1 47

48 heat1.f90 I jstart jend sendrecvf.90 allocate(u(0:m+1,jstart-1:jend+1)) allocate(un(m,jstart:jend)) u jstart jend 0 left right MPI_PROC_NULL 48

49 heat1.f90 II u jstart-1 jend+1 sendrecv.f90 mpi_sendrecv 2 0 u jstart-1 0 nprocs-1 u jend+1 0 jstart jend un jstart jend un u (m/2,m/2) 100 if (jstart <= m/2.and. jend >= m/2) 49

50 4-3 heat1.f90 MPI 4 8 heat1.f m

51 4-4 MPI un i j 2 OpenMP FORTRAN compile_heat2_hybridf.sh heat2_hybrid.f90 sample_heat2_hybridf.sh C compile_heat2_hybridc.sh heat2_hybrid.c sample_heat2_hybridc.sh MPI 51

(Microsoft PowerPoint \211\211\217K3_4\201i\216R\226{_\211\272\215\342\201j.ppt [\214\335\212\267\203\202\201[\203h])

(Microsoft PowerPoint \211\211\217K3_4\201i\216R\226{_\211\272\215\342\201j.ppt [\214\335\212\267\203\202\201[\203h]) RIKEN AICS Summer School 演習 3 4 MPI による並列計算 2012 年 8 月 8 日 神戸大学大学院システム情報学研究科山本有作理化学研究所計算科学研究機構下坂健則 1 演習の目標 講義 6 並列アルゴリズム基礎 で学んだアルゴリズムのいくつかを,MPI を用いて並列化してみる これを通じて, 基本的な並列化手法と,MPI 通信関数の使い方を身に付ける 2 取り上げる例題と学習項目

More information

untitled

untitled I 9 MPI (II) 2012 6 14 .. MPI. 1-3 sum100.f90 4 istart=myrank*25+1 iend=(myrank+1)*25 0 1 2 3 mpi_recv 3 isum1 1 isum /tmp/120614/sum100_4.f90 program sum100_4 use mpi implicit none integer :: i,istart,iend,isum,isum1,ip

More information

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

Microsoft PowerPoint - 演習1:並列化と評価.pptx 講義 2& 演習 1 プログラム並列化と性能評価 神戸大学大学院システム情報学研究科横川三津夫 yokokawa@port.kobe-u.ac.jp 2014/3/5 RIKEN AICS HPC Spring School 2014: プログラム並列化と性能評価 1 2014/3/5 RIKEN AICS HPC Spring School 2014: プログラム並列化と性能評価 2 2 次元温度分布の計算

More information

Microsoft PowerPoint _MPI-03.pptx

Microsoft PowerPoint _MPI-03.pptx 計算科学演習 Ⅰ ( 第 11 回 ) MPI を いた並列計算 (III) 神戸大学大学院システム情報学研究科横川三津夫 yokokawa@port.kobe-u.ac.jp 2014/07/03 計算科学演習 Ⅰ:MPI を用いた並列計算 (III) 1 2014/07/03 計算科学演習 Ⅰ:MPI を用いた並列計算 (III) 2 今週の講義の概要 1. 前回課題の解説 2. 部分配列とローカルインデックス

More information

Microsoft PowerPoint - KHPCSS pptx

Microsoft PowerPoint - KHPCSS pptx KOBE HPC サマースクール 2018( 初級 ) 9. 1 対 1 通信関数, 集団通信関数 2018/8/8 KOBE HPC サマースクール 2018 1 2018/8/8 KOBE HPC サマースクール 2018 2 MPI プログラム (M-2):1 対 1 通信関数 問題 1 から 100 までの整数の和を 2 並列で求めなさい. プログラムの方針 プロセス0: 1から50までの和を求める.

More information

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

±é½¬£²¡§£Í£Ð£É½éÊâ 2012 8 7 1 / 52 MPI Hello World I ( ) Hello World II ( ) I ( ) II ( ) ( sendrecv) π ( ) MPI fortran C wget http://www.na.scitec.kobe-u.ac.jp/ yaguchi/riken2012/enshu2.zip unzip enshu2.zip 2 / 52 FORTRAN

More information

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

演習準備 2014 年 3 月 5 日神戸大学大学院システム情報学研究科森下浩二 1 RIKEN AICS HPC Spring School /3/5 演習準備 2014 年 3 月 5 日神戸大学大学院システム情報学研究科森下浩二 1 演習準備の内容 神戸大 FX10(π-Computer) 利用準備 システム概要 ログイン方法 コンパイルとジョブ実行方法 MPI 復習 1. MPIプログラムの基本構成 2. 並列実行 3. 1 対 1 通信 集団通信 4. データ 処理分割 5. 計算時間計測 2 神戸大 FX10(π-Computer) 利用準備

More information

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

Microsoft PowerPoint - 演習2:MPI初歩.pptx 演習 2:MPI 初歩 - 並列に計算する - 2013 年 8 月 6 日 神戸大学大学院システム情報学研究科計算科学専攻横川三津夫 MPI( メッセージ パッシング インターフェース ) を使おう! [ 演習 2 の内容 ] はじめの一歩課題 1: Hello, world を並列に出力する. 課題 2: プロセス 0 からのメッセージを受け取る (1 対 1 通信 ). 部分に分けて計算しよう課題

More information

演習準備

演習準備 演習準備 2014 年 3 月 5 日神戸大学大学院システム情報学研究科森下浩二 1 演習準備の内容 神戸大 FX10(π-Computer) 利用準備 システム概要 ログイン方法 コンパイルとジョブ実行方法 MPI 復習 1. MPIプログラムの基本構成 2. 並列実行 3. 1 対 1 通信 集団通信 4. データ 処理分割 5. 計算時間計測 2 神戸大 FX10(π-Computer) 利用準備

More information

MPI usage

MPI usage MPI (Version 0.99 2006 11 8 ) 1 1 MPI ( Message Passing Interface ) 1 1.1 MPI................................. 1 1.2............................... 2 1.2.1 MPI GATHER.......................... 2 1.2.2

More information

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

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 22 6 22 MPI MPI 1 1 2 2 3 MPI 3 4 7 4.1.................................. 7 4.2 ( )................................ 10 4.3 (Allreduce )................................. 12 5 14 5.1........................................

More information

Microsoft PowerPoint _MPI-01.pptx

Microsoft PowerPoint _MPI-01.pptx 計算科学演習 Ⅰ MPI を いた並列計算 (I) 神戸大学大学院システム情報学研究科谷口隆晴 yaguchi@pearl.kobe-u.ac.jp この資料は昨年度担当の横川先生の資料を参考にさせて頂いています. 2016/06/23 MPI を用いた並列計算 (I) 1 講義概要 分散メモリ型計算機上のプログラミング メッセージ パシング インターフェイス (Message Passing Interface,MPI)

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション 計算科学演習 I 第 8 回講義 MPI を用いた並列計算 (I) 2013 年 6 月 6 日 システム情報学研究科計算科学専攻 山本有作 今回の講義の概要 1. MPI とは 2. 簡単な MPI プログラムの例 (1) 3. 簡単な MPI プログラムの例 (2):1 対 1 通信 4. 簡単な MPI プログラムの例 (3): 集団通信 共有メモリ型並列計算機 ( 復習 ) 共有メモリ型並列計算機

More information

120802_MPI.ppt

120802_MPI.ppt CPU CPU CPU CPU CPU SMP Symmetric MultiProcessing CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CP OpenMP MPI MPI CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU MPI MPI+OpenMP CPU CPU CPU CPU CPU CPU CPU CP

More information

para02-2.dvi

para02-2.dvi 2002 2 2002 4 23 : MPI MPI 1 MPI MPI(Message Passing Interface) MPI UNIX Windows Machintosh OS, MPI 2 1 1 2 2.1 1 1 1 1 1 1 Fig. 1 A B C F Fig. 2 A B F Fig. 1 1 1 Fig. 2 2.2 Fig. 3 1 . Fig. 4 Fig. 3 Fig.

More information

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

Microsoft PowerPoint - S1-ref-F.ppt [互換モード] 課題 S1 解説 Fortran 言語編 RIKEN AICS HPC Summer School 2014 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大 計算科学教育センター ) MPI Programming 課題 S1 (1/2) /a1.0~a1.3, /a2.0~a2.3 から局所ベクトル情報を読み込み, 全体ベクトルのノルム ( x ) を求めるプログラムを作成する

More information

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

演習 II 2 つの講義の演習 奇数回 : 連続系アルゴリズム 部分 偶数回 : 計算量理論 部分 連続系アルゴリズム部分は全 8 回を予定 前半 2 回 高性能計算 後半 6 回 数値計算 4 回以上の課題提出 ( プログラム + 考察レポート ) で単位 演習 II ( 連続系アルゴリズム ) 第 1 回 : MPI 須田研究室 M2 本谷徹 motoya@is.s.u-tokyo.ac.jp 2012/10/05 2012/10/18 補足 訂正 演習 II 2 つの講義の演習 奇数回 : 連続系アルゴリズム 部分 偶数回 : 計算量理論 部分 連続系アルゴリズム部分は全 8 回を予定 前半 2 回 高性能計算 後半 6 回 数値計算 4 回以上の課題提出

More information

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

Microsoft PowerPoint MPI.v...O...~...O.e.L.X.g(...Q..) MPI プログラミング Information Initiative Center, Hokkaido Univ. MPI ライブラリを利用した分散メモリ型並列プログラミング 分散メモリ型並列処理 : 基礎 分散メモリマルチコンピュータの構成 プロセッサエレメントが専用のメモリ ( ローカルメモリ ) を搭載 スケーラビリティが高い 例 :HITACHI SR8000 Interconnection

More information

コードのチューニング

コードのチューニング ハイブリッド並列 八木学 ( 理化学研究所計算科学研究機構 ) 謝辞 松本洋介氏 ( 千葉大学 ) KOBE HPC Spring School 2017 2017 年 3 月 14 日神戸大学計算科学教育センター MPI とは Message Passing Interface 分散メモリのプロセス間の通信規格(API) SPMD(Single Program Multi Data) が基本 -

More information

コードのチューニング

コードのチューニング MPI による並列化実装 ~ ハイブリッド並列 ~ 八木学 ( 理化学研究所計算科学研究センター ) KOBE HPC Spring School 2019 2019 年 3 月 14 日 MPI とは Message Passing Interface 分散メモリのプロセス間の通信規格(API) SPMD(Single Program Multi Data) が基本 - 各プロセスが 同じことをやる

More information

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

MPI () MPIMessage Passing Interface MPI MPI OpenMP 7 ( ) 1 7 MPI / 7 (2014 05 21 ) MPI () MPIMessage Passing Interface MPI MPI OpenMP 7 (2014 05 21 ) 1 (MPI) 7 (2014 05 21 ) 2 (OpenMP) 7 (2014 05 21 ) 3 (MPI + OpenMP) 7 (2014 05 21 ) 4 MPI (1) MPI1 OpenMP 1 pragma

More information

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

C/C++ FORTRAN FORTRAN MPI MPI MPI UNIX Windows (SIMD Single Instruction Multipule Data) SMP(Symmetric Multi Processor) MPI (thread) OpenMP[5] MPI ( ) snozawa@env.sci.ibaraki.ac.jp 1 ( ) MPI MPI Message Passing Interface[2] MPI MPICH[3],LAM/MPI[4] (MIMDMultiple Instruction Multipule Data) Message Passing ( ) (MPI (rank) PE(Processing Element)

More information

86

86 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) /

More information

main() {... } main() { main() { main() {......... } } } main() { main() { main() {......... } } } main() { if(rank==)... } main() { if(rank==)... } main() { if(rank==x)... } P(N) P(N) / P(M) * ( M / N

More information

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

課題 S1 解説 Fortran 編 中島研吾 東京大学情報基盤センター 課題 S1 解説 Fortran 編 中島研吾 東京大学情報基盤センター 内容 課題 S1 /a1.0~a1.3, /a2.0~a2.3 から局所ベクトル情報を読み込み, 全体ベクトルのノルム ( x ) を求めるプログラムを作成する (S1-1) file.f,file2.f をそれぞれ参考にする 下記の数値積分の結果を台形公式によって求めるプログラムを作成する

More information

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

Microsoft PowerPoint - 講義:片方向通信.pptx MPI( 片方向通信 ) 09 年 3 月 5 日 神戸大学大学院システム情報学研究科計算科学専攻横川三津夫 09/3/5 KOBE HPC Spring School 09 分散メモリ型並列計算機 複数のプロセッサがネットワークで接続されており, れぞれのプロセッサ (PE) が, メモリを持っている. 各 PE が自分のメモリ領域のみアクセス可能 特徴数千から数万 PE 規模の並列システムが可能

More information

目 目 用方 用 用 方

目 目 用方 用 用 方 大 生 大 工 目 目 用方 用 用 方 用 方 MS-MPI MPI.NET MPICH MPICH2 LAM/MPI Ver. 2 2 1 2 1 C C++ Fortan.NET C# C C++ Fortan 用 行 用 用 用 行 用 言 言 言 行 生 方 方 一 行 高 行 行 文 用 行 If ( rank == 0 ) { // 0 } else if (rank == 1) {

More information

I I / 47

I I / 47 1 2013.07.18 1 I 2013 3 I 2013.07.18 1 / 47 A Flat MPI B 1 2 C: 2 I 2013.07.18 2 / 47 I 2013.07.18 3 / 47 #PJM -L "rscgrp=small" π-computer small: 12 large: 84 school: 24 84 16 = 1344 small school small

More information

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

Microsoft PowerPoint - 講義:コミュニケータ.pptx コミュニケータとデータタイプ (Communicator and Datatype) 2019 年 3 月 15 日 神戸大学大学院システム情報学研究科横川三津夫 2019/3/15 Kobe HPC Spring School 2019 1 講義の内容 コミュニケータ (Communicator) データタイプ (Datatype) 演習問題 2019/3/15 Kobe HPC Spring School

More information

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

Microsoft PowerPoint - MPIprog-F2.ppt [互換モード] MPI によるプログラミング概要 ( その ) Fortran 言語編 RIKEN AICS HPC Summer School 01 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大学 計算科学教育センター ) 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データ グループ通信 (Collective Communication) 1 対 1 通信

More information

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

<4D F736F F F696E74202D D F95C097F D834F E F93FC96E5284D F96E291E85F8DE391E52E > SX-ACE 並列プログラミング入門 (MPI) ( 演習補足資料 ) 大阪大学サイバーメディアセンター日本電気株式会社 演習問題の構成 ディレクトリ構成 MPI/ -- practice_1 演習問題 1 -- practice_2 演習問題 2 -- practice_3 演習問題 3 -- practice_4 演習問題 4 -- practice_5 演習問題 5 -- practice_6

More information

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

講義の流れ 並列プログラムの概要 通常のプログラムと並列プログラムの違い 並列プログラム作成手段と並列計算機の構造 OpenMP による並列プログラム作成 処理を複数コアに分割して並列実行する方法 MPI による並列プログラム作成 ( 午後 ) プロセス間通信による並列処理 処理の分割 + データの ( 財 ) 計算科学振興財団 大学院 GP 大学連合による計算科学の最先端人材育成 第 1 回社会人向けスパコン実践セミナー資料 29 年 2 月 17 日 13:15~14:45 九州大学情報基盤研究開発センター 南里豪志 1 講義の流れ 並列プログラムの概要 通常のプログラムと並列プログラムの違い 並列プログラム作成手段と並列計算機の構造 OpenMP による並列プログラム作成 処理を複数コアに分割して並列実行する方法

More information

2012 6 1 MPI 1995 8 2002 2003 ( 2) MPI http://accc.riken.jp/hpc/training.html iii 1 1 1-1.......................................... 2 1-2........................................... 4 2 9 2-1...............................................

More information

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

<4D F736F F F696E74202D C097F B A E B93C782DD8EE682E890EA97705D> 並列アルゴリズム 2005 年後期火曜 2 限青柳睦 Aoyagi@cc.kyushu-u.ac.jp http//server-500.cc.kyushu-u.ac.jp/ 11 月 29( 火 ) 7. 集団通信 (Collective Communication) 8. 領域分割 (Domain Decomposition) 1 もくじ 1. 序並列計算機の現状 2. 計算方式およびアーキテクチュアの分類

More information

2 /83

2 /83 1 /83 2 /83 3 /83, 4 /83 ( ) myrank ), FX10, Blue Gene, Anton : MPI. : ( ). MPICH, OpenMPI ( ) MPI 1 MPI NIC memory CPU 0 (myrank=0) 5 nprocs=2 /83 NIC memory CPU 1 (myrank=1) 6 /83 hello_mpi.f: include

More information

CS

CS 性能並列計算法特論 第 10 回 情報基盤研究開発センター 野謙 2017 年 7 11 ( ) 成績評価 その他の連絡事項 出席点 5 割 + 期末試験 ( レポート作成 )5 割 講義資料は毎回配布予定です 席した場合, 各 でダウンロードしてください http://mercury.cc.kyushu-u.ac.jp/lecture_2017/ PDF 版をその週の 曜の朝までには公開予定 講義開始後約

More information

NUMAの構成

NUMAの構成 メッセージパッシング プログラミング 天野 共有メモリ対メッセージパッシング 共有メモリモデル 共有変数を用いた単純な記述自動並列化コンパイラ簡単なディレクティブによる並列化 :OpenMP メッセージパッシング 形式検証が可能 ( ブロッキング ) 副作用がない ( 共有変数は副作用そのもの ) コストが小さい メッセージパッシングモデル 共有変数は使わない 共有メモリがないマシンでも実装可能 クラスタ

More information

WinHPC ppt

WinHPC ppt MPI.NET C# 2 2009 1 20 MPI.NET MPI.NET C# MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World MPI.NET.NET Framework.NET C# API C# Microsoft.NET java.net (Visual Basic.NET Visual C++) C# class Helloworld

More information

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

¥Ñ¥Ã¥±¡¼¥¸ Rhpc ¤Î¾õ¶· Rhpc COM-ONE 2015 R 27 12 5 1 / 29 1 2 Rhpc 3 forign MPI 4 Windows 5 2 / 29 1 2 Rhpc 3 forign MPI 4 Windows 5 3 / 29 Rhpc, R HPC Rhpc, ( ), snow..., Rhpc worker call Rhpc lapply 4 / 29 1 2 Rhpc 3 forign

More information

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,

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, ( ) 1 : ( ) Sampling/Imporance resampling (SIR) Kiagawa (1993, 1996), Gordon(1993) EnKF EnKF EnKF 1CPU 1core 2 x = f (x 1, v ) y = h (x, w ) (1a) (1b) PF p(x y 1 ) {x (i) 1 }N i=1, p(x y ) {x (i) }N i=1

More information

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

Microsoft PowerPoint - MPIprog-C2.ppt [互換モード] MPI によるプログラミング概要 ( その ) C 言語編 RIKEN AICS HPC Summer School 01 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大学 計算科学教育センター ) 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データ グループ通信 (Collective Communication) 1 対 1 通信 (Peer-to-Peer

More information

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

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë 2011 5 26 scalar Open MP Hello World Do (omp do) (omp workshare) (shared, private) π (reduction) scalar magny-cours, 48 scalar scalar 1 % scp. ssh / authorized keys 133. 30. 112. 246 2 48 % ssh 133.30.112.246

More information

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

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë 2012 5 24 scalar Open MP Hello World Do (omp do) (omp workshare) (shared, private) π (reduction) PU PU PU 2 16 OpenMP FORTRAN/C/C++ MPI OpenMP 1997 FORTRAN Ver. 1.0 API 1998 C/C++ Ver. 1.0 API 2000 FORTRAN

More information

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

4th XcalableMP workshop 目的 n XcalableMPのローカルビューモデルであるXMPのCoarray機能を用 いて Fiberミニアプリ集への実装と評価を行う PGAS(Pertitioned Global Address Space)言語であるCoarrayのベ ンチマ 4th XcalableMP workshop 目的 n XcalableMPのローカルビューモデルであるXMPのCoarray機能を用 いて Fiberミニアプリ集への実装と評価を行う PGAS(Pertitioned Global Address Space)言語であるCoarrayのベ ンチマークとして整備することも考慮している n Coarrayによる並列化に関する知見を得る 1 n n l

More information

2012年度HPCサマーセミナー_多田野.pptx

2012年度HPCサマーセミナー_多田野.pptx ! CCS HPC! I " tadano@cs.tsukuba.ac.jp" " 1 " " " " " " " 2 3 " " Ax = b" " " 4 Ax = b" A = a 11 a 12... a 1n a 21 a 22... a 2n...... a n1 a n2... a nn, x = x 1 x 2. x n, b = b 1 b 2. b n " " 5 Gauss LU

More information

I

I I 1 2016.07.21 MPI OpenMP 84 1344 gnuplot Xming Tera term cp -r /tmp/160721 chmod 0 L x L y 0 k T (x, t) k: T t = k 2 T x 2 T t = s s : heat source 1D T (x, t) t = k 2 T (x, t) x 2 + s(x) 2D T (x,

More information

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

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£²¡Ë 2013 5 30 (schedule) (omp sections) (omp single, omp master) (barrier, critical, atomic) program pi i m p l i c i t none integer, parameter : : SP = kind ( 1. 0 ) integer, parameter : : DP = selected real

More information

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

情報処理概論(第二日目) 1 並列プログラミング超入門講習会 九州大学情報基盤研究開発センター MPI コース 2 並列計算機の構成 計算ノード ネットワーク CPU コア メモリ アクセラレータ (GPU 等 ) 例 : スーパーコンピュータシステム ITO サブシステム B ノード数 CPU 数 / ノードコア数 / CPU GPU 数 / ノード 128 2 18 4 MPI (Message Passing Interface)

More information

スライド 1

スライド 1 計算科学演習 MPI 基礎 学術情報メディアセンター情報学研究科 システム科学専攻中島浩 目次 プログラミングモデル SPMD 同期通信 / 非同期通信 MPI 概論 プログラム構造 Communicator & rank データ型 タグ 一対一通信関数 1 次元分割並列化 : 基本 基本的考え方 配列宣言 割付 部分領域交換 結果出力 1 次元分割並列化 : 高速化 通信 計算のオーバーラップ 通信回数削減

More information

第8回講義(2016年12月6日)

第8回講義(2016年12月6日) 2016/12/6 スパコンプログラミング (1) (Ⅰ) 1 行列 - 行列積 (2) 東京大学情報基盤センター准教授塙敏博 2016 年 12 月 6 日 ( 火 ) 10:25-12:10 2016/11/29 講義日程 ( 工学部共通科目 ) 1. 9 月 27 日 ( 今日 ): ガイダンス 2. 10 月 4 日 l 並列数値処理の基本演算 ( 座学 ) 3. 10 月 11 日 : スパコン利用開始

More information

MPI コミュニケータ操作

MPI コミュニケータ操作 コミュニケータとデータタイプ 辻田祐一 (RIKEN AICS) 講義 演習内容 MPI における重要な概念 コミュニケータ データタイプ MPI-IO 集団型 I/O MPI-IO の演習 2 コミュニケータ MPI におけるプロセスの 集団 集団的な操作などにおける操作対象となる MPI における集団的な操作とは? 集団型通信 (Collective Communication) 集団型 I/O(Collective

More information

スライド 1

スライド 1 計算科学演習 MPI 基礎 学術情報メディアセンター 情報学研究科 システム科学専攻 中島浩 目次 プログラミングモデル SPMD 同期通信 / 非同期通信 MPI 概論 プログラム構造 Communicator & rank データ型 タグ 一対一通信関数 1 次元分割並列化 : 基本 基本的考え方 配列宣言 割付 部分領域交換 結果出力 1 次元分割並列化 : 高速化 通信 計算のオーバーラップ

More information

スライド 1

スライド 1 目次 2.MPI プログラミング入門 この資料は, スーパーコン 10 で使用したものである. ごく基本的な内容なので, 現在でも十分利用できると思われるものなので, ここに紹介させて頂く. ただし, 古い情報も含まれているので注意が必要である. 今年度版の解説は, 本選の初日に配布する予定である. 1/20 2.MPI プログラミング入門 (1) 基本 説明 MPI (message passing

More information

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

Microsoft PowerPoint - MPIprog-F1.ppt [互換モード] MPI によるプログラミング概要 ( その 1) Fortran 言語編 RIKEN AICS HPC Summer School 2015 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大 計算科学教育センター ) 1 本 school の目的 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的

More information

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

Microsoft PowerPoint - MPIprog-F [互換モード] MPI によるプログラミング概要 課題 S1 S2 出題 Fortran 編 2012 年夏季集中講義中島研吾 並列計算プログラミング (616-2057) 先端計算機演習 (616-4009) 1 本授業の理念 より 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的 高速 大規模 大規模 の方が 新しい科学

More information

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

Page 2 本資料は, 東北大学サイバーサイエンスセンターと NEC の共同により作成され, 大阪大学サイバーメディアセンターの環境で実行確認を行い, 修正を加えたものです. 無断転載等は, ご遠慮下さい. H26 年度 MPI プログラミング入門 2015 年 1 月 27 日 大坂大学サイバーメディアセンター 日本電気株式会社 Page 2 本資料は, 東北大学サイバーサイエンスセンターと NEC の共同により作成され, 大阪大学サイバーメディアセンターの環境で実行確認を行い, 修正を加えたものです. 無断転載等は, ご遠慮下さい. 目次 1. 並列化概要 2. MPI 概要 3. 演習問題 1 4.

More information

スライド 1

スライド 1 Parallel Programming in MPI part 2 1 1 Today's Topic ノンブロッキング通信 Non-Blocking Communication 通信の完了を待つ間に他の処理を行う Execute other instructions while waiting for the completion of a communication. 集団通信関数の実装 Implementation

More information

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

かし, 異なったプロセス間でデータを共有するためには, プロセス間通信や特殊な共有メモリ領域を 利用する必要がある. このためマルチプロセッサマシンの利点を最大に引き出すことができない. こ の問題はマルチスレッドを用いることで解決できる. マルチスレッドとは,1 つのプロセスの中に複 数のスレッド 0 並列計算について 0.1 並列プログラミングライブラリのメッセージパッシングモデル並列プログラムにはメモリモデルで分類すると, 共有メモリモデルと分散メモリモデルの 2 つに分けられる. それぞれ次のような特徴がある. 共有メモリモデル複数のプロセスやスレッドが事項する主体となり, 互いに通信や同期を取りながら計算が継続される. スレッド間の実行順序をプログラマが保証してやらないと, 思った結果が得られない.

More information

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

課題 S1 解説 C 言語編 中島研吾 東京大学情報基盤センター 課題 S1 解説 C 言語編 中島研吾 東京大学情報基盤センター 内容 課題 S1 /a1.0~a1.3, /a2.0~a2.3 から局所ベクトル情報を読み込み, 全体ベクトルのノルム ( x ) を求めるプログラムを作成する (S1-1) file.f,file2.f をそれぞれ参考にする 下記の数値積分の結果を台形公式によって求めるプログラムを作成する

More information

2 I I / 61

2 I I / 61 2 I 2017.07.13 I 2 2017.07.13 1 / 61 I 2 2017.07.13 2 / 61 I 2 2017.07.13 3 / 61 7/13 2 7/20 I 7/27 II I 2 2017.07.13 4 / 61 π-computer gnuplot MobaXterm Wiki PC X11 DISPLAY I 2 2017.07.13 5 / 61 Mac 1.

More information

2 A I / 58

2 A I / 58 2 A 2018.07.12 I 2 2018.07.12 1 / 58 I 2 2018.07.12 2 / 58 π-computer gnuplot 5/31 1 π-computer -X ssh π-computer gnuplot I 2 2018.07.12 3 / 58 gnuplot> gnuplot> plot sin(x) I 2 2018.07.12 4 / 58 cp -r

More information

11042 計算機言語7回目 サポートページ:

11042 計算機言語7回目  サポートページ: 11042 7 :https://goo.gl/678wgm November 27, 2017 10/2 1(print, ) 10/16 2(2, ) 10/23 (3 ) 10/31( ),11/6 (4 ) 11/13,, 1 (5 6 ) 11/20,, 2 (5 6 ) 11/27 (7 12/4 (9 ) 12/11 1 (10 ) 12/18 2 (10 ) 12/25 3 (11

More information

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 超 入門 (FORTRAN 編 ) 東京大学情報基盤センター Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データタ グループ通信 (Collective Communication) 1 対 1 通信 (Point-to-Point Communication) Fundamental MPI 2 MPI とは (1/2)

More information

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

Microsoft PowerPoint - MPIprog-F1.ppt [互換モード] MPIによるプログラミング 概 要 (その1) Fortran 言 語 編 RIKEN AICS HPC Summer School 2014 中 島 研 吾 ( 東 大 情 報 基 盤 センター) 横 川 三 津 夫 ( 神 戸 大 計 算 科 学 教 育 センター) 1 本 schoolの 目 的 並 列 計 算 機 の 使 用 によって,より 大 規 模 で 詳 細 なシミュレー ションを 高

More information

Microsoft PowerPoint - scls_biogrid_lecture_v2.pptx

Microsoft PowerPoint - scls_biogrid_lecture_v2.pptx スパコン コース並列プログラミング編 善之 E-mail:yoshiyuki.kido@riken.jp 理化学研究所 HPCI 計算 命科学推進プログラム企画調整グループ企画調整チームチーム員 次 1. Message Passing Interface (MPI) 2. Open MP 3. ハイブリッド並列 4. 列計算の並列化 計算機ってなんだ? 計算機 計算に いる機械 ( デジタル 辞泉

More information

040312研究会HPC2500.ppt

040312研究会HPC2500.ppt 2004312 e-mail : m-aoki@jp.fujitsu.com 1 2 PRIMEPOWER VX/VPP300 VPP700 GP7000 AP3000 VPP5000 PRIMEPOWER 2000 PRIMEPOWER HPC2500 1998 1999 2000 2001 2002 2003 3 VPP5000 PRIMEPOWER ( 1 VU 9.6 GF 16GB 1 VU

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション AICS 公開ソフトウェア講習会 15 回 表題通信ライブラリと I/O ライブラリ 場所 AICS R104-2 時間 2016/03/23 ( 水 ) 13:30-17:00 13:30-13:40 全体説明 13:40-14:10 PRDMA 14:10-14:40 MPICH 14:40-15:10 PVAS 15:10-15:30 休憩 15:30-16:00 Carp 16:00-16:30

More information

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

Microsoft PowerPoint 並列アルゴリズム04.ppt 並列アルゴリズム 2005 年後期火曜 2 限 青柳睦 Aoyagi@cc.kyushu-u.ac.jp http://server-500.cc.kyushu-u.ac.jp/ 11 月 8 日 ( 火 ) 5. MPI の基礎 6. 並列処理の性能評価 1 もくじ 1. 序並列計算機の現状 2. 計算方式およびアーキテクチュアの分類 3. 並列計算の目的と課題 4. 数値計算における各種の並列化

More information

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

MPI 超 入門 (FORTRAN 編 ) 東京大学情報基盤センター C 言語編は以下   /ohshima/seminars/t2k201111/ (MPI による並列アプリケーション開発入門 2) MPI 超 入門 (FORTRAN 編 ) 東京大学情報基盤センター C 言語編は以下 http://www.cspp.cc.u-tokyo.ac.jp /ohshima/seminars/t2k201111/ (MPI による並列アプリケーション開発入門 2) Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データ グループ通信 (Collective

More information

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

Microsoft PowerPoint - MPIprog-C1.ppt [互換モード] MPI によるプログラミング概要 ( その 1) C 言語編 RIKEN AICS HPC Summer School 2015 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大 計算科学教育センター ) 1 本 school の目的 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的 高速

More information

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 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 Sakurai-Sugiura z-pares 26 9 5 1 1 2 2 2.1 Mac OS CPU......................................... 2 2.2 Linux MPI............................................ 2 3 3 4 6 4.1 MUMPS....................................

More information

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

Microsoft PowerPoint - MPIprog-C [互換モード] MPI によるプログラミング概要 課題 S1 S2 出題 C 言語編 2012 年夏季集中講義中島研吾 並列計算プログラミング (616-2057) 先端計算機演習 (616-4009) 1 本授業の理念 より 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的 高速 大規模 大規模 の方が 新しい科学 という観点からのウェイトとしては高い

More information

nakao

nakao Fortran+Python 4 Fortran, 2018 12 12 !2 Python!3 Python 2018 IEEE spectrum https://spectrum.ieee.org/static/interactive-the-top-programming-languages-2018!4 Python print("hello World!") if x == 10: print

More information

3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t + u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., ν. t +

3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t + u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., ν. t + B: 2016 12 2, 9, 16, 2017 1 6 1,.,,,,.,.,,,., 1,. 1. :, ν. 2. : t = ν 2 u x 2, (1), c. t + c x = 0, (2). e-mail: iwayama@kobe-u.ac.jp,. 1 3. :, c, ν. 4. Burgers : t + c x = ν 2 u x 2, (3), ν. 5. : t +

More information

1F90/kouhou_hf90.dvi

1F90/kouhou_hf90.dvi Fortran90 3 33 1 2 Fortran90 FORTRAN 1956 IBM IBM704 FORTRAN(FORmula TRANslation ) 1965 FORTRAN66 1978 FORTRAN77 1991 Fortran90 Fortran90 Fortran Fortran90 6 Fortran90 77 90 90 Fortran90 [ ] Fortran90

More information

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

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 43 6 MPI MPI(Message Passing Interface) MPI 1CPU/1 PC Cluster MPICH[5] 6.1 MPI MPI MPI 1 : #include 2 : #include 3 : #include 4 : 5 : #include "mpi.h" 7 : int main(int argc,

More information

HPCセミナー

HPCセミナー 並列プログラミング技法 (MPI 詳説 ) 高度情報科学技術研究機構神戸センター 宮内敦 0 本日の講義内容 MPIの基礎知識 MPI 関数各論 並列性能評価 具体的な問題への応用 1 2 MPI の基礎知識 1. MPI 規格 (MPI standard) 2. MPI ライブラリ 3 MPI 規格 (MPI standard) とは プロセス並列を前提としたプロセス間のメッセージ交換に関する標準仕様

More information

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

Microsoft PowerPoint - MPIprog-C1.ppt [互換モード] MPI によるプログラミング概要 ( その 1) C 言語編 RIKEN AICS HPC Summer School 2014 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大 計算科学教育センター ) 1 本 school の目的 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的 高速

More information

並列計算プログラミング超入門

並列計算プログラミング超入門 < 特集 : 炉物理研究への P クラスタの利用 並列計算プログラミング超入門 > 並列計算プログラミング超入門 佐々木誠 ( 株 ) 日本総合研究所 sasaki.makoto@jri.co.jp さて ここまでの記事であなたの手元には P クラスターが構築されているでしょう ただ そのままでは単なる P をネットワークでつないだシステムにすぎません これからこの上で 並列計算 を行なうソフトウェアを自ら構築するか

More information

openmp1_Yaguchi_version_170530

openmp1_Yaguchi_version_170530 並列計算とは /OpenMP の初歩 (1) 今 の内容 なぜ並列計算が必要か? スーパーコンピュータの性能動向 1ExaFLOPS 次世代スハ コン 京 1PFLOPS 性能 1TFLOPS 1GFLOPS スカラー機ベクトル機ベクトル並列機並列機 X-MP ncube2 CRAY-1 S-810 SR8000 VPP500 CM-5 ASCI-5 ASCI-4 S3800 T3E-900 SR2201

More information

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 超 入門 (C 言語編 ) 東京大学情報基盤センター FOTRAN 編は以下 http://nkl.cc.u-tokyo.ac.jp/seminars/t2kfvm/mpiprogf.pdf tokyo pdf Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データタ グループ通信 (Collective Communication)

More information

HPCセミナー

HPCセミナー 並列プログラミング技法 (MPI 詳説 ) 高度情報科学技術研究機構神戸センター 宮内敦 0 本日の講義内容 MPIの基礎知識 MPI 関数各論 並列性能評価 具体的な問題への応用 1 2 MPI の基礎知識 1. MPI 規格 (MPI standard) 2. MPI ライブラリ 3 MPI とは プロセス並列を前提としたプロセス間のメッセージ交換に関する標準仕様 適用対象は分散記憶アーキテクチャー上の分散アドレス空間における

More information

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 超 入門 (C 言語編 ) 東京大学情報基盤センター FORTRAN 編は以下 http://www.cspp.cc.u-tokyo.ac.jp /ohshima/seminars/t2k201111/ (MPI による並列アプリケーション開発入門 2) Fundamental MPI 1 概要 MPI とは MPI の基礎 :Hello World 全体データと局所データ グループ通信 (Collective

More information

3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,.,

3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2, (4), c. 2 u t 2 = c2 2 u x 2, (5) (1) (4), (1 Navier Stokes,., B:,, 2017 12 1, 8, 15, 22 1,.,,,,.,.,,,., 1,. 1. :, ν. 2. : u t = ν 2 u x 2, (1), c. u t + c u x = 0, (2), ( ). 1 3. :, c, ν. 4. Burgers : u t + c u x = ν 2 u x 2, (3), ν. 5. : u t + u u x = ν 2 u x 2,

More information

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

Microsoft PowerPoint - 第10回講義(2015年12月22日)-1 .pptx 非同期通信 東京大学情報基盤センター准教授片桐孝洋 1 2015 年 12 月 22 日 ( 火 )10:25-12:10 講義日程 ( 工学部共通科目 ) 10 月 6 日 : ガイダンス 1. 10 月 13 日 並列数値処理の基本演算 ( 座学 ) 2. 10 月 20 日 : スパコン利用開始 ログイン作業 テストプログラム実行 3. 10 月 27 日 高性能演算技法 1 ( ループアンローリング

More information

演習問題の構成 ディレクトリ構成 MPI/ --practice_1 演習問題 1 --practice_2 演習問題 2 --practice_3 演習問題 3 --practice_4 演習問題 4 --practice_5 演習問題 5 --practice_6 演習問題 6 --sample

演習問題の構成 ディレクトリ構成 MPI/ --practice_1 演習問題 1 --practice_2 演習問題 2 --practice_3 演習問題 3 --practice_4 演習問題 4 --practice_5 演習問題 5 --practice_6 演習問題 6 --sample H26 年度 MPI プログラミング入門 ( 演習補足資料 ) 2014 年 6 月 24 日 大阪大学サイバーメディアセンター 日本電気株式会社 演習問題の構成 ディレクトリ構成 MPI/ --practice_1 演習問題 1 --practice_2 演習問題 2 --practice_3 演習問題 3 --practice_4 演習問題 4 --practice_5 演習問題 5 --practice_6

More information

58 7 MPI 7 : main(int argc, char *argv[]) 8 : { 9 : int num_procs, myrank; 10 : double a, b; 11 : int tag = 0; 12 : MPI_Status status; 13 : 1 MPI_Init

58 7 MPI 7 : main(int argc, char *argv[]) 8 : { 9 : int num_procs, myrank; 10 : double a, b; 11 : int tag = 0; 12 : MPI_Status status; 13 : 1 MPI_Init 57 7 MPI MPI 1 1 7.1 Bcast( ) allocate Bcast a=1 PE0 a=1 PE1 a=1 PE2 a=1 PE3 7.1: Bcast 58 7 MPI 7 : main(int argc, char *argv[]) 8 : { 9 : int num_procs, myrank; 10 : double a, b; 11 : int tag = 0; 12

More information

01_OpenMP_osx.indd

01_OpenMP_osx.indd OpenMP* / 1 1... 2 2... 3 3... 5 4... 7 5... 9 5.1... 9 5.2 OpenMP* API... 13 6... 17 7... 19 / 4 1 2 C/C++ OpenMP* 3 Fortran OpenMP* 4 PC 1 1 9.0 Linux* Windows* Xeon Itanium OS 1 2 2 WEB OS OS OS 1 OS

More information

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

Microsoft PowerPoint - MPIprog-C1.ppt [互換モード] 本 school の目的 1 MPI によるプログラミング概要 ( その 1) 言語編 RIKEN AIS HP Summer School 2014 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大学 計算科学教育センター ) 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的 高速 大規模

More information

untitled

untitled OpenMP MPI OpenMPI 1 2 http://www.es.jamstec.go.jp/ 3 4 http://www.top500.org/ CPU 3GHz, 10GHz 90nm 65nm, 45nm VLIW L3 Intel Hyperthreading CPU Pentium 5 6 7 8 Cell 23400 90nm 221mm2 SPU 1.52Moore s Law

More information

MPI

MPI 筑波大学計算科学研究センター CCS HPC サマーセミナー MPI 建部修見 tatebe@cs.tsukuba.ac.jp 筑波大学大学院システム情報工学研究科計算科学研究センター 分散メモリ型並列計算機 (PC クラスタ ) 計算ノードはプロセッサとメモリで構成され, 相互結合網で接続 ノード内のメモリは直接アクセス 他ノードとはネットワーク通信により情報交換 いわゆるPCクラスタ 相互結合網

More information

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

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 (Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,

More information

. (.8.). t + t m ü(t + t) + c u(t + t) + k u(t + t) = f(t + t) () m ü f. () c u k u t + t u Taylor t 3 u(t + t) = u(t) + t! u(t) + ( t)! = u(t) + t u(

. (.8.). t + t m ü(t + t) + c u(t + t) + k u(t + t) = f(t + t) () m ü f. () c u k u t + t u Taylor t 3 u(t + t) = u(t) + t! u(t) + ( t)! = u(t) + t u( 3 8. (.8.)............................................................................................3.............................................4 Nermark β..........................................

More information

ÊÂÎó·×»»¤È¤Ï/OpenMP¤Î½éÊâ¡Ê£±¡Ë

ÊÂÎó·×»»¤È¤Ï/OpenMP¤Î½éÊâ¡Ê£±¡Ë 2015 5 21 OpenMP Hello World Do (omp do) Fortran (omp workshare) CPU Richardson s Forecast Factory 64,000 L.F. Richardson, Weather Prediction by Numerical Process, Cambridge, University Press (1922) Drawing

More information

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

Microsoft PowerPoint - MPIprog-F1.ppt [互換モード] 本 school の目的 1 MPI によるプログラミング概要 ( その 1) 言語編 RIKEN AICS HPC Summer School 2014 中島研吾 ( 東大 情報基盤センター ) 横川三津夫 ( 神戸大学 計算科学教育センター ) 並列計算機の使用によって, より大規模で詳細なシミュレーションを高速に実施することが可能になり, 新しい科学の開拓が期待される 並列計算の目的 高速 大規模

More information

MPI MPI MPI.NET C# MPI Version2

MPI MPI MPI.NET C# MPI Version2 MPI.NET C# 2 2009 2 27 MPI MPI MPI.NET C# MPI Version2 MPI (Message Passing Interface) MPI MPI Version 1 1994 1 1 1 1 ID MPI MPI_Send MPI_Recv if(rank == 0){ // 0 MPI_Send(); } else if(rank == 1){ // 1

More information

untitled

untitled Fortran90 ( ) 17 12 29 1 Fortran90 Fortran90 FORTRAN77 Fortran90 1 Fortran90 module 1.1 Windows Windows UNIX Cygwin (http://www.cygwin.com) C\: Install Cygwin f77 emacs latex ps2eps dvips Fortran90 Intel

More information

並列計算導入.pptx

並列計算導入.pptx 並列計算の基礎 MPI を用いた並列計算 並列計算の環境 並列計算 複数の計算ユニット(PU, ore, Pなど を使用して 一つの問題 計算 を行わせる 近年 並列計算を手軽に使用できる環境が急速に整いつつある >通常のP PU(entral Processing Unit)上に計算装置であるoreが 複数含まれている Intel ore i7 シリーズ: 4つの計算装置(ore) 通常のプログラム

More information

05 I I / 56

05 I I / 56 05 I 2015 2015.05.14 I 05 2015.05.14 1 / 56 I 05 2015.05.14 2 / 56 cd mkdir vis01 OK cd vis01 cp /tmp/150514/leibniz.*. I 05 2015.05.14 3 / 56 I 05 2015.05.14 4 / 56 Information visualization Data visualization,

More information

スライド 1

スライド 1 本日 (4/25) の内容 1 並列計算の概要 並列化計算の目的 並列コンピュータ環境 並列プログラミングの方法 MPI を用いた並列プログラミング 並列化効率 2 並列計算の実行方法 Hello world モンテカルロ法による円周率計算 並列計算のはじまり 並列計算の最初の構想を イギリスの科学者リチャードソンが 1922 年に発表 < リチャードソンの夢 > 64000 人を円形の劇場に集めて

More information