XACCの概要

Similar documents
HPC146

HPC143

XcalableMP入門

XACC講習会

XMPによる並列化実装2

1.overview

Microsoft PowerPoint - sps14_kogi6.pptx

PowerPoint Presentation

IPSJ SIG Technical Report Vol.2012-ARC-202 No.13 Vol.2012-HPC-137 No /12/13 Tightly Coupled Accelerators 1,a) 1,b) 1,c) 1,d) GPU HA-PACS

高生産 高性能プログラミング のための並列言語 XcalableMP 佐藤三久 筑波大学計算科学研究センター

研究背景 大規模な演算を行うためには 分散メモリ型システムの利用が必須 Message Passing Interface MPI 並列プログラムの大半はMPIを利用 様々な実装 OpenMPI, MPICH, MVAPICH, MPI.NET プログラミングコストが高いため 生産性が悪い 新しい並

TSUBAME2.0 における GPU の 活用方法 東京工業大学学術国際情報センター丸山直也第 10 回 GPU コンピューティング講習会 2011 年 9 月 28 日

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション

untitled

CUDA 連携とライブラリの活用 2

( CUDA CUDA CUDA CUDA ( NVIDIA CUDA I

DO 時間積分 START 反変速度の計算 contravariant_velocity 移流項の計算 advection_adams_bashforth_2nd DO implicit loop( 陰解法 ) 速度勾配, 温度勾配の計算 gradient_cell_center_surface 速

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

MPI usage

GPU チュートリアル :OpenACC 篇 Himeno benchmark を例題として 高エネルギー加速器研究機構 (KEK) 松古栄夫 (Hideo Matsufuru) 1 December 2018 HPC-Phys 理化学研究所 共通コードプロジェクト

23 Fig. 2: hwmodulev2 3. Reconfigurable HPC 3.1 hw/sw hw/sw hw/sw FPGA PC FPGA PC FPGA HPC FPGA FPGA hw/sw hw/sw hw- Module FPGA hwmodule hw/sw FPGA h

HPEハイパフォーマンスコンピューティング ソリューション

GPU n Graphics Processing Unit CG CAD

07-二村幸孝・出口大輔.indd

untitled

nakao

GPU GPU CPU CPU CPU GPU GPU N N CPU ( ) 1 GPU CPU GPU 2D 3D CPU GPU GPU GPGPU GPGPU 2 nvidia GPU CUDA 3 GPU 3.1 GPU Core 1

,4) 1 P% P%P=2.5 5%!%! (1) = (2) l l Figure 1 A compilation flow of the proposing sampling based architecture simulation

Vol.214-HPC-145 No /7/3 C #pragma acc directive-name [clause [[,] clause] ] new-line structured block Fortran!$acc directive-name [clause [[,] c

01_OpenMP_osx.indd

Microsoft PowerPoint - XMP-AICS-Cafe ppt [互換モード]

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


マルチコアPCクラスタ環境におけるBDD法のハイブリッド並列実装

NUMAの構成

2ndD3.eps

GPU CUDA CUDA 2010/06/28 1

Slides: TimeGraph: GPU Scheduling for Real-Time Multi-Tasking Environments

CPU 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

GPGPU

PC Development of Distributed PC Grid System,,,, Junji Umemoto, Hiroyuki Ebara, Katsumi Onishi, Hiroaki Morikawa, and Bunryu U PC WAN PC PC WAN PC 1 P

WinHPC ppt

Microsoft PowerPoint - CCS学際共同boku-08b.ppt

120802_MPI.ppt

1 GPU GPGPU GPU CPU 2 GPU 2007 NVIDIA GPGPU CUDA[3] GPGPU CUDA GPGPU CUDA GPGPU GPU GPU GPU Graphics Processing Unit LSI LSI CPU ( ) DRAM GPU LSI GPU

スライド 1

DKA ( 1) 1 n i=1 α i c n 1 = 0 ( 1) 2 n i 1 <i 2 α i1 α i2 c n 2 = 0 ( 1) 3 n i 1 <i 2 <i 3 α i1 α i2 α i3 c n 3 = 0. ( 1) n 1 n i 1 <i 2 < <i

develop

main.dvi

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

卒業論文

第3回戦略シンポジウム緑川公開用

115 9 MPIBNCpack 9.1 BNCpack 1CPU X = , B =

CCS HPCサマーセミナー 並列数値計算アルゴリズム

TSUBAME2.0におけるGPUの 活用方法

名称 : 日本 GPU コンピューティングパートナーシップ (G-DEP) 所在 : 東京都文京区本郷 7 丁目 3 番 1 号東京大学アントレプレナープラザ, 他工場 URL アライアンスパートナー コアテクノロジーパートナー NVIDIA JAPAN ソリュ

1重谷.PDF

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

HP WORKSTATIONS グラフィックスカード

! 行行 CPUDSP PPESPECell/B.E. CPUGPU 行行 SIMD [SSE, AltiVec] 用 HPC CPUDSP PPESPE (Cell/B.E.) SPE CPUGPU GPU CPU DSP DSP PPE SPE SPE CPU DSP SPE 2

システムソリューションのご紹介

r07.dvi

ohp07.dvi

連載講座 : 高生産並列言語を使いこなす (4) ゲーム木探索の並列化 田浦健次朗 東京大学大学院情報理工学系研究科, 情報基盤センター 目次 1 準備 問題の定義 αβ 法 16 2 αβ 法の並列化 概要 Young Brothers Wa


スパコンに通じる並列プログラミングの基礎

IPSJ SIG Technical Report Vol.2013-ARC-206 No /8/1 Android Dominic Hillenbrand ODROID-X2 GPIO Android OSCAR WFI 500[us] GPIO GP

スライド 1

スパコンに通じる並列プログラミングの基礎

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

strtok-count.eps

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

目 目 用方 用 用 方

IPSJ SIG Technical Report Vol.2017-HPC-158 No /3/9 OpenACC MPS 1,a) 1 Moving Particle Semi-implicit (MPS) MPS MPS OpenACC GPU 2 4 GPU NVIDIA K2

