Буланкин В.Б / ВТс-211 / cluster
.pdf– , & -hosts N host1 ... hostN, N
$ , host1 ... hostN & .
Intel MPI Library
/ $ MPI mpich2. 3; & "
&
$ . - , "
$" "
$ . , InfiniBand
& ; Ethernet Myrinet
.
- ;
$ . / : & ,
Ethernet & ", & RDMA (Remote Direct Memory Access) DAPL. .
+ ,
InfiniBand Myrinet. "
$ ,
$
.
Intel MPI Library & MPI-2
x86, x86_64 $
" Itanium. ! & Intel C/C++/F77/F90
" 8.1 +, & ,
GNU.
# install.sh
, . / + "
$ $&, &
". $
( & , /opt/intel/mpi/ ), " $"
– 122 –
! 2 . M P I
. / + "
python 2.2.
! Intel MPI Library $
", , , . / " 32- $
< _ _intelmpi>/bin/mpivars.sh, bash
zsh < _ _intelmpi>/bin/mpivars.csh,
csh tcsh. 64- $ < _ _intelmpi>/bin/ + < _ _intelmpi>/bin64/. 7 , "
" , + " /etc/profile /
/etc/csh.cshrc . Linux
/etc/profile.d, ,
& bash tcsh . « » /etc/profile /etc/csh.cshrc, ;
+ , . ,
, & $"
/etc/profile.d.
0$
mpicc/mpiCC/mpif77/mpif90. /
" $HOME/.mpd.conf, -
$ (0600). , "
'secretword=<mpd_secret_word>',
mpi_secret_word – , " . +
" ! #, " .
" " mpd.hosts ,
" .
! "
mpdallexit, mpdboot -n <Nodes_Number>, Nodes_Number –
, mpd.hosts. /
" rsh ssh. 3
ssh, mpdboot & -r ssh.
– 123 –
"
" mpiexec -n <Nodes_Number> < _ _ >. 3
"- ; & ,
" , mpiexec & -genv I_MPI_DEVICE <device>, device
: rdma ( DAPL), shm ( ), sock (TCP/IP Ethernet), ssm (socket+shm) rdssm
(socket+shm+rdma). 3 ,
".
/ $ Intel MPI Library
( $ http://www.intel.com/go/mpi.
mvapich
, , "
mpich, $ . *
& gen2, &. mvapich
InfiniBand " (
mpich) ch_gen2.
/ & " InfiniBand
vapi. !$
mvapich.make.gcc. ! Intel: mvapich.make.icc mvapich.make.ecc,
Portland Group – mvapich.make.pgi. *
configure, ,
.
! + " make, ,
+ +, make install. .
& mvapich,
. ! ,, ,
" /etc/ld.so.conf ldconfig.
– 124 –
! 2 . M P I
! mpirun ,
. % "
mpirun_rsh. :
mpirun_rsh -np N host1 ... hostN program args...
N – $ , host1 ... hostN – , program args – .
ScaMPI (Scali MPI Connect)
- " Scali (http://www.scali.no)
Ethernet, Myrinet, SCI InfiniBand. !
. !$ & ,
+ $
. - + & + SCI.
IBGOLD/OpenFabrics
! IBGold " Mellanox
. IBGold
,
OpenFabrics. " , " " OFED,
" & " InfiniBand, + "
, open subnet manager $& MPI mvapich. # , .
7 OFED , install.sh
«Build OFED Software RPMs». %
RPMS, -devel,
opensm, . &,
" InfiniBand kernel-ib
" + . ,
, rpm & -replacefiles.
opensm. &
–125 –
(lib*.rpm),
mpich_mlx -devel. %
openibd opensm
, ,
.
– 126 –
! 3.
' High Performance LINPACK
/ , "
High Performance Linpack (HPL),
BLAS. HPL
http://www.netlib.org/benchmark/hpl/hpl.tgz.
BLAS, &
Linux. - ,
,
$ Intel 80386. ,
BLAS, &:
∙Atlas (http://www.netlib.org/atlas/),
∙GotoBLAS
(http://www.tacc.utexas.edu/resources/software/#blas),
∙Intel MKL
(http://www3.intel.com/cd/software/products/asmona/eng/perflib/).
# BLAS ( & BLAS),
" HPL. ! " " ,
" setup & " " Make.<ARCH>. ! " Make.MyArch, MyArch –
. , Lin_Xeon. . " , ", BLAS .
" ARCH
. , 8
mpicc mpif77. ! MPinc MPlib
.
– 127 –
. make arch=MyArch (MyArch –
" ). 3 $ + +,
" bin/MyArch
" xhpl. " , " bin/HPL.dat
" $" .
/ "
, . ! HPL.dat " " TUNING.
6 – ,
$, , 11-12 – ,
$ $ .
! " HPL.dat ( ):
01: HPLinpack benchmark input file
02: Innovative Computing Laboratory, University of Tennessee
03: |
HPL.out |
output file name (if any) |
|
|
|
04: |
6 |
device out (6=stdout,7=stderr,file) |
|
|
|
05: |
2 |
# of problems sizes (N) |
|
|
|
06: |
25000 30000 |
Ns |
|
|
|
07: |
3 |
# of NBs |
|
|
|
08: |
200 224 250 |
NBs |
|
|
|
09: |
0 |
PMAP process mapping (0=Row-,1=Column-major) |
|
|
|
10: |
3 |
# of process grids (P x Q) |
|
|
|
11: |
5 6 3 |
Ps |
|
|
|
12: |
6 5 10 |
Qs |
|
|
|
13: |
16.0 |
threshold |
|
|
|
14: |
1 |
# of panel fact |
|
|
|
15: |
1 |
PFACTs (0=left, 1=Crout, 2=Right) |
|
|
|
16: |
1 |
# of recursive stopping criterium |
|
|
|
17: |
4 |
NBMINs (>= 1) |
|
|
|
18: |
1 |
# of panels in recursion |
|
|
|
19: |
2 |
NDIVs |
|
|
|
20: |
1 |
# of recursive panel fact. |
|
|
|
21: |
1 |
RFACTs (0=left, 1=Crout, 2=Right) |
|
|
– 128 – |
! 3 . ' H i g h P e r f o r m a n c e L I N P A C K
22: |
1 |
# of broadcast |
|
|
|
23: |
0 |
BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM) |
|
|
|
24: |
1 |
# of lookahead depth |
|
|
|
25: |
0 |
DEPTHs (>=0) |
|
|
|
26: |
2 |
SWAP (0=bin-exch,1=long,2=mix) |
|
|
|
27: |
64 |
swapping threshold |
|
|
|
28: |
0 |
L1 in (0=transposed,1=no-transposed) form |
|
|
|
29: |
0 |
U in (0=transposed,1=no-transposed) form |
|
|
|
30: |
1 |
Equilibration (0=no,1=yes) |
|
|
|
31: |
8 |
memory alignment in double (> 0) |
& $ 25000 25000 30000 30000 , ( 05 06), 200 200, 224 224 250 250 ( 07 08). *$ 30 $
: 5 6, 6 5 3 10 ( 10-12).
, .
! " HPL.dat
HPL, "
mpirun -np N ./xhpl
7 $ N +
& Ps Qs ( 11-12).
$ $
.
– 129 –
! 4.
( Cleo
Cleo
$ , .
, , ,
$& ". !
, &,
.
",
" MPI: MPICH, MPICH-gm, LAM, ScaMPI, MVAPICH .
" $ $ .
, "
4 $ . "
$ .
Cleo perl,
.
Cleo (
), & , - ,
, ,
& " TCP/IP "
.
" " ( cleo-client), "
" Cleo. 3 &
– 130 –
! 4 . ( C l e o
, & $ ,
, , .
, &
" . !
"
, . .
" "
. ,
& & . - , & " $
. ' & " :
main
|
|
Long |
|
|
|
short |
|
||
|
|
|
|
|
|
|
|
|
|
p1:1 |
p1:2 |
|
p2:1 |
p2:2 |
p3:1 |
p3:2 |
|
p4:1 |
p4:2 |
|
|
|
|
|
|
|
|
|
|
! " 4
, 2 $ ". # & p1, p2, p3 p4, $ p1:1, p1:2 p1 . .
main & $ . . 4 &
, "
(, , , 4
,
).
main – long, & & & $ p1:1, p1:2, p2:1 p2:2,
short, & & & $ p3:1, p3:2, p4:1 p4:2.
/ , ,
$ $
, , " .
– 131 –