02_C-C++_osx.indd

Size: px
Start display at page:

Download "02_C-C++_osx.indd"

Transcription

1 C/C++ OpenMP* / 2

2 C/C++ OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* parallel / OpenMP* / 4 1 OpenMP* 2 3 Fortran OpenMP* 4 PC 1

3 bit 64bit Linux* 32bit 64bit Windows* 9.0 OpenMP* OpenMP* 9.0 OpenMP* 2.5 OpenMP* OpenMP* 2

4 2 OpenMP* OS OS CPU Memory CPU CPU CPU OpenMP*.1 PC OS.2 3

5 3OpenMP* OpenMP* APIApplication Programming Interface OpenMP* API 1997 Open MP Architecture Review Board Linux*UNIX* Windows* OpenMP* C/C++ Fortran OpenMP* OpenMP* 9.0 OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* 2.5 C/C++ Fortran 1998 OpenMP* C/C OpenMP* C/C OpenMP* Fortran C/C OpenMP* Fortran OpenMP* Fortran OpenMP* Fortran OpenMP* 3.1 C/C++ Fortran API OpenMP* OpenMP* C/C++ Fortran OpenMP* OpenMP* OpenMP* /Qopenmp Windows*-openmp Linux* OpenMP* OpenMP* OpenMP* OpenMP* 4

6 OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* 32bit 64bit Linux* 32bit 64bit Windows* OpenMP* 3.2 OpenMP* OpenMP* OpenMP* API OpenMP* /.4 OpenMP* OpenMP* API OpenMP* API OpenMP* API OpenMP* API 5

7 OpenMP* OpenMP* OpenMP* for if (n>limit) default (none) shared (n,a,b,c,x,y,z) private(f,i,scale) f = 1.0; #pragma omp for nowait for (i=0; i<n; i++) z[i] = x[i] + y[i]; Parallel Region #pragma omp for nowait for (i=0; i<n; i++) a[i] = b[i] + c[i]; #pragma omp barrier scale = sum(a, 0, n) + sum(z, 0, n) + f; /** Enf of parallel region **/.5 OpenMP* 6

8 OpenMP* OpenMP* Linux* cat -n pi_omp.c 1 #include <omp.h> 2 static int num_steps = ; double step; 3 void main () 4 5 int i; double x, pi, sum = 0.0; 6 int nthreads; 7 step = 1.0/(double) num_steps; 8 OpenMP* 9 10 nthreads = omp_get_num_threads(); OpenMP* 11 for reduction (+:sum) private(x) 12 for (i=1;i<= num_steps; i++) 13 x = (i-0.5)*step; 14 sum = sum + 4.0/(1.0+x*x); pi = step * sum; 17 printf("%d Threads PI = %f \n",nthreads,pi); 18 $ icc -O3 -openmp _openmp-report2 pi_omp.c pi_omp.c(9) : (col. 1) remark: OpenMP DEFINED REGION WAS PARALLELIZED. pi_omp.c(11) : (col. 1) remark: OpenMP DEFINED LOOP WAS PARALLELIZED. $ setenv OMP_NUM_THREADS 2 $ time./a.out 2 Threads PI = u 0.001s 0: % 0+0k 0+0io 122pf+0w.6 OpenMP* OpenMP* OpenMP* /Qopenmp Windows*-openmp Linux* OpenMP* OpenMP* OpenMP* OpenMP* 7

9 3.3 OpenMP* OpenMP* OpenMP* OpenMP* C/C++ Fortran while for (i=1;i<= n; i++) a[ 1] = = a[ 2] ;

10 4OpenMP* 4.1 OpenMP* #pragma OpenMP* OpenMP* #pragma 1 #pragma omp construct [clause [clause] ] 4.2OpenMP* OpenMP* API OpenMP* call omp_set_num_threads(integer) integer omp_get_num_threads() 1 integer omp_get_max_threads() OMP_NUM_THREADS integer omp_get_thread_num() 0 0 integer omp_get_num_procs() CPU logical omp_in_parallel().false..true. call omp_set_dynamics (logical) logocal omp_get_dynamic() call omp_set_nested(logical) logical omp_get_nested().1 OpenMP* OpenMP* #include omp.h.1 1. clause 9

11 4.3OpenMP* OpenMP* 5 Parallel Regions Worksharing Data Environment Synchronization / Runtime functions/environment variables Parallel Regions Worksharing #pragma omp for #pragma omp sections #pragma omp single Data Environment : threadprivate : sharedprivatelastprivatereductioncopyincopyprivate Synchronization : criticalbarrieratomicflushordermaster / Runtime functions/environment variables 4.4 OpenMP* C/C++ OpenMP* exit() int id = omp_get_thread_num(); more: res(id) = do_big_job(id); if(conv(res(id)) goto more; printf( All done n); if(go_now()) goto more; int id = omp_get_thread_num(); more: res(id) = do_big_job(id); if(conv(res(id)) goto done;? go to more; done: if(!really_done()) goto more;.7 10