Itanium2ベンチマーク

02_C-C++_osx.indd

SystemC言語概論

Ver. 1.1 Ver NOTE 1TB 7.2K RPM SAS 3.5, 40,100 2TB 7.2K RPM SAS 3.5, 46,600 4TB 7.2K RPM SAS 6Gbps 3.5, 63,600 PowerEdge D

programmingII2019-v01

橡3_2石川.PDF

N08

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

Iteration 0 Iteration 1 1 Iteration 2 Iteration 3 N N N! N 1 MOPT(Merge Optimization) 3) MOPT MOP

86 8 MPIBNCpack 15 : int n, myid, numprocs, i; 16 : double pi, start_x, end_x; 17 : double startwtime = 0.0, endwtime; 18 : int namelen; 19 : char pro

1 OpenCL Work-Item Private Memory Workgroup Local Memory Compute Device Global/Constant Memory Host Host Memory OpenCL CUDA CUDA Compute Unit MP Proce

GPGPUクラスタの性能評価

IPSJ SIG Technical Report Vol.2013-ARC-203 No /2/1 SMYLE OpenCL (NEDO) IT FPGA SMYLEref SMYLE OpenCL SMYLE OpenCL FPGA 1


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

I I / 47

Microsoft PowerPoint - RBU-introduction-J.pptx

Microsoft PowerPoint - GPU_computing_2013_01.pptx

Intel® Compilers Professional Editions

ohp03.dvi

HP Workstation 総合カタログ

matrox0

para02-2.dvi

2 T ax 2 + 2bxy + cy 2 + dx + ey + f = 0 a + b + c > 0 a, b, c A xy ( ) ( ) ( ) ( ) u = u 0 + a cos θ, v = v 0 + b sin θ 0 θ 2π u = u 0 ± a

Transcription:

2

global void kernel(int a[max], int llimit, int ulimit) {... } : int main(int argc, char *argv[]){ MPI_Int(&argc, &argc); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); dx = MAX/size; llimit = rank * dx; ulimit = (rank!= size-1)? ulimit = llimit + dx : MAX; kernel <<< N_GRID, N_BLOCK >>> (a, llimit, ulimit); MPI_Send(a,..., MPI_COMM_WORLD); MPI_Recv(a,..., MPI_COMM_WORLD, &status); 3

