!$+# +(  "%&)+"'*•  !"$(),%&*#('+# • &*#('+#- C.Linux  )*+• 1%'&0,–$21(./3• TA– $23– $#$!$$"23•–

21ECCSE3$21R-CCS3$5/ 1. 1.%OgZgD*2B>"h +i2. PbKc\eNa^D<73. '8;D 1.
4. QdUX BEh #i5. OpenMPCHIcg\ )D 6.  @JA "-D 7. K^Tgc& B (D38.
_`b 1.%BE?kh $i9. 1169!=:69!
10.  1.0D3"&11. ';D 1.
12. YL[bUX hQdUX j\eRQ i13. KMRadgSBEh +i14. OpenACC\eNa]fN15. FBGB,4VQW


•

–  –   !• 0%"2–  PC  ON5Linux!– .3&3ID,'13*0%"2• -/#&4Fire Fox)–  -> +()13$– Proxy: 172.25.50.4: 8080

/+5.03 -1••••••470/+5.03& %') (/+5.03" #“/”("/+5.03)470/+5.03$(/+5.03)-560/+5.03$/home12/ai_other/!*-,60"172/+5.03(/home12/ai_staff/y273s011/KHPC2018! )%/

home12

ai_staffy273s011

ai_other*-,60KHPC2018

%# -2•
  $'%#”/”  
•   %&%#  
• “~/”!'"%# /

home12

ai_staffy273s011

ai_other&

KHPC2018sample.txt

sample.txt
 : /home12/ai_other/<&>/sample.txt : ./sample.txt (%&%#!'"%#(: ~/sample.txt#" -3• .. ( 2) #"• . ( 1) #$#"/

home12

ai_staffy273s011

ai_other$KHPC2018

readme.txt

sample.txt

 readme.txt#$#" <$>!(relative path): ../../ai_staff/y273s011/KHPC2018/readme.txtcat␣/home12/ai_staff/y273s011/KHPC2018/readme.txt⏎cat␣ ../../ai_staff/y273s011/KHPC2018/readme.txt ⏎ 

:2C6;AE=13B  -1Linux'7?D<"5CD;:2C6;A'0/ls⏎Linux'7?D<(4>8@D-0#/,'/ls'%4>8@D-a<9;=13B%$,-l=13B' 0!*.-F

=13B:2C6;A%$&0!/ls␣-F⏎ls␣-lF⏎ ( '4>8@D0)#+! ) etc

" $! -2pwd⏎– "#" 

cd ␣" ⏎– cd␣/home12/ai_staff/y273s011/KHPC2018– %"  &cd⏎ /home12

ai_staffy273s011

ai_other#

KHPC2018sample.txt

readme.txt

!#  -3mkdir␣!⏎ !  $!khpc2018%mkdir␣khpc2018 ls␣–F⏎/

home12

ai_staffy273s011

ai_other"!

KHPC2018sample.txtkhpc2018

readme.txt

!+")-$* -4cp␣% (,␣1␣2⏎– 1/$*02 !+")#.1/home12

ai_staffai_othery273s011

KHPC2018

readme.txt20180806

,"

hello.cManual.pdf

khpc2018–!+")&.'!+")#..

– cp␣-r␣/home12/ai_staff/y273s011/KHPC2018/20180806␣./khpc2018/– “-r”!+")#. % (,1 " -5• mv– #– :mv␣./khpc2018/20180806/Manual.pdf␣./⏎–  !  Manual.pdf #/home12• rm

ai_other!–   ! khpc201820180806

Manual.pdf

 hello.cManual.pdf

 -r

=6E:>CH@47D -6• “*” F7D?8I?
– .1 3– J8EG>=6E:>C-a.out, bonjour.out, hello.c, bonjour.c,hola.c" 1,'1
• ls␣*.c⏎+hello.c, bonjour.c, hola.c"%21• ls ␣*.out⏎+a.out, bonjour.out"%21• ls ␣hello.*⏎+hello.c, hello.out"%21• man– ;BG?.3 man ␣ cp⏎ (cp.!)'1,#/q(5D@4A<>.q)3'• (.–  9I ”↑” ”↓”+&);BG?."21– “Tab”9I+;BG?0@47D 3&*$21





Host  rokko1[172.25.61.11]rokko2[172.25.61.11]



SystemCPU/Accelerator

MemorySGI StandardDepth ServerC1110-GP2

Intel XeonE5-2667v33.2GHz(8coresx2)

128GB

SGI StandardDepth ServerIntel Xeon E52650v3 2.3GHz(10cores x2)

128GB "

r03n01~r03n28,r04n01~r04n24

  

r03p01~r03p08

Xeon Phi 5110P(1.053GHz 60cores/240threads)

8GB


!  "

r04g01~r04g08

NVIDIA TeslaK40m (754MHz12GB192cores x15)



kofuji1kofuji2

SGI UV3000

Intel Xeon E54627v3 2.6GHz(10coresx8)

2TB (256GB x8)

:@B5-B62C7(rokko)%#@0+B• ).,B5“guestD2 E” !&F
G guest01, guest31, ...
• @0+B83AC6$).,B5 F•)6?3IP: 172.25.51.93, Port: 50001 => rokko1 D EIP: 172.25.51.93, Port: 50002 => rokko2 D E•DG2Essh␣-Y␣guest02@172.25.51.93␣-p␣50002• :(+>'2C7#;C<4*?/5="19CFscp␣-P␣50002␣./hello.c␣guest02@172.25.51.93:~/

&$"'• module!'– Module &()'&(module␣load␣intel / $module␣unload␣intel– module␣list–  module module␣avail• module
!#%_rev2.0(UserMaual.pdf)
13

$"!%

1. “.module”#> gedit␣.modulesource␣/etc/profile.d/modules.shmodule␣load␣intel

2. “~/.bashrc” 1'> gedit␣.bashrc.␣~/.module3.

 “bash”. "& OK.

*30,4 • 4'05+&.2376– Intelicc␣-O3␣hello.c␣-o␣hello.out* /4

(2•  PBS!/)  "$-75+&.2156– 4#0$)!/)qsub␣-I– !/)"1*%qsub␣<>PBS)94(*.7• 2-,*&;50gedit␣single_run.sh#!/bin/bash#PBS␣-q␣S>%8?#PBS␣-I␣select=1:ncpus=1:mem=1gb>;+?*#PBS␣-N␣single_job> )94 #PBS␣-j␣oe>$:?!source␣/etc/profile.d/modules.sh >module!  module␣load␣intel>Intel'=3#: cd␣${PBS_O_WORKDIR}>/"<&0;dplace␣./hello.out>dplace'6=1• )94qsub␣single_run.shPBS•  

PBS"• cat␣single_job.o<ID>•  " % !#&qstat• " $#% !#&qdel␣<ID>

PBS-95 ,.07• &>/:)0%5(8?
– qsub␣-I␣-q␣T ):./4?3=*&>B“-q”"(8?(S or T) B– Job ID!  #"BqstatB–  1%<)2;dplace␣./a.out– exit +6>3B@4?3 =*$'2BAexit=*$'2!!

0• hello.c&# "'1. qsub -I -q T2. cd  %$3. icc hello.c -o hello.out4. ./hello.out 
•$!

,"• @8JK?6BJ(von Neumann architecture)







CPUMN

1.  MDEGNO1,5>H;#4.(O2. *=L<%*.+ + &32P3. - $0,  +/')&32P4. -OAI:FC97J<+/1!+&32P

+
• 6AGCE2=3EKJ*%8G;FFFFFFF

FFFFFFF

LJ<75H+,'IMJ?@C•  • 
•  • :/=E?@CK L 9G4 M
0123;D2B>10E4 −P4N O 9G4 9G4 9G456789 ....

(-+.( !"# $)10E4.'&-J 
•   SMPCoreCoreCoreCoreCache

Cache

Cache

Cache

MemorySMP Cluster

Node

MemoryMemoryMemoryMemoryInterconnetc / Network

Memory• FFF6&+/@E;=9.
3 ++'4– @E;:• %5*H@E;:I#(5)5/ABC6'4• @E;:.>G<# – :D=?• %5*H:D=?I0ABC6,$4H/:D=?, 6,$4I•:D=?0/:D=?"2078;:,$-! / 1,$4( l 684 l *"&#+(2.30(l 684 (/-71)5,71( ((for(i=0;i<IMAX;i++)for(j=0;j<IMAX;j++)for(k=0;k<IMAX;k++)c[i][j]+=a[i][k]*b[k][j];2$(684'$!%for(i=0;i<IMAX;i++)for(j=0;j<IMAX;j+=8)
for(k=0;k<IMAX;k++){c[i][j]+=a[i][k]*b[k][j];c[i][j+1]+=a[i][k]*b[k][j+1];c[i][j+2]+=a[i][k]*b[k][j+2];c[i][j+3]+=a[i][k]*b[k][j+3];c[i][j+4]+=a[i][k]*b[k][j+4];c[i][j+5]+=a[i][k]*b[k][j+5];c[i][j+6]+=a[i][k]*b[k][j+6];c[i][j+7]+=a[i][k]*b[k][j+7];}#l  #l ,-+
 $#'(*) %!" & %/for(i=0;i<IMAX;i++)for(j=0;j<IMAX;j+=8)
for(k=0;k<IMAX;k++){c[i][j]+=a[i][k]*b[k][j];c[i][j+1]+=a[i][k]*b[k][j+1];c[i][j+2]+=a[i][k]*b[k][j+2];c[i][j+3]+=a[i][k]*b[k][j+3];c[i][j+4]+=a[i][k]*b[k][j+4];c[i][j+5]+=a[i][k]*b[k][j+5];c[i][j+6]+=a[i][k]*b[k][j+6];c[i][j+7]+=a[i][k]*b[k][j+7];}a[i][k]$"'(*)

.

&

for(i=0;i<IMAX;i++)for(j=0;j<IMAX;j+=8)
for(k=0;k<IMAX;k++){t=a[i][k];c[i][j]+=t*b[k][j];c[i][j+1]+=t*b[k][j+1];c[i][j+2]+=t*b[k][j+2];c[i][j+3]+=t*b[k][j+3];c[i][j+4]+=t*b[k][j+4];c[i][j+5]+=t*b[k][j+5];c[i][j+6]+=t*b[k][j+6];c[i][j+7]+=t*b[k][j+7];}1 (ex01.c)• 8:6 "=8:6 (2=4=8,+&' 0$->• 8:6 (8"% +=!.+  0/ )( */$->39518264790”-O0”;"<)"'39518#/>

'"
• /:51;89<– 6>4.032'!-#+B

CPUCORE

6>46>4/:51;CA"
 6>4 6>4 6>4 6>4?89<@C 6>4 6>4A1.7=2!

%),$6>4 -89<&/:51;%(*&*#+B)1.  &–)"/830951"2 A[I][J]0

A[i][j]*167:% !×#$%& + ( )4;2.
1

J'!=

23....... J - 4 J - 3 J - 2 J - 1

J + 1 J + 2 J + 3 ....... 2J-4 2J-3 2J-2 J2-1....

....
[i][j]

A[i][j])4;2"

'<$))4;2.+&,/8309( #-=Fortran%*A(i,j)*(×)$%& + !)('-)%!!



2.

0J 123....... J - 4 J - 3 J - 2 J - 1J + 1 J + 2 J + 3 ....... 2J-4 2J-3 2J-2 J2-1....

....

2• 2$# 5:/6;* ><+:2(8$)4-7:% “-O0”' =a. " $ex02a.c' $+;1#&>b. ",3390*$>ex02b.c!offset$,(.'  &>3• =291'/.>
 ex01.c#k!":<2b[k][j]! )6/,75-$@ex03.c#b[k][j]!$ ?)6/,75-% $@ ex01.c ex03.c% !3;.
4<*@

+;0&:(2,8;%”-O0”=:$@> +;0&