12 5. OpenMP* 5.1 parallel OpenMP* Parallel Region for Parallel GOTO C parallel clause OpenMP* OpenMP* Fork-Join Fork [clause[[,]clause]] [clause[[,]clause]] Fork Join Join.8 Fork-Join 11

13 1OpenMP* 2 OpenMP* Fork 3 4 join Fork-Join double A[100]; omp_set_num_threads(4); for for(int i=1;i<100;i++) pooh(i, A); printf(all done n); / A for double A[100]; omp_set_num_threads(4) pooh(i,a) pooh(i,a) pooh(i,a) pooh(i,a) i=1,2,3.. i=26,27,.. i=51,52.. i=76,77.. printf(all done/n);.9 OpenMP* parallel OpenMP* 12

14 main.c #include <omp.h> void main() int num_threads; num_threads = omp_get_num_threads(); printf(" num_threads = %d n",num_threads); whoami (); printf("all Done n"); whoami (); whoami.c / / #include <omp.h> void whoami () int iam; iam = omp_get_thread_num(); #pragma omp critical printf("hello from %d n",iam); / m a i n. c 2 whoami whomai.c.10 OpenMP* main() 2 whoami() whoami() 13

15 5.2 C parallel OpenMP* API 1 for(i=0;i<n;i++) a[i] = a[i] + b[i]; 2OpenMP* private(i,id,istart,iend) id = omp_get_thread_num(); Nthrds = omp_get_num_threads(); istart = id * N / Nthrds; iend = (id+1) * N / Nthrds; for(i=istart;i<iend;i++) a[i]=a[i]+b[i]; 3OpenMP* #pragma omp for schedule(static) for(i=0;i<n;i++) a[i]=a[i]+b[i]; for schedule(static) for(i=0;i<n;i++) a[i]=a[i]+b[i];.11 OpenMP* 1 for 2 OpenMP* 3 for for for #pragma omp for for (I=0;I<N;I++) NEAT_STUFF(I); 14

16 Fork #pragma omp for [clause[[,]clause]] for(int i=0;i<n;i++) for #pragma omp for [clause[[,]clause]] for(int i=0;i<n;i++) for Fork Join Join.12 for OpenMP* double A[100]; omp_set_num_threads(4); for for(int i=1;i<100;i++) pooh(i, A); printf(all done n); / A for double A[100]; omp_set_num_threads(4) pooh(i,a) pooh(i,a) pooh(i,a) pooh(i,a) i=1,2,3.. i=26,27,.. i=51,52.. i=76,77.. printf(all done/n);.13 for 15

17 for schedule #pragma omp for schedule(type[,chunk]) [clause [[,] clause]..] for (I=0;I<N;I++) NEAT_STUFF(I); TYPE STATIC DYNAMIC GUIDED RUNTIME chunk chunk chunk 1 GUIDED chunk chunk chunk 1 type chunk OMP_SCHEDULE OMP_SCHEDULE SCHEDULE(STATIC).2 4 schedule(static,6) 4 schedule(dynamic,3) 4.14 for do while nowait do nowait do schedule(guided,4) 4 16

18 sections sections section #pragma omp sections #pragma omp section #pragma omp section #pragma omp section nowait sections nowait sections section sections section section [clause[[,]clause]] #pragma sections #pragma section #pragma section #pragma section idle idle.15 sections section section 17

19 single single single nowait #pragma omp single [clauses] #pragma omp single idle idle idle idle.16 single single sections section OpenMP* parallel parallel for parallel sections parallel workshare parallel 18

20 5.3 OpenMP* clauseopenmp* OpenMP* parallel do sections workshare single parallel do parallel sections parallel workshape if schedule private share default firstprivate lastprivate copyin copyprivate reduction ordered nowait num_threads.3 OpenMP* SHARED PRIVATE static OpenMP* threadprivate OpenMP* OpenMP* shared OpenMP* private for stack.4 19

21 #include <omp.h> float a[100],b[100]; int stride; main() int i,s,iam,nthreads; nthreads = omp_get_num_threads(); #pragma omp master stride = 100 / nthreads; for private (iam) for ( i = 0; i < nthreads; i++) iam = omp_get_thread_num(); s= iam * stride; f(s); / ab stride tempfrom a,b, stride f(int from) int i; float tmp; for( i=from; i<from+stride; i++ ) tmp = a[i]; a[i] = b[i]; b[i] = tmp; tmp,from a,b, stride tmp,from tmp,from.17 threadprivate master threadprivate threadprivate copyin parallel list private list for private list private Fork 20