XMP MPI) OpenACC CUDA XACC extensions 4

http://xcalablemp.org int main(){ double a[max], res = 0; int main(){ double a[max], res = 0; #pragma xmp nodes p[4] #pragma xmp template t[max] #pragma xmp distribute t[block] on p #pragma xmp align a[i] with t[i] for(int i=0; i<max; i++) res += a[i]; : #pragma xmp loop on t[i] reduction(+:res) for(int i=0; i<max; i++) res += a[i]; : 5

6 https://www.openacc.org int main(){ double a[max], res = 0; for(int i=0; i<max; i++) res += a[i]; : int main(){ double a[max], res = 0; #pragma acc enter data copyin(a) #pragma acc parallel loop reduction(+:res) for(int i=0; i<max; i++) res += a[i]; :

7 int main(){ double a[max], res = 0; #pragma xmp nodes p[4] #pragma xmp template t[max] #pragma xmp distribute t[block] on p #pragma xmp align a[i] with t[i] #pragma acc enter data copyin(a) 1 1 #pragma xmp loop on t[i] reduction(+:res) acc #pragma acc parallel loop reduction(+:res) for(int i=0; i<max; i++) res += a[i]; : 3 3

int a[n]:[*]; // Declare coarray int b[n]; #pragma acc declare create(a, b) if(xmpc_this_image() == 0){ #pragma acc host_data use_device(a, b) a[:]:[1] = b[:]; } 1 1 8

int a[n]:[*]; // Declare coarray int b[n]; #pragma acc declare create(a) if(xmpc_this_image() == 0){ #pragma acc host_data use_device(a) a[:]:[1] = b[:]; } 1 1 9

int a[n]:[*]; // Declare coarray int b[n]; #pragma acc declare create(a) if(xmpc_this_image() == 0){ #pragma acc host_data use_device(a) a[:] = b[:]:[1]; } 1 1 10

11

12 double u[xsize][ysize], uu[xsize][ysize]; #pragma xmp nodes p(x, y) #pragma xmp template t(0:ysize 1, 0:XSIZE 1) #pragma xmp distribute t(block, block) onto p #pragma xmp align [j][i] with t(i,j) :: u, uu #pragma xmp shadow uu[1:1][1:1] #pragma acc data copy(u) copyin(uu) for(k=0; k<max_iter; k++){ #pragma xmp loop (y,x) on t(y,x) #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) uu[x][y] = u[x][y]; #pragma xmp reflect (uu) acc #pragma xmp loop (y,x) on t(y,x) #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) u[x][y] = (uu[x-1][y]+uu[x+1][y]+ uu[x][y-1]+uu[x][y+1])/4.0; } // end k } // end data

13 double u[xsize][ysize], uu[xsize][ysize]; #pragma xmp nodes p[ny][nx] #pragma xmp template t[ysize][xsize] #pragma xmp distribute t[block][block] onto p #pragma xmp align [j][i] with t(i,j) :: u, uu #pragma xmp shadow uu[1][1] #pragma acc data copy(u) copyin(uu) { for(k=0; k<max_iter; k++){ #pragma xmp loop (y,x) on t[x][y] #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) uu[x][y] = u[x][y]; #pragma xmp reflect (uu) #pragma xmp loop (y,x) on t[x][y] #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) u[x][y] = (uu[x-1][y]+uu[x+1][y]+ uu[x][y-1]+uu[x][y+1])/4.0; } // end k } // end data

double u[xsize][ysize], uu[xsize][ysize]; #pragma xmp nodes p[ny][nx] #pragma xmp template t[ysize][xsize] #pragma xmp distribute t[block][block] onto p #pragma xmp align [j][i] with t(i,j) :: u, uu #pragma xmp shadow uu[1][1] #pragma acc data copy(u) copyin(uu) { for(k=0; k<max_iter; k++){ #pragma xmp loop (y,x) on t[x][y] #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) uu[x][y] = u[x][y]; #pragma xmp reflect (uu) acc #pragma xmp loop (y,x) on t[x][y] #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) u[x][y] = (uu[x-1][y]+uu[x+1][y]+ uu[x][y-1]+uu[x][y+1])/4.0; } // end k } // end data 14

double u[xsize][ysize], uu[xsize][ysize]; #pragma xmp nodes p(x, y) #pragma xmp template t(0:ysize 1, 0:XSIZE 1) #pragma xmp distribute t(block, block) onto p #pragma xmp align [j][i] with t(i,j) :: u, uu #pragma xmp shadow uu[1:1][1:1] #pragma acc data copy(u) copyin(uu) { for(k=0; k<max_iter; k++){ #pragma xmp loop (y,x) on t(y,x) #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) uu[x][y] = u[x][y]; #pragma xmp reflect (uu) acc #pragma xmp loop (y,x) on t(y,x) #pragma acc parallel loop collapse(2) for(x=1; x<xsize-1; x++) for(y=1; y<ysize-1; y++) u[x][y] = (uu[x-1][y]+uu[x+1][y]+ uu[x][y-1]+uu[x][y+1])/4.0; } // end k } // end data 15

Omni compiler https://omni-compiler.org Source-to-source compiler XMP XACC OpenACC OpenMPに対応 Omni XACC compilerを使う際 OpenACC compilerは任意のものを 利用可能 PGI Crayなど オープンソースソフトウェア 16

http://research.kek.jp/people/matufuru/research/programs/index.html 17

Quark_t v[nt][nz][ny][nx]; #pragma xmp template t[nt][nz] #pragma xmp nodes p[pt][pz] #pragma xmp distribute t[block][block] onto p #pragma xmp align v[i][j][*][*] with t[i][j] #pragma xmp shadow v[1][1][0][0] #pragma acc enter data copyin(v) 1. 2 4 2. 3. 1 1 18

Quark_t v[nt][nz][ny][nx]; #pragma xmp template t[nt][nz] #pragma xmp nodes p[pt][pz] #pragma xmp distribute t[block][block] onto p #pragma xmp align v[i][j][*][*] with t[i][j] #pragma xmp shadow v[1][1][0][0] #pragma acc enter data copyin(v) 1. 2 4 2. 3. 2 1 2 1 19

Quark_t v[nt][nz][ny][nx]; #pragma xmp template t[nt][nz] #pragma xmp nodes p[pt][pz] #pragma xmp distribute t[block][block] onto p #pragma xmp align v[i][j][*][*] with t[i][j] #pragma xmp shadow v[1][1][0][0] #pragma acc enter data copyin(v) 1. 2 4 2. 3. 2 1 2 1 3 3 20

#pragma xmp reflect(v) width(/periodic/1:1,/periodic/1:1,0,0) orthogonal acc WD(..., v); // Stencil calculation 21

Delta-SLOC: - 81% Delta-SLOC - 28% 22

23 CPU/Memory Intel Xeon-E5 2680v2 2.8 GHz / DDR3 SDRAM 128GB 59.7GB/s x 2 GPU/Memory NVIDIA Tesla K20X / GDDR5 6GB 250GB/s x 4 Network InfiniBand Mellanox Connect-X3 4xQDR x 2rails 8GB/s

24

25

Tightly Coupled Accelerators (TCA) Communication architecture based on PCIe [1] technology Developed by HA-PACS Project in Univ, of Tsukuba, Japan Nodes are connected using PCIe external cable through PEACH2, which is a TCA interface Board Direct, low latency data transfers among accelerator memories ACC PE2 ACC PE2 No host memory copies No MPI software stack No protocol conversions CPU Mem CPU NIC SW Mem NIC PE2 = PEACH2 [1] Toshihiro Hanawa et al. "Tightly Coupled Accelerators Architecture for Minimizing Communication Latency among Accelerators," in IPDPSW 13 Proceedings of the 2013 26

27 10000.00 1000.00 100.00 10.00 1.00 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 10485 20971 41943

28 10000.00 1000.00 100.00 10.00 1.00 2 4 8 16 32 64 128 256 512

NVIDIA K20X InfiniBand 4xQDR x 2rails PCIe Gen2 x8 for PEACH2 MVAPICH-GDR2.0b gcc-4.7, CUDA6.0, Omni OpenACC Compiler 0.9b 320 240 160 80 0 XACC (PEACH2) OpenACC+MPI (GDR) 1 2 4 8 16 29

30

31

32