XcalableACC
XcalableACC、XACC は演算加速器を搭載した大規模な並列計算機上での高性能計算向けにXcalableMPを拡張して作られたプログ�…
この記事のほとんどまたは全てが唯一の出典にのみ基づいています。 (2014年11月) |
XcalableACC、XACC は演算加速器を搭載した大規模な並列計算機上での高性能計算向けにXcalableMPを拡張して作られたプログラミング言語である[1]。
XACCは指示文ベースの並列言語であるXcalableMPとOpenACCを組合せた言語である。 XACCでは、プログラマはXcalableMPの指示文とOpenACCの指示文をシームレスに利用することができる。 例えば、XcalableMPで定義した分散配列をOpenACCの指示文中で用いることが可能である。
データ通信については、プロセス間の通信にはXcalableMPの指示文を用い、ホストメモリとアクセラレータ間の通信にはOpenACCの指示文を用いる。 さらに、アクセラレータ間の通信には拡張されたXcalableMPの指示文を用いる。
XcalableMPおよびOpenACCはC言語およびFortranに対応しているため、XACCも同様にC言語およびFortranに対応している。
例
double u[XSIZE][YSIZE], uu[XSIZE][YSIZE];
#pragma xmp template t(0:YSIZE−1, 0:XSIZE−1)
#pragma xmp nodes p(x, y)
#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) // XcalableMPが分散したループ文を、
#pragma acc parallel loop collapse(2) // さらにOpenACC指示文がアクセラレータ内で分割処理する
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 // shadow指示文で定義した袖領域をアクセラレータ間で同期する
#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
脚注
関連項目
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.