22 for OpenMP* private shared (list) OpenMP* shared default (shared private none) default private shared default (private) threadprivate private(list) default (shared) default default (shared) default (none) private shared privatesharedfirstprivatelastprivate reduction privatesharedfirstprivatelastprivate reduction #pragma omp default (private) #pragma firstprivate(i) shared(x) #pragma shared(s) lastprivate(i) firstprivate ( list ) firstprivate private list private private b = 23.0;..... firstprivate(b), private(i,myid) myid = omp_get_thread_num(); for (i=0; i<n; i++) b += c[myid][i]; c[myid][n] = b; 21

23 lastprivate ( list ) private lastprivate private list private section section copyin (list) copyin threadprivate firstprivate copyprivate (list) copyprivate private 22

24 5.4 mastercriticalbarrieratomicflushordered 6 master master #pragma omp master master critical critical #pragma omp critical [(name)] #pragma omp for #pragma omp critical #pragma omp for.18 23

25 barrier #pragma omp barrier atomic atomic #pramga omp atomic Expression-statement 1 x = x op expr, x = expr op x, x = intr (x, expr), x = intr(expr, x) x expr x intr maxminiandiorieor op +,*,-,/,.and.,.or.,.eqv.,.neqv. atomic atomic critical atomic critical #pragma omp for #pragma atomic #pragma omp for.19 atomic 24

26 flush flush #pragma omp flush(list)] list, save shared list,list order order #pragma omp order order for parallel for for order reduction reduction for reduction reduction( op intr : list ) list shared ist intr max miniandiorieor op +,*,-,/,.and.,.or.,.eqv.,.neqv. reduction op reduction nowait reduction barrier 25

27 reduction #include <omp.h> static long num_steps = ; double step; void main () int i; double x, pi, sum = 0.0; step = 1.0/(double) num_steps; for reduction(+:sum) private(x) for (i=1;i<= num_steps; i++) x = (i-0.5)*step; sum = sum + 4.0/(1.0+x*x); pi = step * sum; + 0.or. 0 * 1 max 1-0 min 0.and. 1 // 1.5 reduction reduction reduction #pragma omp for reduction (+:a,y) reduction (.or.:am) 26

28 5.5 if if parallel if TRUE nm_threads nm_threads parallel nowait OpenMP* do sections single nowait #pragma omp for nowait #pragma omp for.19 nowait 27

29 nowait #pragma omp for nowait for( i=from; i<from+stride; i++ ) a[i] = c * b[i]; #pragma omp for nowait for( i=from; i<from+stride; i++ ) x[i] = y[i] * y[i]; 28

30 5.6 / OpenMP* OMP_NUM_THREADS OMP_SCHEDULE OMP_DYNAMIC OMP_NESTED setenv OMP_NUM_THREADS 4Linux set OMP_NUM_THREADS=4Windows type[,chunk] type STATIC/DYNAMIC/GUIDED chunk chunk STATIC 1 STATIC chunk setenv OMP_SCHEDULE "dynamic"linux set OMP_SCHEDULE=dynamicWindows TRUE FALSE setenv OMP_DYNAMIC TRUELinux set OMP_DYNAMIC=TRUEWindows TRUE FALSE FALSE setenv OMP_NESTED TRUELinux set OMP_NESTED=TRUEWindows.6 OpenMP* 29

31 6OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP* OpenMP*.21 OpenMP* OpenMP* 1. VTune 2. OpenMP* 3. MKL OpenMP* 30

32 7. OpenMP* 31

33 HPC IntelIntel PentiumXeonItaniumVTune Intel Corporation * 2006 Intel Corporation J-001 JPN/0603/PDF/SE/DEG/KS

2. OpenMP OpenMP OpenMP OpenMP #pragma#pragma omp #pragma omp parallel #pragma omp single #pragma omp master #pragma omp for #pragma omp critica

2. 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 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

03_Fortran_osx.indd

03_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 information

The 3 key challenges in programming for MC

The 3 key challenges in programming for MC コンパイラーによる並列化機能 ソフトウェア & ソリューションズ統括部 ソフトウェア製品部 Rev 12/26/2006 コースの内容 並列計算 なぜ使用するのか? OpenMP* 入門 宣言子と使用方法 演習 : Hello world と円周率の計算 並列プログラミング : ヒントとテクニック コード開発で避けるべきこと 2 並列計算なぜ並列処理を使用するのか? 計算をより短い時間で処理 一定の所要時間でより大きな計算を処理

More information

OpenMPプログラミング

OpenMPプログラミング OpenMP プログラミング入門 (Part 2) 講習の内容 :Part 2 OpenMP の概要について OpenMP API のご紹介 1. 並列実行領域 (Parallel Regions) 構文 2. ワークシェアリング (Worksharing) 構文 3. データ環境 (Data Environment) 構文 4. 同期 (Synchronization) 構文 5. 実行時関数 /

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

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

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 3.0 C/C++ 構文の概要

