version 1.2, 2003/12/11 06:00:41 |
version 1.9, 2003/12/12 08:34:10 |
|
|
% $OpenXM: OpenXM/doc/Papers/rims-2003-12-16-ja-ohp.tex,v 1.1 2003/12/11 05:43:37 takayama Exp $ |
% $OpenXM: OpenXM/doc/Papers/rims-2003-12-16-ja-ohp.tex,v 1.8 2003/12/12 06:07:02 noro Exp $ |
%% xdvi -paper a4r rims-2003-12-16-ja-ohp |
%% xdvi -paper a4r rims-2003-12-16-ja-ohp |
%% dvips -f -t landscape rims-2003-12-16-ja-ohp| psnup -8 -r | lpr -Pxerox6 |
%% dvips -f -t landscape rims-2003-12-16-ja-ohp| psnup -8 -r | lpr -Pxerox6 |
|
%% dvipdfm -l rims-2003-12-16-ja-ohp |
\documentclass{slides} |
\documentclass{slides} |
\usepackage{color} |
\usepackage{color} |
\usepackage{rgb} |
\usepackage{rgb} |
Line 121 Visualization by JavaView and Povray. |
|
Line 122 Visualization by JavaView and Povray. |
|
$BE@(B $(1,0,0)$, $(1,1,0)$, $(1,0,1)$, $(1,1,1)$ $B>e$N(B cone $B$N(B facet $B$r5a$a$h(B. \\ |
$BE@(B $(1,0,0)$, $(1,1,0)$, $(1,0,1)$, $(1,1,1)$ $B>e$N(B cone $B$N(B facet $B$r5a$a$h(B. \\ |
{\tt polymake} $B$G$O$D$.$h$&$JF~NO%U%!%$%k(B {\tt square.poly} $B$r$^$::n@.$9$k(B. |
{\tt polymake} $B$G$O$D$.$h$&$JF~NO%U%!%$%k(B {\tt square.poly} $B$r$^$::n@.$9$k(B. |
|
|
{\footnotesize \color{blue} \begin{verbatim} |
\begin{minipage}{10cm} |
POINTS |
{\footnotesize \color{blue} |
1 0 0 |
\begin{verbatim} |
1 1 0 |
POINTS |
1 0 1 |
1 0 0 |
1 1 1 |
1 1 0 |
\end{verbatim} } |
1 0 1 |
|
1 1 1 |
|
\end{verbatim} |
|
} |
|
\end{minipage} |
|
\epsfxsize=8cm |
|
\epsffile{rims-2003-12-16-sq.eps} |
|
|
{\color{red} \verb@ polymake square.poly FACETS @ } \\ |
{\color{red} \verb@ polymake square.poly FACETS @ } \\ |
$B7k2L(B: |
$B7k2L(B: |
Line 248 Saito, Mutsumi; Parameter shift in normal generalized |
|
Line 255 Saito, Mutsumi; Parameter shift in normal generalized |
|
|
|
\newpage |
\newpage |
|
|
|
\begin{minipage}{13cm} |
{\footnotesize |
{\footnotesize |
\begin{verbatim} |
\begin{verbatim} |
[1163]:= load("oxshell.rr"); |
[1163]:= load("oxshell.rr"); |
Line 278 def b(A,Idx,V) { |
|
Line 286 def b(A,Idx,V) { |
|
} |
} |
\end{verbatim} |
\end{verbatim} |
} |
} |
|
\end{minipage} |
|
\epsfxsize=12cm |
|
\epsffile{rims-2003-12-16-sq2.eps} |
|
|
|
|
\rightline{$B3+H/(B: $B9b;3(B} |
\rightline{$B3+H/(B: $B9b;3(B} |
\newpage |
\newpage |
|
|
|
|
|
|
\noindent |
\noindent |
\pagetitle{4. {\color{blue} OX-RFC 102 --- $BK\3JE*$J%5!<%P4VDL?.$rMQ$$$?J,;67W;;(B}} |
\pagetitle{4. {\color{blue} OX-RFC 102 --- $BK\3JE*$J%5!<%P4VDL?.$rMQ$$$?J,;67W;;(B}} |
|
\parskip 5pt |
|
|
|
OX-RFC-100, 101 : master-server $B4VDL?.$rMQ$$$?J,;67W;;(B |
|
|
\rightline{$B3+H/(B: $BLnO$(B} |
OX-RFC-102 : server-server $B4VDL?.(B |
|
|
|
\underline{$BL\I8(B} : $BK\3JE*J,;6JBNs7W;;$r2DG=$K$9$k$3$H(B |
|
|
|
\underline{$B1~MQNc(B} |
|
\begin{itemize} |
|
\item broadcast $B$r8zN(2=$9$k(B |
|
|
|
N $B8D$N(B server $B$X$N(B broadcast $B$,(B $O(\log_2 N)$ $B$G$G$-$k(B |
|
|
|
\item LU $BJ,2r$NJ,;6JBNs7W;;(B |
|
|
|
ScaLAPACK $BIw$K(B, $B9TNs$rJ,;6J];}$7$FJBNs7W;;(B |
|
\end{itemize} |
|
|
|
\underline{$B;EMM(B} |
|
|
|
MPI-2 $B$N(B, $BF0E*%W%m%;%9@8@.(B, $B%W%m%;%9%0%k!<%W4V(B broadcast $B$N;EMM$r(B |
|
$B;29M$K$9$k(B |
\newpage |
\newpage |
|
|
|
\noindent |
|
\pagetitle{server $B$N5/F0(B, server $B4VDL?.O)$N3+@_(B} |
|
|
|
server $B$O(B OX RFC-100, 101 $B$K$h$j5/F0$9$k(B. $B$3$NDL?.O)$K0J2<$N(B SM |
|
$B%3%^%s%I$rAw$k(B. |
|
|
|
\begin{itemize} |
|
\item {\tt SM\_set\_rank\_102} $nserver$ $rank$ |
|
|
|
server $B$K(B, $B%0%k!<%WFb$N(B server $B$NAm?t(B $nserver$ $B$H(B, $B$=$NCf$G$N(B |
|
$B<1JL;R(B $rank$ ($0 \le rank \le nserver$) $B$rDLCN$9$k(B. |
|
|
|
\item {\tt SM\_tcp\_accept\_102} $port$ $peer$ |
|
|
|
$B%]!<%HHV9f(B $port$ $B$N(B TCP $B%]!<%H$G(B, bind, listen, accept $B$r<B9T(B |
|
$B$7$F(B connect $B$rBT$D(B. $BDL?.$,@.N)$7$?$i(B, byte order negotiation |
|
$B$r9T$$(B, $BAj<j@h%F!<%V%k$KEPO?$9$k(B. |
|
|
|
\item {\tt SM\_tcp\_connect\_102} $peerhost$ $port$ $peer$ |
|
|
|
$B%[%9%H(B $peerhost$ $B$N%]!<%HHV9f(B $port$ $B$N(B TCP $B%]!<%H$K(B connect $B$9$k(B. |
|
$BDL?.$,@.N)$7$?$i(B, byte order negotiation $B$r9T$$(B, $BAj<j@h%F!<%V%k$KEPO?(B |
|
$B$9$k(B. |
|
|
|
\end{itemize} |
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{server $B4VDL?.(B, broadcast, reduction} |
|
|
|
server $B4VDL?.$O(B, $BAj8_$N?.Mj$K4p$E$-9T$&(B --- $BAw$j<j$,Aw?.$7$?$i(B, $B<u$1<j$O(B |
|
$B$A$c$s$H<u?.F0:n$KF~$k$3$H(B |
|
|
|
$B%G!<%?$O(B OX $B%?%0IU$-$G(B --- {\tt OX\_SYNC\_BALL} $B$K$h$kDL?.O)%j%;%C%H$KI,MW(B |
|
|
|
$B0J2<$N(B SM $B%3%^%s%I$O(B collective $BA`:n$G$"$k(B. $B$9$J$o$A(B, $BF10l0z?t$G(B |
|
$B%0%k!<%WFb$NA4$F$N(B server $B$G<B9T$5$l$J$1$l$P$$$1$J$$(B. |
|
|
|
\begin{itemize} |
|
\item {\tt SM\_bcast\_102} $root$ |
|
|
|
$B<1JL;R(B $root$ $B$N(B server $B$N%9%?%C%/>e$N%G!<%?$r(B pop $B$7(B, $B%0%k!<%WFb$K(B |
|
broadcast $B$9$k(B. $B3F(B server $B$N%9%?%C%/$K(B broadcast $B$5$l$?%G!<%?$,(B push |
|
$B$5$l$k(B. |
|
|
|
\item {\tt SM\_reduce\_102} $root$ $opname$ |
|
|
|
$B3F(B server $B$N%9%?%C%/>e$N%G!<%?$,(B pop $B$5$l(B, $opname$ $B$G;XDj$5$l$k(B |
|
$BFs9`1i;;(B($B7k9gB'$,I,MW(B) $B$r=g$K9T$$(B, $B7k2L$r(B $root$ $B$G;XDj$5$l$k(B server |
|
$B$N%9%?%C%/$K(B push $B$9$k(B. $BB>$N(B server $B$K$O(B $0$ $B$,(B push |
|
$B$5$l$k(B. |
|
\end{itemize} |
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{broadcast $B$N<jB3$-(B} |
|
|
|
{SM\_bcast\_102} $B$N<B9T(B |
|
|
|
$root=0$ $B$G(B, $B<1JL;R$,(B $b2^k$ ($b$ $B$O4q?t(B) $B$N(B server $B$NF0:n(B |
|
|
|
\vskip\baselineskip |
|
\begin{tabbing} |
|
$data \leftarrow$ $B<1JL;R$,(B $(b-1)2^k$ $B$N(B server $B$+$i$N%G!<%?(B\\ |
|
for \= $i=k-1$ down to $0$\\ |
|
\> $B<1JL;R$,(B $b2^k+2^i$ $B$N(B server $B$K(B $data$ $B$rAw?.(B\\ |
|
end for |
|
\end{tabbing} |
|
\vskip\baselineskip |
|
2 $B$G3d$j@Z$l$k2s?t$,B?$$<1JL;R$r;}$D(B server $B$,@h$K%G!<%?Aw?.(B |
|
|
|
$\Rightarrow$ $B%G%C%I%m%C%/$K$J$i$J$$(B |
|
|
|
$BFHN)$J%Z%"$I$&$7$NDL?.$,F1;~$K9T$($k$J$i!"9b!9(B $\lceil \log_2 N\rceil$ $B%9%F%C%W(B |
|
($N$ $B$O(B server $B$NAm?t(B) $B$G(B broadcast $B40N;(B. |
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{reduction $B$N<jB3$-(B} |
|
|
|
{SM\_reduce\_102} $B$N<B9T(B |
|
|
|
server $B?t(B $N$, $root=0$ $B$G(B, $B<1JL;R$,(B $b$ $B$N(B server $B$NF0:n(B |
|
|
|
$B<j;}$A$N%G!<%?$r(B $data$ $B$H$9$k(B |
|
|
|
\vskip\baselineskip |
|
\begin{tabbing} |
|
for \= $i=0$ to $\lfloor \log_2 N \rfloor$\\ |
|
\> if \= ( $b$ $B$K(B $2^i$ $B$N(B bit $B$,$"$k(B) then\\ |
|
\> \> $B<1JL;R(B $b-2^i$ $B$N(B server $B$K(B $data$ $B$rAw?.$7$F=*N;(B\\ |
|
\> else if ( $b+2^i < N$ ) then \\ |
|
\> \> $data_0 \leftarrow$ $B<1JL;R(B $b+2^i$ $B$N(B server $B$+$i$N%G!<%?(B\\ |
|
\> \> $data \leftarrow data$ $B$H(B $data_0$ $B$NFs9`1i;;7k2L(B \\ |
|
\> end if\\ |
|
end for |
|
\end{tabbing} |
|
\vskip\baselineskip |
|
|
|
$B$3$N>l9g$b(B, $BFHN)$J%Z%"$I$&$7$NDL?.$,F1;~$K9T$($k$J$i!"9b!9(B $\lceil \log_2 N\rceil$ $B%9%F%C%W(B |
|
($N$ $B$O(B server $B$NAm?t(B) $B$G(B reduction $B40N;(B. $B7k2L$O(B root $B$K;D$k(B. |
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{broadcast $B;~$N%G!<%?$NN.$l(B} |
|
|
|
|
|
$N=16$, $root=0$ $B$N>l9g(B |
|
|
|
\begin{center} |
|
\begin{tabular}{|c|c|c|c|} |
|
step 1 & step 2 & step 3 & step 4 \\ \hline |
|
$0\rightarrow 8$&$0\rightarrow 4$ &$0\rightarrow 2$ &$0\rightarrow 1$ \\ |
|
&$8\rightarrow 12$&$8\rightarrow 10$ &$8\rightarrow 9$ \\ |
|
& &$4\rightarrow 6$ &$4\rightarrow 5$ \\ |
|
& &$12\rightarrow 14$&$12\rightarrow 13$ \\ |
|
& & &$2\rightarrow 3$ \\ |
|
& & &$10\rightarrow 11$ \\ |
|
& & &$6\rightarrow 7$ \\ |
|
& & &$14\rightarrow 15$ |
|
\end{tabular} |
|
\end{center} |
|
|
|
reduction $B$N>l9g(B, $B%G!<%?$NN.$l$O5U$K$J$k(B (step 4 $\rightarrow$ step 1, |
|
$BLp0u$,5U(B) |
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{$B%(%i!<=hM}(B} |
|
|
|
master-server $B4VDL?.O)$O(B, OX RFC-100 $B$G5,Dj$5$l$F$$$k(B. |
|
|
|
server-server $B4VDL?.O)$r6u$K$9$k$?$a$N(B, $B<1JL;R(B $i$ $B$N(B server $B$G$NA`:n(B |
|
|
|
\begin{tabbing} |
|
for \= $j = 0$ \= to $i-1$ do\\ |
|
\> do\\ |
|
\> \>$data$ $\leftarrow$ $B<1JL;R(B $j$ $B$N(B server $B$+$i$N(B OX $B%G!<%?(B\\ |
|
\> while $data \neq$ {\tt OX\_SYNC\_BALL}\\ |
|
end for\\ |
|
for $j = i+1$ to $nserver-1$ do\\ |
|
\> {\tt OX\_SYNC\_BALL} $B$r(B $B<1JL;R(B $j$ $B$N(B server $B$KAw?.(B\\ |
|
end for |
|
\end{tabbing} |
|
|
|
master-server $B%j%;%C%H8e(B : $B3F(B server $B$O%3%^%s%IBT$A>uBV(B |
|
|
|
$\Rightarrow$ $B<!$N(B SM $B%3%^%s%I$r3F(B server $B$KAw?.$9$l$P$h$$(B |
|
|
|
\begin{itemize} |
|
\item {\tt SM\_reset\_102} ($B0z?t$J$7(B, collective) |
|
\end{itemize} |
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{Asir (master) $B>e$G$N(B API} |
|
|
|
\begin{itemize} |
|
\item {\tt ox\_set\_rank\_102($Server$,$Nserver$,$Rank$)} |
|
|
|
$Server$ $B$K(B {\tt SM\_set\_rank\_102} $B$rAw$k(B. |
|
|
|
\item {\tt ox\_tcp\_accept\_102($Server$,$Port$,$Rank$)} |
|
|
|
$Server$ $B$K(B {\tt SM\_tcp\_accept\_102} $B$rAw$k(B. |
|
|
|
\item {\tt ox\_tcp\_connect\_102($Server$,$Host$,$Port$,$Rank$)} |
|
|
|
$Server$ $B$K(B {\tt SM\_tcp\_connect\_102} $B$rAw$k(B. |
|
|
|
\item {\tt ox\_reset\_102($Server$)} (collective) |
|
|
|
$Server$ $B$K(B {\tt SM\_reset\_102} $B$rAw$k(B |
|
|
|
\end{itemize} |
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{Asir (server) $B>e$G$N(B API} |
|
|
|
\begin{itemize} |
|
\item {\tt ox\_send\_102($Rank$,$Data$)} |
|
|
|
$B<1JL;R(B $Rank$ $B$N(B server $B$K(B $Data$ $B$r(B OX $B%G!<%?$H$7$FAw?.$9$k(B. |
|
$B<1JL;R(B $Rank$ $B$N(B server $B$OBP1~$9$k<u?.$r3+;O$7$J$1$l$P$J$i$J$$(B. |
|
|
|
\item {\tt ox\_recv\_102($Rank$)} |
|
|
|
$B<1JL;R(B $Rank$ $B$N(B server $B$+$i(B OX $B%G!<%?$r<u?.$9$k(B. |
|
$B<1JL;R(B $Rank$ $B$N(B server $B$OBP1~$9$kAw?.$r3+;O$7$J$1$l$P$J$i$J$$(B. |
|
|
|
\item {\tt ox\_bcast\_102($Root$[,$Data$])} (collective) |
|
|
|
$B<1JL;R(B $Root$ $B$N(B server $B$r(B root $B$H$7$F(B, $B%0%k!<%WFb$G(B broadcast $B$9$k(B. |
|
$Data$ $B$,;XDj$5$l$?>l9g(B, $B%9%?%C%/$K%W%C%7%e$5$l$k(B. |
|
$B<1JL;R$,(B $Root$ $B$KEy$7$$(B server $B$G(B, $B%9%?%C%/(B |
|
$B$+$i%G!<%?$,%]%C%W$5$l(B, $B$=$N%G!<%?$,(B, $B3F8F$S=P$7$NLa$jCM$H$J$k(B. |
|
|
|
\item {\tt ox\_reduce\_102($Root$,$Operation$[,$Data$])} (collective) |
|
|
|
$B%0%k!<%WFb$N3F(B server $B$N%9%?%C%/$+$i%]%C%W$7$?%G!<%?$KBP$7(B |
|
$Operation$ $B$G;XDj$5$l$kFs9`1i;;$r9T$$(B, |
|
$B7k2L$r(B $Root$ $B$G;XDj$5$l$k(B server $B$G$N4X?t8F$S=P$7$NLa$jCM$H$7$F(B |
|
$BJV$9(B. |
|
$Data$ $B$,;XDj$5$l$?>l9g(B, $B%9%?%C%/$K%W%C%7%e$7$F$+$i>e5-$NA`:n$r(B |
|
$B<B9T$9$k(B. $Root$ $B0J30$N(B server $B$G$NLa$jCM$O(B 0 $B$G$"$k(B. |
|
\end{itemize} |
|
|
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{$B<B9TNc(B : $B0lJQ?tB?9`<0$N@Q(B (master $BB&(B)} |
|
|
|
\begin{verbatim} |
|
def d_mul(F1,F2) |
|
{ |
|
Procs = getopt(proc); |
|
/* process $B;XDj$,$J$$>l9g$K$O(B, $B<+J,$G7W;;(B */ |
|
if ( type(Procs) == -1 ) return umul(F1,F2); |
|
if ( !var(F1) || !var(F2) ) return F1*F2; |
|
NP = length(Procs); |
|
/* $B0z?t$r(B server 0 $B$KAw$k(B */ |
|
ox_push_cmo(0,[F1,F2]); |
|
/* $B3F(B server $B$K(B, server 0 $B$r(B root $B$H$7$F;E;v$r;O$a$k$h$&0MMj(B */ |
|
for ( I = 0; I < NP; I++ ) |
|
ox_cmo_rpc(I,"d_mul_main",0); |
|
/* server 0 $B$+$i7k2L$r<u$1<h$k(B */ |
|
R = ox_pop_cmo(0); |
|
return R; |
|
} |
|
\end{verbatim} |
|
|
|
\newpage |
|
|
|
\noindent |
|
\pagetitle{$B<B9TNc(B : $B0lJQ?tB?9`<0$N@Q(B (server $BB&(B; collective)} |
|
\begin{verbatim} |
|
def d_mul_main(Root) |
|
{ |
|
/* server $B$NAm?t(B, $B<+J,$N(B id $B$rCN$k(B */ |
|
Id = ox_get_rank_102(); NP = Id[0]; Rank = Id[1]; |
|
/* Root $B$K$"$k0z?t$r(B broadcast $B$G6&M-(B */ |
|
Arg = ox_bcast_102(Root); F1 = Arg[0]; F2 = Arg[1]; |
|
L = setup_modarrays(F1,F2,NP); |
|
Marray = L[0]; MIarray = L[1]; M = L[2]; |
|
R = umul_chrem(F1,F2,MIarray[Rank],Marray[Rank],M); |
|
Arg = 0; F1 = 0; F2 = 0; |
|
/* $B3F(B server $B$N7k2L$rB-$79g$o$;$F(B, Root $B$KCV$/(B */ |
|
R = ox_reduce_102(Root,"+",R); |
|
/* Root $B$N$_(B, $B7k2L$r(B normalize $B$9$k(B */ |
|
if ( Rank == Root ) |
|
R = uadj_coef(R%M,M,ishift(M,1)); |
|
return R; |
|
} |
|
\end{verbatim} |
|
|
|
\rightline{$B3+H/(B: $BLnO$(B} |
|
|
\end{document} |
\end{document} |
|
|
%%$Id$ at misc-2003/12/RIMS |
|
|
|
|
%%$Id$ at misc-2003/12/RIMS |