OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£²¡Ë
|
|
- ああす いくのや
- 4 years ago
- Views:
Transcription
1
2 (schedule) (omp sections) (omp single, omp master) (barrier, critical, atomic)
3 program pi i m p l i c i t none integer, parameter : : SP = kind ( 1. 0 ) integer, parameter : : DP = selected real kind (2 precision ( 1. 0 SP ) ) integer, parameter : : n = integer : : i real (DP) : : x, dx, p real(dp) :: time0, time1, omp get wtime dx = 1.0 DP / r eal ( n, DP) p = 0.0 DP time0 = omp get wtime()!$omp parallel do default(none) private(i,x) shared(dx) reduction(+:p) do i = 1,n x = real ( i, DP) dx p = p DP / ( 1. 0 DP + x 2) dx time1 = omp get wtime() i x p r i n t, p print *, time1-time0 end program
4 a 11 a 12 a 13 a 14 a 15 a 16 a 17 a 18 a 22 a 23 a 24 a 25 a 26 a 27 a 28 a 33 a 34 a 35 a 36 a 37 a 38 a 44 a 45 a 46 a 47 a 48 a 55 a 56 a 57 a 58 a 66 a 67 a 68 a 77 a 78 a 88 x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8
5 a 11 a 12 a 13 a 14 a 15 a 16 a 17 a 18 a 22 a 23 a 24 a 25 a 26 a 27 a 28 a 33 a 34 a 35 a 36 a 37 a 38 a 44 a 45 a 46 a 47 a 48 a 55 a 56 a 57 a 58 a 66 a 67 a 68 a 77 a 78 a 88 OpenMP! $omp parallel do schedule(static,2) x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8
6 schedule schedule(, )!$omp parallel do schedule(static, 4) static dynamic guided dynamic runtime OMP SCHEDULE
7 1 enshu-openmp2 mkdir enshu openmp2 cd enshu openmp2 2 /tmp/openmp2/schedule.f90! omp parallel do schedule(,) schedule static, dynamic, guided 3
8 program schedule i m p l i c i t none integer, parameter : : SP = kind ( 1. 0 ) integer, parameter : : DP = selected real kind (2 precision ( 1. 0 SP ) ) integer, parameter : : n = 2000 integer : : i, j real (DP), dimension ( n ) : : x, y real (DP), dimension ( n, n ) : : A real (DP) : : time0, time1, omp get wtime x ( : ) = 2.0 DP A ( :, : ) = 1.0 DP time0 = omp get wtime ( )! $omp parallel do schedule(,) default(none) private(i,j) shared(a,x,y) do i =1,n y ( i ) = 0.0 DP do j =i, n y ( i ) = y ( i ) + A( i, j ) x ( j )! $omp end parallel do time1 = omp get wtime ( ) p r i n t, time1 time0 end program
9 enshu.sh pjsub enshu. sh jobname.o???????? #!/bin/bash #PJM -N jobname #PJM -L rscgrp=small #PJM -L node=1 #PJM -L elapse=2:00 #PJM -j export OMP NUM THREADS=4. / a. out /tmp/openmp2/enshu.sh
10 ! $omp parallel do do i =1,n y ( i ) = 0.0 DP do j=1,n y ( i ) = y ( i ) + A( i, j ) x ( j )! $omp end parallel do fortran do j =1,n y(i) = 0.0 DP do i=1,n y ( i ) = y ( i ) + A( i, j ) x ( j ) y(:) = 0.0 DP do j =1,n do i=1,n y ( i ) = y ( i ) + A( i, j ) x ( j )
11 !$omp sections program do while (t < ) x y z end program!$omp sections section!$omp parallel!$omp sections!$omp section! x omp end section!$omp section! y!$omp section! z!$omp end sections!$omp end parallel
12 1 /tmp/openmp2/sierp.f90 2 do x(i) y(i) sections sections 3 /tmp/openmp2/jscript.sh gnuplot x(i), y(i) X gnuplot plot jobname.o??? exit X
13 program sierpinski i m p l i c i t none! do i =1,n call random number (myrand ( i ) ) time0 = omp get wtime ( ) do i =1,n 1 i f ( myrand ( i ) < 0.33 DP ) then x(i+1) = x(i) 0.5 DP DP y(i+1) = y(i) 0.5 DP else i f (myrand ( i ) > 0.66 DP ) then x(i+1) = x(i) 0.5 DP DP y(i+1) = y(i) 0.5 DP else x(i+1) = x(i) 0.5 DP y(i+1) = y(i) 0.5 DP DP end i f time1 = omp get wtime ( ) print *, time1-time0!do i = 1,n! print, x(i), y(i)! end program gnuplot
14 1/3 x (n+1) = 1 2 x(n) + 1, y (n+1) = 1 2 y(n). 1/3 x (n+1) = 1 2 x(n) 1, y (n+1) = 1 2 y(n). 1/3 x (n+1) = 1 2 x(n), y (n+1) = 1 2 y(n) + 1.
15 !$omp single!$omp parallel val = 1.0 DP! $omp do do j =1,n do i =1,n A( i, j ) = val! $omp! $omp end parallel!$omp parallel!$omp single val = 1.0 DP!$omp end single! $omp do do j =1,n do i =1,n A( i, j ) = val! $omp! $omp end parallel val
16 !$omp parallel val = 1.0 DP! $omp do do j =1,n do i =1,n A( i, j ) = val! $omp! $omp end parallel!$omp master single!$omp parallel!$omp single val = 1.0 DP!$omp end single! $omp do do j =1,n do i =1,n A( i, j ) = val! $omp! $omp end parallel master!$omp parallel!$omp master val = 1.0 DP!$omp end master! $omp do do j =1,n do i =1,n A( i, j ) = val! $omp! $omp end parallel!$omp master: val val barrier
17 !$omp barrier!$omp!$omp end single barrier!$omp nowait!$omp critical!$omp atomic real (DP) : : sval, pval real (DP), dimension ( n ) : : svec!$omp parallel shared(sval, svec) private(pval) pval!$omp critical svec ( : ) = pval svec ( : )!$omp end critical!$omp atomic sval = sval + pval omp end atomic! $omp end parallel
18 reduction 1 2 omp atomic 3 omp atomic omp critical, omp end critical program summation integer, parameter : : SP=kind ( 1. 0 ) integer, parameter : : DP=selected real kind (2 precision (1.0 SP ) ) integer, parameter : : n=1000 real (DP) : : sval, pval real (DP), dimension (n) : : svec svec ( : ) = 1.0 DP sval = 0.0 DP!$omp parallel shared(sval, svec) private(pval) pval=0.0 DP! $omp do do i =1,n pval = pval + svec ( i )! $omp!$omp atomic sval = sval + pval! $omp end parallel p r i n t, sval /tmp/openmp2/sum.f90 end program
19 1 2 3 result.txt yaguchi mail yaguchi < result.txt
20 omp barrier nowait barrier!$omp parallel shared(sval, svec) private(pval) pval =0.0 DP! $omp do do i =1,n pval = pval + svec ( i )! $omp nowait! $omp atomic sval = sval + pval! $omp end parallel nowait atomic critical
21 program sierpinski i m p l i c i t none! do i=1,n call random number(myrand(i)) time0 = omp get wtime ( ) do i =1,n 1 i f ( myrand ( i ) < 0.33 DP ) then x(i+1) = x(i) 0.5 DP DP y(i+1) = y(i) 0.5 DP else i f (myrand ( i ) > 0.66 DP ) then x(i+1) = x(i) 0.5 DP DP y(i+1) = y(i) 0.5 DP else x(i+1) = x(i) 0.5 DP y(i+1) = y(i) 0.5 DP DP end i f time1 = omp get wtime ( ) do print *, time1-time0!do i = 1,n! print, x(i), y(i)! end program
22 r (n+1) = ar (n) + c mod m a c m random numer() recursive doubling r (n+1) = a(ar (n 1) + c) + c mod m = a 2 r (n 1) + (a + 1)c mod m =: a r (n 1) + c mod m
23 II 1 2 a, c!$omp sections 3 do i =1,n call random number (myrand ( i ) ) integer, parameter : : a = 109 integer, parameter : : c = 1021 integer, parameter : : m = 2 15 integer : : tmp tmp = 15 do i =1,n tmp = mod( tmp a+c,m) myrand ( i ) = real (tmp,dp) / (m 1)
24 1 2 3 result.txt yaguchi mail yaguchi < result.txt
25 OpenMP (1), (2), (3) C OpenMP c.pdf. OpenMP - CPU Barbara Chapman, Gabriele Jost and Ruud van der Pas (Foreword by David J. Kuck). Using OpenMP Portable Shared Memory Parallel Programming, The MIT Press, 2007.
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 informationOpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë
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¤Î½éÊâ¡Ê£±¡Ë
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 informationopenmp1_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 information02_C-C++_osx.indd
C/C++ OpenMP* / 2 C/C++ OpenMP* OpenMP* 9.0 1... 2 2... 3 3OpenMP*... 5 3.1... 5 3.2 OpenMP*... 6 3.3 OpenMP*... 8 4OpenMP*... 9 4.1... 9 4.2 OpenMP*... 9 4.3 OpenMP*... 10 4.4... 10 5OpenMP*... 11 5.1
More informationI 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 informationOpenMPプログラミング
OpenMP 基礎 岩下武史 ( 学術情報メディアセンター ) 1 2013/9/13 並列処理とは 逐次処理 CPU1 並列処理 CPU1 CPU2 CPU3 CPU4 処理 1 処理 1 処理 2 処理 3 処理 4 処理 2 処理 3 処理 4 時間 2 2 種類の並列処理方法 プロセス並列 スレッド並列 並列プログラム 並列プログラム プロセス プロセス 0 プロセス 1 プロセス間通信 スレッド
More information演習1: 演習準備
演習 1: 演習準備 2013 年 8 月 6 日神戸大学大学院システム情報学研究科森下浩二 1 演習 1 の内容 神戸大 X10(π-omputer) について システム概要 ログイン方法 コンパイルとジョブ実行方法 OpenMP の演習 ( 入門編 ) 1. parallel 構文 実行時ライブラリ関数 2. ループ構文 3. shared 節 private 節 4. reduction 節
More informationOpenMP (1) 1, 12 1 UNIX (FUJITSU GP7000F model 900), 13 1 (COMPAQ GS320) FUJITSU VPP5000/64 1 (a) (b) 1: ( 1(a))
OpenMP (1) 1, 12 1 UNIX (FUJITSU GP7000F model 900), 13 1 (COMPAQ GS320) FUJITSU VPP5000/64 1 (a) (b) 1: ( 1(a)) E-mail: {nanri,amano}@cc.kyushu-u.ac.jp 1 ( ) 1. VPP Fortran[6] HPF[3] VPP Fortran 2. MPI[5]
More information2. OpenMP OpenMP OpenMP OpenMP #pragma#pragma omp #pragma omp parallel #pragma omp single #pragma omp master #pragma omp for #pragma omp critica
C OpenMP 1. OpenMP OpenMP Architecture Review BoardARB OpenMP OpenMP OpenMP OpenMP OpenMP Version 2.0 Version 2.0 OpenMP Fortran C/C++ C C++ 1997 10 OpenMP Fortran API 1.0 1998 10 OpenMP C/C++ API 1.0
More information01_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 informationI
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±é½¬£²¡§£Í£Ð£É½éÊâ
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 information03_Fortran_osx.indd
Fortran OpenMP* Fortran OpenMP* OpenMP* 9.0 1...2 2... 3 3 OpenMP*... 4 3.1... 4 3.2 OpenMP*... 5 3.3 OpenMP*... 8 4 OpenMP*... 9 4.1... 9 4.2... 10 4.3 OpenMP*... 10 4.4 OpenMP*... 11 4.5... 12 5 OpenMP*...
More informationuntitled
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 informationPowerPoint プレゼンテーション
OpenMP 並列解説 1 人が共同作業を行うわけ 田植えの例 重いものを持ち上げる 田おこし 代かき 苗の準備 植付 共同作業する理由 1. 短時間で作業を行うため 2. 一人ではできない作業を行うため 3. 得意分野が異なる人が協力し合うため ポイント 1. 全員が最大限働く 2. タイミングよく 3. 作業順序に注意 4. オーバーヘッドをなくす 2 倍率 効率 並列化率と並列加速率 並列化効率の関係
More informationuntitled
RIKEN AICS Summer School 3 4 MPI 2012 8 8 1 6 MPI MPI 2 allocatable 2 Fox mpi_sendrecv 3 3 FFT mpi_alltoall MPI_PROC_NULL 4 FX10 /home/guest/guest07/school/ 5 1 A (i, j) i+j x i i y = Ax A x y y 1 y i
More informationコードのチューニング
OpenMP による並列化実装 八木学 ( 理化学研究所計算科学研究センター ) KOBE HPC Spring School 2019 2019 年 3 月 14 日 スレッド並列とプロセス並列 スレッド並列 OpenMP 自動並列化 プロセス並列 MPI プロセス プロセス プロセス スレッドスレッドスレッドスレッド メモリ メモリ プロセス間通信 Private Private Private
More information2 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 information120802_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 information2 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 information2012年度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並列プログラミング入門(OpenMP編)
登録施設利用促進機関 / 文科省委託事業 HPCI の運営 代表機関一般財団法人高度情報科学技術研究機構 (RIST) 1 並列プログラミング入門 (OpenMP 編 ) 2019 年 1 月 17 日 高度情報科学技術研究機構 (RIST) 山本秀喜 RIST 主催の講習会等 2 HPC プログラミングセミナー 一般 初心者向け : チューニング 並列化 (OpenMP MPI) 京 初中級者向け講習会
More information3. :, 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 information05 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. (.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 informationMicrosoft 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 information3. :, 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¥Ñ¥Ã¥±¡¼¥¸ 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 informationI I / 68
2013.07.04 I 2013 3 I 2013.07.04 1 / 68 I 2013.07.04 2 / 68 I 2013.07.04 3 / 68 heat1.f90 heat2.f90 /tmp/130704/heat2.f90 I 2013.07.04 4 / 68 diff heat1.f90 heat2.f90!! heat2. f 9 0! c m > NGRID! c nmax
More informationMicrosoft PowerPoint - OpenMP入門.pptx
OpenMP 入門 須田礼仁 2009/10/30 初版 OpenMP 共有メモリ並列処理の標準化 API http://openmp.org/ 最新版は 30 3.0 バージョンによる違いはあまり大きくない サポートしているバージョンはともかく csp で動きます gcc も対応しています やっぱり SPMD Single Program Multiple Data プログラム #pragma omp
More informationMicrosoft PowerPoint _MPI-01.pptx
計算科学演習 Ⅰ MPI を いた並列計算 (I) 神戸大学大学院システム情報学研究科谷口隆晴 yaguchi@pearl.kobe-u.ac.jp この資料は昨年度担当の横川先生の資料を参考にさせて頂いています. 2016/06/23 MPI を用いた並列計算 (I) 1 講義概要 分散メモリ型計算機上のプログラミング メッセージ パシング インターフェイス (Message Passing Interface,MPI)
More informationPlatypus-QM β ( )
Platypus-QM β (2012.11.12) 1 1 1.1...................................... 1 1.1.1...................................... 1 1.1.2................................... 1 1.1.3..........................................
More informationスパコンに通じる並列プログラミングの基礎
2018.09.10 furihata@cmc.osaka-u.ac.jp ( ) 2018.09.10 1 / 59 furihata@cmc.osaka-u.ac.jp ( ) 2018.09.10 2 / 59 Windows, Mac Unix 0444-J furihata@cmc.osaka-u.ac.jp ( ) 2018.09.10 3 / 59 Part I Unix GUI CUI:
More informationスパコンに通じる並列プログラミングの基礎
2018.06.04 2018.06.04 1 / 62 2018.06.04 2 / 62 Windows, Mac Unix 0444-J 2018.06.04 3 / 62 Part I Unix GUI CUI: Unix, Windows, Mac OS Part II 2018.06.04 4 / 62 0444-J ( : ) 6 4 ( ) 6 5 * 6 19 SX-ACE * 6
More informationインテル(R) Visual Fortran Composer XE 2013 Windows版 入門ガイド
Visual Fortran Composer XE 2013 Windows* エクセルソフト株式会社 www.xlsoft.com Rev. 1.1 (2012/12/10) Copyright 1998-2013 XLsoft Corporation. All Rights Reserved. 1 / 53 ... 3... 4... 4... 5 Visual Studio... 9...
More informationPowerPoint プレゼンテーション
計算科学演習 I 第 8 回講義 MPI を用いた並列計算 (I) 2013 年 6 月 6 日 システム情報学研究科計算科学専攻 山本有作 今回の講義の概要 1. MPI とは 2. 簡単な MPI プログラムの例 (1) 3. 簡単な MPI プログラムの例 (2):1 対 1 通信 4. 簡単な MPI プログラムの例 (3): 集団通信 共有メモリ型並列計算機 ( 復習 ) 共有メモリ型並列計算機
More information(Microsoft PowerPoint \215u\213`4\201i\221\272\210\344\201j.pptx)
AICS 村井均 RIKEN AICS HPC Summer School 2012 8/7/2012 1 背景 OpenMP とは OpenMP の基本 OpenMP プログラミングにおける注意点 やや高度な話題 2 共有メモリマルチプロセッサシステムの普及 共有メモリマルチプロセッサシステムのための並列化指示文を共通化する必要性 各社で仕様が異なり 移植性がない そして いまやマルチコア プロセッサが主流となり
More informationスパコンに通じる並列プログラミングの基礎
2016.06.06 2016.06.06 1 / 60 2016.06.06 2 / 60 Windows, Mac Unix 0444-J 2016.06.06 3 / 60 Part I Unix GUI CUI: Unix, Windows, Mac OS Part II 0444-J 2016.06.06 4 / 60 ( : ) 6 6 ( ) 6 10 6 16 SX-ACE 6 17
More informationAICS 村井均 RIKEN AICS HPC Summer School /6/2013 1
AICS 村井均 RIKEN AICS HPC Summer School 2013 8/6/2013 1 背景 OpenMP とは OpenMP の基本 OpenMP プログラミングにおける注意点 やや高度な話題 2 共有メモリマルチプロセッサシステムの普及 共有メモリマルチプロセッサシステムのための並列化指示文を共通化する必要性 各社で仕様が異なり 移植性がない そして いまやマルチコア プロセッサが主流となり
More information1F90/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 informationMicrosoft PowerPoint - 03_What is OpenMP 4.0 other_Jan18
OpenMP* 4.x における拡張 OpenMP 4.0 と 4.5 の機能拡張 内容 OpenMP* 3.1 から 4.0 への拡張 OpenMP* 4.0 から 4.5 への拡張 2 追加された機能 (3.1 -> 4.0) C/C++ 配列シンタックスの拡張 SIMD と SIMD 対応関数 デバイスオフロード task 構 の依存性 taskgroup 構 cancel 句と cancellation
More informationMicrosoft Word - 資料 (テイラー級数と数値積分).docx
δx δx n x=0 sin x = x x3 3 + x5 5 x7 7 +... x ak = (-mod(k,2))**(k/2) / fact_k ( ) = a n δ x n f x 0 + δ x a n = f ( n) ( x 0 ) n f ( x) = sin x n=0 58 I = b a ( ) f x dx ΔS = f ( x)h I = f a h h I = h
More information演習準備
演習準備 2014 年 3 月 5 日神戸大学大学院システム情報学研究科森下浩二 1 演習準備の内容 神戸大 FX10(π-Computer) 利用準備 システム概要 ログイン方法 コンパイルとジョブ実行方法 MPI 復習 1. MPIプログラムの基本構成 2. 並列実行 3. 1 対 1 通信 集団通信 4. データ 処理分割 5. 計算時間計測 2 神戸大 FX10(π-Computer) 利用準備
More information040312研究会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 informationuntitled
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演習2
神戸市立工業高等専門学校電気工学科 / 電子工学科専門科目 数値解析 2017.6.2 演習 2 山浦剛 (tyamaura@riken.jp) 講義資料ページ h t t p://clim ate.aic s. riken. jp/m embers/yamaura/num erical_analysis. html 曲線の推定 N 次多項式ラグランジュ補間 y = p N x = σ N x x
More information連載講座 : 高生産並列言語を使いこなす (5) 分子動力学シミュレーション 田浦健次朗 東京大学大学院情報理工学系研究科, 情報基盤センター 目次 1 問題の定義 17 2 逐次プログラム 分子 ( 粒子 ) セル 系の状態 ステップ 18
連載講座 : 高生産並列言語を使いこなす (5) 分子動力学シミュレーション 田浦健次朗 東京大学大学院情報理工学系研究科, 情報基盤センター 目次 1 問題の定義 17 2 逐次プログラム 17 2.1 分子 ( 粒子 ) 17 2.2 セル 17 2.3 系の状態 18 2.4 1ステップ 18 2.5 力の計算 19 2.6 速度と位置の更新 20 2.7 セル間の分子の移動 21 3 OpenMP
More informationCPU Levels in the memory hierarchy Level 1 Level 2... Increasing distance from the CPU in access time Level n Size of the memory at each level 1: 2.2
FFT 1 Fourier fast Fourier transform FFT FFT FFT 1 FFT FFT 2 Fourier 2.1 Fourier FFT Fourier discrete Fourier transform DFT DFT n 1 y k = j=0 x j ω jk n, 0 k n 1 (1) x j y k ω n = e 2πi/n i = 1 (1) n DFT
More informationall.dvi
fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................
More information情報活用資料
y = Asin 2πt T t t = t i i 1 n+1 i i+1 Δt t t i = Δt i 1 ( ) y i = Asin 2πt i T 21 (x, y) t ( ) x = Asin 2πmt y = Asin( 2πnt + δ ) m, n δ (x, y) m, n 22 L A x y A L x 23 ls -l gnuplot gnuplot> plot "sine.dat"
More informationnakao
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 informationMicrosoft Word - 計算科学演習第1回3.doc
スーパーコンピュータの基本的操作方法 2009 年 9 月 10 日高橋康人 1. スーパーコンピュータへのログイン方法 本演習では,X 端末ソフト Exceed on Demand を使用するが, 必要に応じて SSH クライアント putty,ftp クライアント WinSCP や FileZilla を使用して構わない Exceed on Demand を起動し, 以下のとおり設定 ( 各自のユーザ
More information(2-1) x, m, 2 N(m, 2 ) x REAL*8 FUNCTION NRMDST (X, M, V) X,M,V REAL*8 x, m, 2 X X N(0,1) f(x) standard-norm.txt normdist1.f x=0, 0.31, 0.5
2007/5/14 II II agata@k.u-tokyo.a.jp 0. 1. x i x i 1 x i x i x i x x+dx f(x)dx f(x) f(x) + 0 f ( x) dx = 1 (Probability Density Funtion 2 ) (normal distribution) 3 1 2 2 ( x m) / 2σ f ( x) = e 2πσ x m
More informationMicrosoft Word - 03-数値計算の基礎.docx
δx f x 0 + δ x n=0 a n = f ( n) ( x 0 ) n δx n f x x=0 sin x = x x3 3 + x5 5 x7 7 +... x ( ) = a n δ x n ( ) = sin x ak = (-mod(k,2))**(k/2) / fact_k 10 11 I = f x dx a ΔS = f ( x)h I = f a h I = h b (
More informationOpenMP 3.0 C/C++ 構文の概要
OpenMP 3.0 C/C++ 構文の概要 OpenMP API 仕様については www.openmp.org でダウンロードしてください OpenMP 実行宣言子は 後続の構造化ブロックや OpenMP 構文に適用されます 構造化ブロック () とは 単文または先頭に入口が 1 つ 末尾に出口が 1 つの複合文です parallel 構文はスレッドのチームを形成し 並列実行を開始します #pragma
More information11042 計算機言語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 informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double
More informationMPI 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 informationXcalableMP入門
XcalableMP 1 HPC-Phys@, 2018 8 22 XcalableMP XMP XMP Lattice QCD!2 XMP MPI MPI!3 XMP 1/2 PCXMP MPI Fortran CCoarray C++ MPIMPI XMP OpenMP http://xcalablemp.org!4 XMP 2/2 SPMD (Single Program Multiple Data)
More informationMicrosoft Word - 資料 docx
y = Asin 2πt T t t = t i i 1 n+1 i i+1 Δt t t i = Δt i 1 ( ) y i = Asin 2πt i T 29 (x, y) t ( ) x = Asin 2πmt y = Asin( 2πnt + δ ) m, n δ (x, y) m, n 30 L A x y A L x 31 plot sine curve program sine implicit
More informationGPU CUDA CUDA 2010/06/28 1
GPU CUDA CUDA 2010/06/28 1 GPU NVIDIA Mark Harris, Optimizing Parallel Reduction in CUDA http://developer.download.nvidia.com/ compute/cuda/1_1/website/data- Parallel_Algorithms.html#reduction CUDA SDK
More informationC
C 1 2 1.1........................... 2 1.2........................ 2 1.3 make................................................ 3 1.4....................................... 5 1.4.1 strip................................................
More informationXMPによる並列化実装2
2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer
More informationnum2.dvi
kanenko@mbk.nifty.com http://kanenko.a.la9.jp/ 16 32...... h 0 h = ε () 0 ( ) 0 1 IEEE754 (ieee754.c Kerosoft Ltd.!) 1 2 : OS! : WindowsXP ( ) : X Window xcalc.. (,.) C double 10,??? 3 :, ( ) : BASIC,
More information2
1 2 3 4 5 6 ( ) 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6+ 6-5 2 6-5- 6-5+ 5-5- 5- 22 6+ 6-6+ 6-6- S-P time 10 5 2 23 S-P time 5 2 5 2 ( ) 5 2 24 25 26 1 27 28 29 30 95 31 ( 8 2 ) http://www.kishou.go.jp/know/shindo/kaisetsu.html
More information2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 ( ) 1 / 39
III 8 (3) VBA, R / III 8 (2013 11 26 ) / 39 2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 (2013 11 26 ) 1 / 39 Y X 1, X 2,..., X n Y = f (X 1, X 2,..., X n,θ 1,θ 2,...) (y k, x k,1, x k,2,...)
More informationMicrosoft PowerPoint - 演習2:MPI初歩.pptx
演習 2:MPI 初歩 - 並列に計算する - 2013 年 8 月 6 日 神戸大学大学院システム情報学研究科計算科学専攻横川三津夫 MPI( メッセージ パッシング インターフェース ) を使おう! [ 演習 2 の内容 ] はじめの一歩課題 1: Hello, world を並列に出力する. 課題 2: プロセス 0 からのメッセージを受け取る (1 対 1 通信 ). 部分に分けて計算しよう課題
More information2 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 informationOpenMPプログラミング
OpenMP プログラミング入門 (Part 2) 講習の内容 :Part 2 OpenMP の概要について OpenMP API のご紹介 1. 並列実行領域 (Parallel Regions) 構文 2. ワークシェアリング (Worksharing) 構文 3. データ環境 (Data Environment) 構文 4. 同期 (Synchronization) 構文 5. 実行時関数 /
More informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double
More information: (1), ( ) 1 1.1,, 1 OpenMP [3, 5, 21, 22], MPI [13, 18, 23].., (C Fortran)., OS,. C Fortran,,,,. ( ),,.,,.,,,.,,,.,.,. 1
: (1), ( ) 1 1.1,, 1 OpenMP [3, 5, 21, 22], MPI [13, 18, 23].., (C Fortran)., OS,. C Fortran,,,,. ( ),,.,,.,,,.,,,.,.,. 1 1.2,.,,,,.. CPU,,., (, ). (NUMA ).,.,. Flat MPI,,.,,. GPU, SIMD, [11]. C Fortran,.,
More information&A : A = k j 1: 4-way., A set x, way y, way y LRU y, way., A (x,y).,,, L1( 1) L2, L3 3. L1., L2,L3., TLB(Translation Lookaside Buffer). OS,. TLB, ( ),
1?,. 1,.,,. n-way (n ). 1, 4-way, n-way n (way).,., 1., ( set x ) (x), n., 2, 2 s, 2 l (, s, l )., s + l s., s,., n s. n. s + l way, (set,way)., way,. way, LRU(Least Recently Used, ). way. way, (,...).
More information2009 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA
2009 D 1 1.1 1.2 Pascal CASL II ( ) Pascal 1. 2009 10 15 2010 1 29 16 2. C 3. A A 2 1 2 Pascal 1.3 1. 2. TA enshud@image.med.osaka-u.ac.jp TA enshu-d@image.med.osaka-u.ac.jp nakamoto@image.med.osaka-u.ac.jp
More informationFortran90/95 2. (p 74) f g h x y z f x h x = f x + g x h y = f y + g y h z = f z + g z f x f y f y f h = f + g Fortran 1 3 a b c c(1) = a(1) + b(1) c(
Fortran90/95 4.1 1. n n = 5 x1,x2,x3,,x4,x5 5 average = ( x1 + x2 + x3 + x4 + x5 )/5.0 n n x (subscript) x 1 x 2 average = 1 n n x i i=1 Fortran ( ) x(1) x(2) x(n) Fortran ( ) average = sum(x(1:n))/real(n)
More informationフカシギおねえさん問題の高速計算アルゴリズム
JST ERATO 2013/7/26 Joint work with 1 / 37 1 2 3 4 5 6 2 / 37 1 2 3 4 5 6 3 / 37 : 4 / 37 9 9 6 10 10 25 5 / 37 9 9 6 10 10 25 Bousquet-Mélou (2005) 19 19 3 1GHz Alpha 8 Iwashita (Sep 2012) 21 21 3 2.67GHz
More information(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 information2011 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA enshu-
2011 D 1 1.1 1.2 Pascal CASL II ( ) Pascal 1. 2011 10 6 2011 2 9 15 2. C 3. A A 2 1 2 Pascal 1.3 1. 2. TA enshud@fenrir.ics.es.osaka-u.ac.jp TA enshu-d@fenrir.ics.es.osaka-u.ac.jp higo@ist.osaka-u.ac.jp
More informationH28.4 / 11 28 7 1 28 28 1 27 29 30 4 1 29 5 5 2 2 1 2 2 28 3 1 28 http://www.city.saitama.jp/005/001/018/003/p036471.html 2 28 7 11 28 8 31 3 CD DVD 4 4 5 7 11 8 31 9 1 9 30 10 1 10 31 11 1 11
More informationコードのチューニング
ハイブリッド並列 八木学 ( 理化学研究所計算科学研究機構 ) 謝辞 松本洋介氏 ( 千葉大学 ) KOBE HPC Spring School 2017 2017 年 3 月 14 日神戸大学計算科学教育センター MPI とは Message Passing Interface 分散メモリのプロセス間の通信規格(API) SPMD(Single Program Multi Data) が基本 -
More informationMicrosoft PowerPoint - 阪大CMSI pptx
内容に関する質問は katagiri@cc.u-tokyo.ac.jp まで 第 3 回 OpenMP の基礎 東京大学情報基盤センター 片桐孝洋 1 講義日程と内容について (1 学期 : 木曜 3 限 ) 第 1 回 : プログラム高速化の基礎 2013 年 4 月 11 日 イントロダクション ループアンローリング キャッシュブロック化 数値計算ライブラリの利用 その他第 2 回 :MPIの基礎
More informationMicrosoft PowerPoint _5_8_f95a_usui.pptx
1 Fortran90/95 入門と演習 前半 担当 : 臼井英之 三宅洋平 ( 神戸大学大学院システム情報学研究科 ) 目標 本演習で用いる数値計算用プログラム言語 Fortran90/95 の基礎を習得する 参考資料 : TECS-KOBE 第二回シミュレーションスクール ( 神戸大学 ) 2010/12/6:Fortran 講義ノート ( 平尾一 ) Fortran90/95 入門 2010
More information1 48
Section 2 1 48 Section 2 49 50 1 51 Section 2 1 52 Section 2 1 53 1 2 54 Section 2 3 55 1 4 56 Section 2 5 57 58 2 59 Section 2 60 2 61 Section 2 62 2 63 Section 2 3 64 Section 2 6.72 9.01 5.14 7.41 5.93
More informationSection 1 Section 2 Section 3 Section 4 Section 1 Section 3 Section 2 4 5 Section 1 6 7 Section 1 8 9 10 Section 1 11 12 Section 2 13 Section 2 14 Section 2 15 Section 2 16 Section 2 Section 2 17 18 Section
More informationプラズマ核融合学会誌5月号【81-5】/内外情報_ソフト【注:欧フォント特殊!】
PROGRAM PLOTDATA USE NUM_KINDS, ONLY : wp=>dp, i4b USE MYLIB, ONLY : GET_SIZE, GET_DATA INTEGER(i4b) :: ntime, nx REAL(wp), ALLOCATABLE :: time(:), x(:), Temp(:,:) Fortran Temp, temp, TEMP temporal REAL(wp)
More informationMicrosoft PowerPoint _4_26_f95a_usui.pptx
1 Fortran90/95 入門と演習 前半 担当 : 臼井英之 三宅洋平 ( 神戸大学大学院システム情報学研究科 ) 目標 本演習で用いる数値計算用プログラム言語 Fortran90/95 の基礎を習得する 参考資料 : TECS-KOBE 第二回シミュレーションスクールションスク ( 神戸大学 ) 2010/12/6:Fortran 0/ /6 ota 講義ノート ( 平尾一 ) Fortran90/95
More informationコンピュータ概論
4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For
More informationThe 3 key challenges in programming for MC
コンパイラーによる並列化機能 ソフトウェア & ソリューションズ統括部 ソフトウェア製品部 Rev 12/26/2006 コースの内容 並列計算 なぜ使用するのか? OpenMP* 入門 宣言子と使用方法 演習 : Hello world と円周率の計算 並列プログラミング : ヒントとテクニック コード開発で避けるべきこと 2 並列計算なぜ並列処理を使用するのか? 計算をより短い時間で処理 一定の所要時間でより大きな計算を処理
More information1. A0 A B A0 A : A1,...,A5 B : B1,...,B
1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A B f : A B 4 (i) f (ii) f (iii) C 2 g, h: C A f g = f h g = h (iv) C 2 g, h: B C g f = h f g = h 4 (1) (i) (iii) (2) (iii) (i) (3) (ii) (iv) (4)
More information(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 informationB 5 (2) VBA R / B 5 ( ) / 34
B 5 (2) VBAR / B 5 (2014 11 17 ) / 34 VBA VBA (Visual Basic for Applications) Visual Basic VBAVisual Basic Visual BasicC B 5 (2014 11 17 ) 1 / 34 VBA 2 Excel.xlsm 01 Sub test() 02 Dim tmp As Double 03
More information( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( )
( ) 1 Windows HTML ( ) ( ) ( ) 1. 2. 3. 4. WWW 10 ( ) 2 1. 2. 1 3. ( ) 4. 5. 3 Windows 2 7 8 MS Word MS Excel 1. MS Word 600 2. MS Excel 1 34 2 83 3 23 4 70 5 100 6 45 7 58 8 29 9 68 10 72 11 37 12 12
More information2X Y Y X θ 1, θ 2,... Y = f(x, θ 1, θ 2,...) θ k III 8 (2013 05 28 ) 1 / 39
III 8 (3) VBA, R / III 8 (2013 05 28 ) / 39 2X Y Y X θ 1, θ 2,... Y = f(x, θ 1, θ 2,...) θ k III 8 (2013 05 28 ) 1 / 39 Y X 1, X 2,..., X n Y = f(x 1, X 2,..., X n, θ 1, θ 2,...) (y k, x 1,k, x 2,k,...)
More information