OpenMP 3.0 C/C++ 構文の概要 OpenMP 3.0 C/C++ 構文の概要 OpenMP API 仕様については www.openmp.org でダウンロードしてください OpenMP 実行宣言子は 後続の構造化ブロックや OpenMP 構文に適用されます 構造化ブロック () とは 単文または先頭に入口が 1 つ 末尾に出口が 1 つの複合文です parallel 構文はスレッドのチームを形成し 並列実行を開始します #pragma

More information

2. OpenMP におけるキーワード一覧 OpenMP の全体像を理解するために 指示文 指示節 実行時ライブラリ関数 環境変数にそれぞれどうようなものがあるのかを最初に示します 各詳細については第 4 章以降で説明します 2.1 OpenMP の指示文 OpenMPの指示文は プログラム内で並列

2. OpenMP におけるキーワード一覧 OpenMP の全体像を理解するために 指示文 指示節 実行時ライブラリ関数 環境変数にそれぞれどうようなものがあるのかを最初に示します 各詳細については第 4 章以降で説明します 2.1 OpenMP の指示文 OpenMPの指示文は プログラム内で並列 C 言語による OpenMP 入門 東京大学情報基盤センタープログラミング講習会資料 担当黒田久泰 1. はじめに OpenMP は非営利団体 OpenMP Architecture Review Board(ARB) によって規定されている業界標準規格です 共有メモリ型並列計算機用のプログラムの並列化を記述するための指示文 ライブラリ関数 環境変数などが規定されています OpenMP を利用するには

More information

OpenMP (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)) 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 information

コードのチューニング

コードのチューニング OpenMP による並列化実装 八木学 ( 理化学研究所計算科学研究センター ) KOBE HPC Spring School 2019 2019 年 3 月 14 日 スレッド並列とプロセス並列 スレッド並列 OpenMP 自動並列化 プロセス並列 MPI プロセス プロセス プロセス スレッドスレッドスレッドスレッド メモリ メモリ プロセス間通信 Private Private Private

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション OpenMP 並列解説 1 人が共同作業を行うわけ 田植えの例 重いものを持ち上げる 田おこし 代かき 苗の準備 植付 共同作業する理由 1. 短時間で作業を行うため 2. 一人ではできない作業を行うため 3. 得意分野が異なる人が協力し合うため ポイント 1. 全員が最大限働く 2. タイミングよく 3. 作業順序に注意 4. オーバーヘッドをなくす 2 倍率 効率 並列化率と並列加速率 並列化効率の関係

More information

Microsoft PowerPoint - OpenMP入門.pptx

Microsoft 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 information

C

C C 1 2 1.1........................... 2 1.2........................ 2 1.3 make................................................ 3 1.4....................................... 5 1.4.1 strip................................................

More information

Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. U.S. Government Rights - Commer

Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. U.S. Government Rights - Commer OpenMP API ユーザーズガイド Sun TM Studio 8 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. 650-960-1300 Part No. 817-5813-10 2004 年 3 月, Revision A Copyright 2004 Sun Microsystems, Inc.,

More information

Intel® Compilers Professional Editions

Intel® Compilers Professional Editions 2007 6 10.0 * 10.0 6 5 Software &Solutions group 10.0 (SV) C++ Fortran OpenMP* OpenMP API / : 200 C/C++ Fortran : OpenMP : : : $ cat -n main.cpp 1 #include 2 int foo(const char *); 3 int main()

More information

