統 計 数 理 研 究 所 統 計 科 学 スーパーコンピュータシステム 並 列 計 算 機 サブシステム 利 用 の 手 引 き 第 1.2 版
1.0 2004.02.27 1.1 2004.03.12 1.2 2004.06.28 MI MI
1.... 1 1.1... 1 1.2... 2 1.3.... 3 2.... 4 2.1... 4 2.2.... 4 2.3.... 4 3.... 5 3.1.... 5 3.2. Fortran... 5 3.3. C... 6 3.4. MSL... 6 3.5. MATRIX/M... 6 3.6.... 7 4... 9 4.1. LoadLeveler... 9 4.2. LoadLeveler... 9 4.3.... 10 4.5.... 10 4.6.... 10 4.6.... 11 4.7. JCF... 11 4.8. MI... 12 4.9. MI... 13
1. 1.1 SR11000 H1 4 4GB/ 16Way 32GB HDD 146.8GB 16Way 32GB HDD 146.8GB 16Way 32GB HDD 146.8GB 16Way 32GB HDD 146.8GB I/O 1000Base-SX 1
多 段 クロスバスイッチ ノード ノード L2 L2 L2 L2 L2 L2 L2 L2 スイッチ L3 L3 L3 L3 L3 L3 L3 L3 M M M M M M M M 146.8GB 2 IO 収 納 を 行 う 場 合 C I C I ブリッジ -I/O device -Network :ower4+プロセッサ( プロセッサ(1.7GHz) :キャッシュ( 命 令 キャッシュ 64KB データキャッシュ 32KB) L2:L2キャッシュ(1.5MB) L3:L3キャッシュ(32MB) M:メインメモリ(32GB) 1.2 AIX L LoadLeveler arallel Environment FORTRAN90 C for AIX MATRIX/M MSL2 OS Fortran C 2
1.3. I I SR11000 #1 ismsr 133.58.226.111 srnd01 133.58.228.111 SR11000 #2 srnd02 133.58.228.112 SR11000 #3 srnd03 133.58.228.113 SR11000 #4 srnd04 133.58.228.114 SR11000 H1 srnd01 srnd02 srnd03 srnd04 SR11000#1 SR11000#2 SR11000#3 SR11000#4 ismsr 3
2. 2.1. SR11000# ismsr.ism.ac.jp) SR11000 #1 SR11000 #2 SR11000 #3 SR11000 #4 2.2. I ismsr.ism.ac.jp 133.58.226.111 telnet ftp ssh UNIX vi emacs LANG LANG ja_j EUC code) Ja_J SJIS code) C 7 ASCII 2.3. HOME (NFS) /home0 /home1 (ismorg) NFS 4
3. 3.1. f90 mpif90_r xlc mpcc_r Fortran MI Fortran C MI C 3.2. Fortran ( ) % f90 [] MI % mpif90_r [] (man f90 -o a.out -Ox ( O x=0 ( 0 ( -Os) x=3 x=4 x=s -omp OpenM -parallel[=n] N=0~4 N=0-64 64 32 -loglist.log 5
3.3. C % xlc [] MI % mpcc_r [] xls -o a.out -q64 64 32 -O -On n=2,3,4,5 n n=2 -qsmp=auto SM -qsmp=omp OpenM 3.4. MSL % f90 [] -lmsl2 3.5. MATRIX/M % f90 [] -lmatmpp 6
3.6. Fortran xclock) xclock CU 2 q call xclock(p,q) q=1 p 12 HH MM SSHH MM SS q=2 4 p q=3 CU p q=4 CU 8 p 1.0 1 q=5 q=4 q=3 q=6 CU 8 p 1.0 1 q=7 p q=8 8 p q=7 % cat sample.f program sample real*8 t1,t2,dummy call xclock(dummy,7) call sub1( ) call xclock(t1,8) print *,t1 call sub2( ) call xclock(t2,8) print *,t2 - t1 end t1 sub1( ) t2 sub2( ) 7
C gettimeofday gettimeofday 1970 1 1 00:00:00 0 1 #include <sys/time.h> int gettimeofday ( Tp, Tzp) struct timeval *Tp; void *Tzp; timeval /usr/include/sys/time.h struct timeval { time_t tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; #include<stdio.h> #include<stdlib.h> #include<sys/time.h> int main(void) { int i; float s=0; double ts, te; double elapsed(); ts=elapsed(); for(i=0;i<1000000;i++); s=s+(float)i; te=elapsed(); printf("%10.6e n",te-ts); exit(exit_success); } double elapsed() { struct timeval tp; void *tzp; gettimeofday(&tp,tzp); return ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 ); } 8
4 4.1. LoadLeveler LoadLeveler V3.2 JCF LoadLeveler llcancel llcancel <option> <joblist> llclass llclass <option> <class name> llq llq <option> <job number/name> llstatus llstatus <option> <host> llsubmit llsubmit <option> <JCF filename> 4.2. LoadLeveler # (h) CU (GB/ ) (h) 1 S1 1 1 24 25 2 4 4 1 24 25 llclass 9
4.3. JCF llsubmit sample.f JCF (JCFSAMLE) #!/bin/csh -f #@ class = S1 #@ output = $(jobid).out #@ error = $(jobid).err #@ environment = COY_ALL #@ queue hostname unlimit f90 -o sample.exe sample.f./sample.exe echo "TEST END" csh 4.4. llsubmit JCF % llsubmit JCFSAMLE llsubmit: The job "ismsr-cx1.ism.ac.jp.5651" has been submitted. ID 5561 4.5. llq Id ID Owner Submitted STR I Class RunningON 4.6. llcancel % llcancel 5664 ID llcancel: Cancel command has been sent to the central manager. 10
4.6. arallel Environment poe mpiexec 2 sample.exe poe 4 JCF #!/bin/csh -f csh #@ class = 4 #@ job_type = parallel #@ node = 4 #@ output = $(jobid).out #@ error = $(jobid).err #@ environment = LANG=C; # NLSATH=/usr/lib/nls/msg/C/pepoe.cat () #@ queue unlimit poe./sample.exe procs 4 -procs 4 ( )class,jyob_type,node,environ 4.7. JCF JCF JCF class class = <CLASS Name> 4 or S1 S1 job_type job_type=<parallel/serial> serial node node=<1-4> node=1 output output=<file name> /dev/null error error=<file name> /dev/null input input=<file name> /dev/null environment environment=<env1;env2 > COY_ALL queue queue 11
4.8. MI 1 16CU MI (1) mpif90 " -noparallel " ( MI sample.f % mpif90 -Os -64 -noparallel sample.f (2) ( 1 16CU JCF #!/bin/csh -f #@ class = 4 #@ job_type = parallel #@ node = 1 #@ total_tasks = 16 #@ resources=consumablecpus(1) #@ output = $(jobid).out #@ error = $(jobid).err #@ environment = LANG=C; # NLSATH=/usr/lib/nls/msg/C/pepoe.cat #@ queue unlimit poe./sample.exe procs 16 csh CU () -procs 16 ( )3 48CU JCF #!/bin/csh -f #@ class = 4 #@ job_type = parallel #@ node = 3 #@ total_tasks = 48 #@ resources=consumablecpus(1) #@ output = $(jobid).out #@ error = $(jobid).err #@ environment = LANG=C; # NLSATH=/usr/lib/nls/msg/C/pepoe.cat #@ queue unlimit poe./sample.exe procs 48 csh CU () -procs 48 #@ total_tasks = N 12
4.9. MI 1 16CU SM) MI (1) mpif90 ( MI sample.f % mpif90 -Os -64 sample.f (2) CU RUNST(THREADNUM(n n CU n=16 ( CU MI JCF #!/bin/csh -f #@ class = 4 #@ job_type = parallel #@ node = 1 #@ total_tasks = 8 #@ resources=consumablecpus(2) #@ output = $(jobid).out #@ error = $(jobid).err #@ environment = LANG=C; # NLSATH=/usr/lib/nls/msg/C/pepoe.cat #@ queue unlimit poe./sample.exe -F'RUNST(THREADNUM(2))' csh CU 2 () 13