(Microsoft PowerPoint \215u\213`4\201i\221\272\210\344\201j.pptx)

(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

OpenMPプログラミング

OpenMPプログラミング OpenMP 基礎 岩下武史 ( 学術情報メディアセンター ) 1 2013/9/13 並列処理とは 逐次処理 CPU1 並列処理 CPU1 CPU2 CPU3 CPU4 処理 1 処理 1 処理 2 処理 3 処理 4 処理 2 処理 3 処理 4 時間 2 2 種類の並列処理方法 プロセス並列 スレッド並列 並列プログラム 並列プログラム プロセス プロセス 0 プロセス 1 プロセス間通信 スレッド

More information

AICS 村井均 RIKEN AICS HPC Summer School /6/2013 1

AICS 村井均 RIKEN AICS HPC Summer School /6/2013 1 AICS 村井均 RIKEN AICS HPC Summer School 2013 8/6/2013 1 背景 OpenMP とは OpenMP の基本 OpenMP プログラミングにおける注意点 やや高度な話題 2 共有メモリマルチプロセッサシステムの普及 共有メモリマルチプロセッサシステムのための並列化指示文を共通化する必要性 各社で仕様が異なり 移植性がない そして いまやマルチコア プロセッサが主流となり

More information

スライド 1

スライド 1 High Performance and Productivity 並列プログラミング課題と挑戦 HPC システムの利用の拡大の背景 シュミレーションへの要求 より複雑な問題をより精度良くシュミレーションすることが求められている HPC システムでの並列処理の要求の拡大 1. モデル アルゴリズム 解析対象は何れもより複雑で 規模の大きなものになっている 2. マイクロプロセッサのマルチコア化 3.

More information

XMPによる並列化実装2

XMPによる並列化実装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 information

並列プログラミング入門(OpenMP編)

並列プログラミング入門(OpenMP編) 登録施設利用促進機関 / 文科省委託事業 HPCI の運営 代表機関一般財団法人高度情報科学技術研究機構 (RIST) 1 並列プログラミング入門 (OpenMP 編 ) 2019 年 1 月 17 日 高度情報科学技術研究機構 (RIST) 山本秀喜 RIST 主催の講習会等 2 HPC プログラミングセミナー 一般 初心者向け : チューニング 並列化 (OpenMP MPI) 京 初中級者向け講習会

More information

Microsoft Word - openmp-txt.doc

Microsoft Word - openmp-txt.doc ( 付録 A) OpenMP チュートリアル OepnMP は 共有メモリマルチプロセッサ上のマルチスレッドプログラミングのための API です 本稿では OpenMP の簡単な解説とともにプログラム例をつかって説明します 詳しくは OpenMP の規約を決めている OpenMP ARB の http://www.openmp.org/ にある仕様書を参照してください 日本語訳は http://www.hpcc.jp/omni/spec.ja/

More information

NUMAの構成

NUMAの構成 共有メモリを使ったデータ交換と同期 慶應義塾大学理工学部 天野英晴 hunga@am.ics.keio.ac.jp 同期の必要性 あるプロセッサが共有メモリに書いても 別のプロセッサにはそのことが分からない 同時に同じ共有変数に書き込みすると 結果がどうなるか分からない そもそも共有メモリって結構危険な代物 多くのプロセッサが並列に動くには何かの制御機構が要る 不可分命令 同期用メモリ バリア同期機構

More information

Microsoft PowerPoint - 阪大CMSI pptx

Microsoft PowerPoint - 阪大CMSI pptx 内容に関する質問は katagiri@cc.u-tokyo.ac.jp まで 第 3 回 OpenMP の基礎 東京大学情報基盤センター 片桐孝洋 1 講義日程と内容について (1 学期 : 木曜 3 限 ) 第 1 回 : プログラム高速化の基礎 2013 年 4 月 11 日 イントロダクション ループアンローリング キャッシュブロック化 数値計算ライブラリの利用 その他第 2 回 :MPIの基礎

More information

untitled

untitled OpenMP (Message Passing) (shared memory) DSMon MPI,PVM pthread, solaris thread, NT thread OpenMP annotation thread HPF annotation, distribution hint Fancy parallel programming languages for(i=0;i

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

Class Overview

Class Overview マルチスレッドプログラミング入門 OpenMP Cluster OpenMP による並列プログラミング 内容 はじめに なぜ マルチスレッドプログラミング? 並列処理について マルチスレッドプログラミングの概要 並列処理での留意点 OpenMPによるマルチスレッドプログラミングのご紹介 まとめとして 参考資料のご紹介 2 なぜ マルチスレッドプログラミング? HW の進化 マイクロプロセッサのマルチコア化が進み

More information

Microsoft PowerPoint - 03_What is OpenMP 4.0 other_Jan18

Microsoft 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 information

XcalableMP入門

XcalableMP入門 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 information

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

enshu5_4.key

enshu5_4.key http://www.mmsonline.com/articles/parallel-processing-speeds-toolpath-calculations TA : 菅 新 菅沼智史 水曜 新行紗弓 馬淵隼 木曜 情報知能工学演習V (前半第4週) 政田洋平 システム情報学研究科計算科学専攻 演習 V( 前半 ) の内容 第 1 週 : 高性能計算 (High Performance Computing

More information

Microsoft PowerPoint - 阪大CMSI pptx

Microsoft PowerPoint - 阪大CMSI pptx 内容に関する質問は katagiri@cc.u-tokyo.ac.jp まで 第 3 回 OpenMP の基礎 東京大学情報基盤センター 片桐孝洋 1 講義日程と内容について (1 学期 : 木曜 3 限 ) 第 1 回 : プログラム高速化の基礎 2015 年 4 月 9 日 イントロダクション ループアンローリング キャッシュブロック化 数値計算ライブラリの利用 その他第 2 回 :MPIの基礎

More information

演習1: 演習準備

演習1: 演習準備 演習 1: 演習準備 2013 年 8 月 6 日神戸大学大学院システム情報学研究科森下浩二 1 演習 1 の内容 神戸大 X10(π-omputer) について システム概要 ログイン方法 コンパイルとジョブ実行方法 OpenMP の演習 ( 入門編 ) 1. parallel 構文 実行時ライブラリ関数 2. ループ構文 3. shared 節 private 節 4. reduction 節

More information

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

インテル(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 information

生物情報実験法 (オンライン, 4/20)

生物情報実験法 (オンライン, 4/20) 生物情報実験法 (7/23) 笠原雅弘 (mkasa@cb.k.u-tokyo.ac.jp) Table of Contents スレッドの使い方 OpenMP プログラミング Deadline The deadline is Aug 5 23:59 Your e-mail must have reached my e-mail box at the deadline time. It may take

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

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

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

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

More information

Informatics 2014

Informatics 2014 C 計算機の歴史 手回し計算機 新旧のソロバン バベッジの階差機関 スパコン ENIAC (1946) パソコン 大型汎用計算機 電卓 現在のコンピュータ Input Output Device Central Processing Unit I/O CPU Memory OS (Operating System) OS Windows 78, Vista, XP Windows Mac OS X

More information

XACC講習会

XACC講習会 www.xcalablemp.org 1 4, int array[max]; #pragma xmp nodes p(*) #pragma xmp template t(0:max-1) #pragma xmp distribute t(block) onto p #pragma xmp align array[i] with t(i) int array[max]; main(int argc,

More information

卒業論文

卒業論文 PC OpenMP SCore PC OpenMP PC PC PC Myrinet PC PC 1 OpenMP 2 1 3 3 PC 8 OpenMP 11 15 15 16 16 18 19 19 19 20 20 21 21 23 26 29 30 31 32 33 4 5 6 7 SCore 9 PC 10 OpenMP 14 16 17 10 17 11 19 12 19 13 20 1421

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

Informatics 2015

Informatics 2015 C 計算機の歴史 新旧のソロバン バベッジの階差機関 19C前半 手回し計算機 19C後半 20C後半 スパコン 1960年代 ENIAC (1946) 大型汎用計算機 1950年代 1980年代 電卓 1964 パソコン 1970年代 現在のコンピュータ Input Output Device Central Processing Unit I/O CPU Memory OS (Operating

More information

解きながら学ぶJava入門編

解きながら学ぶJava入門編 44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean

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

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

[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

[1] #include<stdio.h> main() { printf(hello, world.); return 0; } (G1) int long int float ± ± [1] #include printf("hello, world."); (G1) int -32768 32767 long int -2147483648 2147483647 float ±3.4 10 38 ±3.4 10 38 double ±1.7 10 308 ±1.7 10 308 char [2] #include int a, b, c, d,

More information

FFTSS Library Version 3.0 User's Guide

FFTSS Library Version 3.0 User's Guide : 19 10 31 FFTSS 3.0 Copyright (C) 2002-2007 The Scalable Software Infrastructure Project, (CREST),,. http://www.ssisc.org/ Contents 1 4 2 (DFT) 4 3 4 3.1 UNIX............................................

More information

8 / 0 1 i++ i 1 i-- i C !!! C 2

8 / 0 1 i++ i 1 i-- i C !!! C 2 C 2006 5 2 printf() 1 [1] 5 8 C 5 ( ) 6 (auto) (static) 7 (=) 1 8 / 0 1 i++ i 1 i-- i 1 2 2.1 C 4 5 3 13!!! C 2 2.2 C ( ) 4 1 HTML はじめ mkdir work 作業用ディレクトリーの作成 emacs hoge.c& エディターによりソースプログラム作成 gcc -o fuga

More information

インテル(R) Visual Fortran Composer XE

インテル(R) Visual Fortran Composer XE Visual Fortran Composer XE 1. 2. 3. 4. 5. Visual Studio 6. Visual Studio 7. 8. Compaq Visual Fortran 9. Visual Studio 10. 2 https://registrationcenter.intel.com/regcenter/ w_fcompxe_all_jp_2013_sp1.1.139.exe

More information

untitled

untitled OS 2007/4/27 1 Uni-processor system revisited Memory disk controller frame buffer network interface various devices bus 2 1 Uni-processor system today Intel i850 chipset block diagram Source: intel web

More information

1 (bit ) ( ) PC WS CPU IEEE754 standard ( 24bit) ( 53bit)

1 (bit ) ( ) PC WS CPU IEEE754 standard ( 24bit) ( 53bit) GNU MP BNCpack tkouya@cs.sist.ac.jp 2002 9 20 ( ) Linux Conference 2002 1 1 (bit ) ( ) PC WS CPU IEEE754 standard ( 24bit) ( 53bit) 10 2 2 3 4 5768:9:; = %? @BADCEGFH-I:JLKNMNOQP R )TSVU!" # %$ & " #

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

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

ACE Associated Computer Experts bv

ACE Associated Computer Experts bv CoSy Application CoSy Marcel Beemster/Yoichi Sugiyama ACE Associated Compiler Experts & Japan Novel Corporation contact: yo_sugi@jnovel.co.jp Parallel Architecture 2 VLIW SIMD MIMD 3 MIMD HW DSP VLIW/ILP

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

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa I 2017 11 1 SageMath SageMath( Sage ) Sage Python Sage Python Sage Maxima Maxima Sage Sage Sage Linux, Mac, Windows *1 2 Sage Sage 4 1. ( sage CUI) 2. Sage ( sage.sage ) 3. Sage ( notebook() ) 4. Sage

More information

ストリーミング SIMD 拡張命令2 (SSE2) を使用した SAXPY/DAXPY

ストリーミング SIMD 拡張命令2 (SSE2) を使用した SAXPY/DAXPY SIMD 2(SSE2) SAXPY/DAXPY 2.0 2000 7 : 248600J-001 01/12/06 1 305-8603 115 Fax: 0120-47-8832 * Copyright Intel Corporation 1999, 2000 01/12/06 2 1...5 2 SAXPY DAXPY...5 2.1 SAXPY DAXPY...6 2.1.1 SIMD C++...6

More information

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

Excel97関数編

Excel97関数編 Excel97 SUM Microsoft Excel 97... 1... 1... 1... 2... 3... 3... 4... 5... 6... 6... 7 SUM... 8... 11 Microsoft Excel 97 AVERAGE MIN MAX SUM IF 2 RANK TODAY ROUND COUNT INT VLOOKUP 1/15 Excel A B C A B

More information

Java演習(4) -- 変数と型 --

Java演習(4)   -- 変数と型 -- 50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends

More information

Informatics 2010.key

Informatics 2010.key http://math.sci.hiroshima-u.ac.jp/ ~ryo/lectures/informatics2010/ 1 2 C ATM etc. etc. (Personal Computer) 3 4 Input Output Device Central Processing Unit I/O CPU Memory 5 6 (CPU),,... etc. C, Java, Fortran...

More information

tutorial_lc.dvi

tutorial_lc.dvi 00 Linux v.s. RT Linux v.s. ART-Linux Linux RT-Linux ART-Linux Linux kumagai@emura.mech.tohoku.ac.jp 1 1.1 Linux Yes, No.,. OS., Yes. Linux,.,, Linux., Linux.,, Linux. Linux.,,. Linux,.,, 0..,. RT-Linux

More information

新・明解C言語で学ぶアルゴリズムとデータ構造

新・明解C言語で学ぶアルゴリズムとデータ構造 第 1 章 基本的 1 n 141 1-1 三値 最大値 algorithm List 1-1 a, b, c max /* */ #include int main(void) { int a, b, c; int max; /* */ List 1-1 printf("\n"); printf("a"); scanf("%d", &a); printf("b"); scanf("%d",

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

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225 Java Java Java Java Java 4 p35 4-2 * *** ***** *** * Unix p36 4-3 a,b,c,d 100,200,250,500 a*b = 20000 a*b+c = 20250 a*b+c*d = 145000 (a+b)*(c+d) = 225000 a+b*c+d = 50600 b/a+d/c = 4 p38 4-4 (1) mul = 1

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

More information

1 OpenCL OpenCL 1 OpenCL GPU ( ) 1 OpenCL Compute Units Elements OpenCL OpenCL SPMD (Single-Program, Multiple-Data) SPMD OpenCL work-item work-group N

1 OpenCL OpenCL 1 OpenCL GPU ( ) 1 OpenCL Compute Units Elements OpenCL OpenCL SPMD (Single-Program, Multiple-Data) SPMD OpenCL work-item work-group N GPU 1 1 2 1, 3 2, 3 (Graphics Unit: GPU) GPU GPU GPU Evaluation of GPU Computing Based on An Automatic Program Generation Technology Makoto Sugawara, 1 Katsuto Sato, 1 Kazuhiko Komatsu, 2 Hiroyuki Takizawa

More information

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do (Version: 2017/4/18) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/5/16) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

Microsoft Word - 計算科学演習第1回3.doc

Microsoft Word - 計算科学演習第1回3.doc スーパーコンピュータの基本的操作方法 2009 年 9 月 10 日高橋康人 1. スーパーコンピュータへのログイン方法 本演習では,X 端末ソフト Exceed on Demand を使用するが, 必要に応じて SSH クライアント putty,ftp クライアント WinSCP や FileZilla を使用して構わない Exceed on Demand を起動し, 以下のとおり設定 ( 各自のユーザ

More information

cpp1.dvi

cpp1.dvi 2017 c 1 C++ (1) C C++, C++, C 11, 12 13 (1) 14 (2) 11 1 n C++ //, [List 11] 1: #include // C 2: 3: int main(void) { 4: std::cout

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

インテル® Parallel Studio 入門ガイド

インテル® Parallel Studio 入門ガイド Parallel Studio エクセルソフト株式会社 www.xlsoft.com Rev. 1.1 (2010/04/08) 1 / 48 ... 3 Parallel Studio... 3... 4... 5... 6 Parallel Composer... 8 Parallel Amplifier... 12 Parallel Composer... 16 Parallel Composer...

More information

( CUDA CUDA CUDA CUDA ( NVIDIA CUDA I

(    CUDA CUDA CUDA CUDA (  NVIDIA CUDA I GPGPU (II) GPGPU CUDA 1 GPGPU CUDA(CUDA Unified Device Architecture) CUDA NVIDIA GPU *1 C/C++ (nvcc) CUDA NVIDIA GPU GPU CUDA CUDA 1 CUDA CUDA 2 CUDA NVIDIA GPU PC Windows Linux MaxOSX CUDA GPU CUDA NVIDIA

More information

Microsoft PowerPoint ppt [互換モード]

Microsoft PowerPoint ppt [互換モード] 計算機アーキテクチャ特論 2013 年 10 28 枝廣 前半 ( 並列アーキテクチャの基本 枝廣 ) 10/7, 10/21, 10/28, 11/11, 11/18, (12/2)( 程は予定 ) 内容 ( 変更の可能性あり ) 序論 ( マルチコア= 並列アーキテクチャ概論 ) キャッシュ コヒーレンシ メモリ コンシステンシ 並列アーキテクチャモデル OSモデル 並列プログラミングモデル 語

More information

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I  Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~alse I Exercise on Programming I http://bit.ly/oitprog1 1, 2 of 14 ( RD S ) I 1, 2 of 14 1 / 44 Ruby Ruby ( RD S ) I 1, 2 of 14 2 / 44 7 5 9 2 9 3 3 2 6 5 1 3 2 5 6 4 7 8 4 5 2 7 9 6 4 7 1 3 ( RD S ) I 1, 2

More information

連載講座 : 高生産並列言語を使いこなす (5) 分子動力学シミュレーション 田浦健次朗 東京大学大学院情報理工学系研究科, 情報基盤センター 目次 1 問題の定義 17 2 逐次プログラム 分子 ( 粒子 ) セル 系の状態 ステップ 18

連載講座 : 高生産並列言語を使いこなす (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 information

SystemC 2.0を用いた簡易CPUバスモデルの設計

SystemC 2.0を用いた簡易CPUバスモデルの設計 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2 CPU CPU CQ 1997 11 Page 207 4 Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23

More information

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* ( 2016 2016 07 28 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF : 11011 N N 0 N N 11 1001 N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) 1100100 (2) 1111011 (3) 1110010 (4) 1001011

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

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 information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

main.dvi

main.dvi PC 1 1 [1][2] [3][4] ( ) GPU(Graphics Processing Unit) GPU PC GPU PC ( 2 GPU ) GPU Harris Corner Detector[5] CPU ( ) ( ) CPU GPU 2 3 GPU 4 5 6 7 1 toyohiro@isc.kyutech.ac.jp 45 2 ( ) CPU ( ) ( ) () 2.1

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2018 2018 08 02 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx

More information

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61

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 information

SystemC言語概論

SystemC言語概論 SystemC CPU S/W 2004/01/29 4 SystemC 1 SystemC 2.0.1 CPU S/W 3 ISS SystemC Co-Simulation 2004/01/29 4 SystemC 2 ISS SystemC Co-Simulation GenericCPU_Base ( ) GenericCPU_ISS GenericCPU_Prog GenericCPU_CoSim

More information

ex01.dvi

ex01.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

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

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

Nios II ハードウェア・チュートリアル

Nios II ハードウェア・チュートリアル Nios II ver. 7.1 2007 8 1. Nios II FPGA Nios II Quaruts II 7.1 Nios II 7.1 Nios II Cyclone II count_binary 2. 2-1. http://www.altera.com/literature/lit-nio2.jsp 2-2. Nios II Quartus II FEATURE Nios II

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

OpenMP の概要

OpenMP の概要 OpenMP プログラミング ワークショップ 平成 13 年 3 月 22 日 日本 SGI 株式会社製品技術本部スケーラブルシステムテクノロジーセンター芦澤芳夫 OpenMP の概要 共有メモリ型並列化 API の必要性 標準化による利点 利用者 異機種間の移行が容易 ソフトウェアベンダ 移植性 保守性 品質向上 API の標準化が遅れた理由 各ベンダが独自の API を提案 同様の機能を各社各様の指示行で実現

More information