[BACK]Return to OX-RFC-102.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Annotation of OpenXM/doc/OpenXM-specs/OX-RFC-102.tex, Revision 1.5

1.1       noro        1: \documentclass[12pt]{jarticle}
                      2: \IfFileExists{my.sty}{\usepackage{my}}{}
                      3: \IfFileExists{graphicx.sty}{\usepackage{graphicx}}{}
                      4: \IfFileExists{epsfig.sty}{\usepackage{epsfig}}{}
                      5: \title{OpenXM-RFC102 (Draft)}
                      6: \author{$BLnO$(B $B@59T(B \\ ($B?@8MBgM}(B)}
                      7: \date{}
                      8: \begin{document}
                      9: \maketitle
                     10: \def\gr{Gr\"obner $B4pDl(B}
                     11: \def\st{\, s.t. \,}
                     12: \def\noi{\noindent}
                     13: \def\ve{\vfill\eject}
                     14:
                     15: \section{server $B4VDL?.$NF3F~(B}
                     16:
                     17: OpenXM-RFC-100, OpenXM-RFC-101 ($B0J2<(B RFC-100,RFC-101) $B$G$O(B, $B7W;;$O(B
                     18: client (master) $B$H(B server $B4V$N(B RPC (remote procedure call) $B$H$7$F9T$o$l$k(B.
                     19: $B$3$N7ABV$G9T$&$3$H$,$G$-$kJ,;6JBNs7W;;$H$7$F$O(B
                     20:
                     21: \begin{itemize}
                     22: \item master $B$,;E;v$rJ,3d$7$F!"3F(B server $B$K0MMj$9$k(B.
                     23: \item $B0l$D$N7W;;$K$$$/$D$+J}K!$,$"$k>l9g$K(B, $B$=$l$>$l$NJ}K!$r(B
                     24: $BJL!9$N(B server $B$K0MMj$9$k(B.
                     25: \end{itemize}
                     26:
                     27: $B$J$I$,9M$($i$l(B, $B<B:]$KM-8z$G$"$k$3$H$r<B>Z$7$?(B \cite{OpenXM}.
                     28: $B$7$+$7(B, $B$5$i$KJ#;($JJ,;6JBNs7W;;%"%k%4%j%:%`$G$O(B,
                     29: server $B4V$NDL?.$,I,MW$K$J$k>l9g$,$"$k(B. $B8=>u$N(B RFC-100,101 $B$G$b(B,
                     30: server $B$,(B tree $B>u$K7k9g$7$FJ,;67W;;$r9T$&$3$H$O$G$-$k$,(B,
                     31: $B$3$N>l9g$"$/$^$G0lJ}$,(B client, $BB>J}$,(B server $B$H$7$FF0:n$7$F$$$k(B.
                     32: $BNc$($P(B, ScaLAPACK $B$N$h$&$K(B, $B3F(B process $B$,9TNs$N(B
                     33: $B0lIt$rJ];}$7$F(B, $BF10l$N%W%m%0%i%`$r<B9T$7$J$,$i(B LU $BJ,2r$r$7$F(B
                     34: $B$$$/(B, $B$H$$$C$?JBNs%"%k%4%j%:%`$r<BAu$9$k$N$OFq$7$$(B.
                     35: $B$3$N>l9g(B, pivot $BA*Br$N$?$a$K(B, $BJ#?t(B process $B4V$GJ];}$5$l$F$$$k(B
                     36: $BCM$N:GBgCM$r7hDj$7$?$j(B, $B9T$NF~$l49$($r9T$C$?$j$9$k$?$a$K(B,
                     37: process $B4V$G$N%G!<%?$N$d$j$H$j$,I,MW$H$J$k(B.
                     38:
                     39: $B$5$i$KC1=c$JNc$H$7$F$O(B broadcast $B$,$"$k(B. $BNc$($P(B, $B$"$kB?9`<0=89g(B $G$
                     40: $B$,%0%l%V%J!<4pDl$+$I$&$+%A%'%C%/$9$k$K$O(B, $G$ $B$+$i:n$i$l$kA4$F$N(B S-$BB?9`<0$,(B
                     41: $G$ $B$K$h$j(B 0 $B$K4JLs$5$l$k$3$H$r<($;$P$h$$!#8D!9$N4JLsA`:n$OFHN)$J$N$G(B,
                     42: $BE,Ev$KJ,3d$7$FJBNs7W;;$G$-$k$,(B, $B$^$:(B $G$ $B$r3F(B server $B$KAw$kI,MW$,$"$k(B.
                     43: $B$3$l$O(B, RFC-100 $B$N$b$H$G$O(B master $B$,3F(B server $B$K=g$KAw$k$N$G(B, server $B$N(B
                     44: $B?t(B $N$ $B$KHfNc$7$?<j4V$,$+$+$k$,(B, server $B4VDL?.$,;H$($l$P(B, $\log N$ $B$K(B
                     45: $BHfNc$7$?<j4V$GAw$k$3$H$b$G$-$k(B.
                     46:
                     47: $B$3$l$i$O$4$/8B$i$l$?Nc$G$"$k$,(B, $B=EMW$J$3$H$O(B,
                     48: $B$h$j9bEY$JJ,;6JBNs7W;;$,<B83$G$-$k$h$&$J5!G=$rDs0F$7(B, $B<BAu$9$k$3$H$G$"$k(B.
1.4       noro       49: $B0J2<$G$O(B MPI-2 \cite{MPI2} $B$GDj5A$5$l$?F0E*%W%m%;%9@8@.(B, $B%W%m%;%9%0%k!<%W4V$G$N(B
1.1       noro       50: broadcast $B$N;EMM$r;29M$K(B, OpenXM $B$K$*$1$k(B server $B4VDL?.$K$D$$$F(B
                     51: $B=R$Y$k(B.
                     52:
                     53: \section{server $B$N5/F0$H(B server $B4VDL?.O)$N3+@_(B}
                     54:
                     55: server $B$O(B RFC-100, 101 $B$K$h$j5/F0$5$l$k$H$9$k(B. server $B$O5/F0$5$l$?(B
                     56: $B;~E@$G$O(B master $B$H$NDL?.O)$N$_$r;}$D(B. server-server $B4V$NDL?.O)$O(B,
                     57: master $B$+$i(B SM $B%3%^%s%I$K$h$j3+@_$5$l$k(B. RFC-100, 101 $B$G$O(B,
                     58: master-server $B4V$NDL?.O)$O(B, server $B$,5/F0$7$?;~E@$G$9$G$KB8:_$7$F(B
                     59: $B$$$?$,(B, RFC-102 $B$KBP1~$9$k$?$a$K$O(B server $B$,B>$N%W%m%;%9$N(B
                     60: $BDL?.O)$r3+@_$9$k$?$a$N;EAH$_$r<BAu$7$F$$$kI,MW$,$"$k(B.
                     61:
                     62: \begin{enumerate}
                     63: \item
                     64: \begin{verbatim}
1.3       noro       65: SM_set_rank_102
1.1       noro       66: \end{verbatim}
                     67:
                     68: server $B4V$N(B broadcast $B$O(B, $B$$$/$D$+$N(B server $B$r%0%k!<%W2=$7$F9T$&$N$,(B
                     69: $B<+A3$G$"$k(B. $B4JC1$N$?$a(B, $B3F(B server $B$O(B, $B$?$@0l$D$N%0%k!<%W$KB0$9$k$H$9$k(B.
                     70: master $B$O(B, $B3F(B server $B$K(B, $B$=$N(B server $B$,B0$9$k%0%k!<%W$N%a%s%P!<$NAm?t(B
                     71: $nserver$ $B$H(B, $B$=$N%0%k!<%WFb$G$N<1JL;R(B $rank$ ($0\le rank \le nserver-1$)
                     72: $B$rDLCN$9$k(B.
                     73:
                     74: Request:
                     75: \begin{tabular}{|c|c|}  \hline
1.3       noro       76: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_set\_rank\_102} \\ \hline
1.2       noro       77: {\tt int32 $nserver$} & {\tt int32 $rank$} \\
1.1       noro       78: \hline
                     79: \end{tabular}
                     80:
                     81: Output: none.
                     82:
                     83: \item
                     84: \begin{verbatim}
1.3       noro       85: SM_tcp_accept_102
1.1       noro       86: \end{verbatim}
                     87:
                     88: Request:
                     89: \begin{tabular}{|c|c|}  \hline
1.3       noro       90: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_accept\_102} \\ \hline
1.1       noro       91: {\tt int32 $port$} & {\tt int32 $peer$} \\
                     92: \hline
                     93: \end{tabular}
                     94:
                     95: Stack after the request:
                     96: \begin{tabular}{|c|c|}  \hline
                     97: {\tt int32 OX\_DATA} & {\tt int32 $status$} \\
                     98: \hline
                     99: \end{tabular}
                    100:
                    101: Output: none.
                    102:
1.3       noro      103: $B<!9`$N(B {\tt SM\_tcp\_connect\_102} $B$H%Z%"$G(B, $B4{$KB8:_$7$F$$$k(B 2 $B$D$N(B server
1.1       noro      104: $B$N4V$N(B TCP/IP $B$K$h$kDL?.O)$r3+@_$9$k(B. $port$ $B$O(B, master $B$,(B ($B%i%s%@%`$K(B) $BA*$s$@(B
                    105: TCP $B$N%]!<%HHV9f$G$"$k(B. $B$3$N%j%/%(%9%H$r<u$1<h$k$H(B, server $B$O(B,
                    106: bind, listen, accept $BF0:n$r<B9T$7(B, connect $BBT$A>uBV$KF~$k(B. $B$$$:$l$+$NF0:n(B
                    107: $B$K$*$$$F%(%i!<$r@8$8$?>l9g$K$O(B $status$ $B$H$7$F(B $-1$, $B@.8y$7$?>l9g$K$O(B
                    108: $0$ $B$r%9%?%C%/$KCV$/(B. $peer$ $B$O(B, $BAj<j$N(B server $B$N%0%k!<%WFb$G$N<1JL;R(B
                    109: $B$G$"$k(B.
                    110:
                    111: \item
                    112: \begin{verbatim}
1.3       noro      113: SM_tcp_connect_102
1.1       noro      114: \end{verbatim}
                    115:
                    116: Request:
                    117: \begin{tabular}{|c|c|}  \hline
1.3       noro      118: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_tcp\_connect\_102} \\ \hline
1.1       noro      119: {\tt int32 CMO\_String} & {$hostname$} \\ \hline
                    120: {\tt int32 $port$} & {\tt int32 $peer$} \\
                    121: \hline
                    122: \end{tabular}
                    123:
                    124: Stack after the request:
                    125: \begin{tabular}{|c|c|}  \hline
                    126: {\tt int32 OX\_DATA} & {\tt int32 $status$} \\
                    127: \hline
                    128: \end{tabular}
                    129:
                    130: Output: none.
                    131:
1.3       noro      132: $BA09`$N(B {\tt SM\_tcp\_accept\_102} $B$H%Z%"$G(B, $B4{$KB8:_$7$F$$$k(B 2 $B$D$N(B server
1.1       noro      133: $B$N4V$N(B TCP/IP $B$K$h$kDL?.O)$r3+@_$9$k(B. $host$ $B$OAj<j$N(B server $B$,F0:n$7$F(B
                    134: $B$$$k%[%9%HL>$G$"$k(B. $host$ $B>e(B, $B%]!<%HHV9f(B $port$ $B$G(B accept $B$7$F$$$k(B server $B$KBP$7(B,
                    135: connect $B$9$k(B.
                    136: $B%(%i!<$r@8$8$?>l9g$K$O(B $status$ $B$H$7$F(B $-1$, $B@.8y$7$?>l9g$K$O(B
                    137: $0$ $B$r%9%?%C%/$KCV$/(B. $peer$ $B$O(B, $BAj<j$N(B server $B$N%0%k!<%WFb$G$N<1JL;R$G$"$k(B.
                    138:
                    139: \end{enumerate}
                    140:
1.5     ! noro      141: \section{server $B4V$NDL?.(B, broadcast $B$*$h$S(B reduction}
1.1       noro      142:
                    143: RFC-102 $B2<$G$N%W%m%0%i%_%s%0%9%?%$%k$O(B, $B4pK\E*$K$O(B RFC-100,101 $B$HJQ$o$i$J$$(B.
                    144: $B$9$J$o$A(B, master $B$G$"$k%W%m%0%i%`$,<B9T$5$l(B, $BI,MW$K1~$8$F(B server $B$K(B
                    145: $B;E;v$,0MMj$5$l(B, master $B$O$=$N7k2L$r;H$C$F<+$i$N;E;v$rB39T$9$k(B.
                    146: $B$3$l$K2C$($F(B, RFC-102 $B$G$O(B, server $B$I$&$7$,!V<+N'E*!W$K%G!<%?$NAw<u?.(B
1.2       noro      147: $B$r9T$&$3$H$,$G$-$k(B. $B$3$N$?$a(B, server $B$O(B, server $B4VDL?.O)$K(B OX $B%G!<%?$r(B
                    148: $BAw?.$9$k5!G=(B, $B$^$?!"(Bserver $B4VDL?.O)$+$i(B OX $B%G!<%?$r<u?.$9$k5!G=$r(B
                    149: $BDs6!$7$J$1$l$P$J$i$J$$(B.
1.1       noro      150:
                    151: server $B4VDL?.$rMxMQ$9$k:G$bE57?E*$JNc$H$7$F(B broadcast $B$,$"$k(B.
                    152:
                    153: \begin{enumerate}
                    154: \item $B%0%k!<%WFb(B broadcast
                    155:
                    156: $B%0%k!<%WFb$N(B broadcast $B$O(B, $B$$$o$f$k(B collective operation $B$H$7$F<B9T$5(B
                    157: $B$l$k(B. $B$9$J$o$A(B, $B%0%k!<%WFb$N3F(B server $B$G$=$l$>$lFHN)$K<B9T$5$l$F$$$k%W(B
                    158: $B%m%0%i%`$K$*$$$F(B, $B0l@F$K$"$k4X?t$r8F$S=P$9$3$H$K$h$j(B, $B$=$N4X?t$+$iI|5"(B
                    159: $B$7$?$H$-$K(B, broadcast $B$5$l$?%G!<%?$,JV$5$l$k(B, $B$H$$$&7A$r$H$k(B. $B$3$N>l9g(B
                    160: $B$K%G!<%?$NH/?.85(B (root)$B$N<1JL;R$O3F(B server $B$,$"$i$+$8$aCN$C$F$*$/I,MW$,$"$k(B.
                    161:
                    162: \item master $B$+$i(B server $B%0%k!<%W$X$N(B broadcast
                    163:
                    164: master $B$+$i(B server $B%0%k!<%W$X$N(B broadcast $B$O(B, $B%0%k!<%WFb$N(B
                    165: server $B$,%9%?%C%/%3%^%s%IBT$A>uBV$K9T$&$3$H$,$G$-$k$H$9$k(B.
                    166: $B$3$N>l9g(B, master $B$O$"$k0l$D$N(B server $B$K(B data $B$r(B push $B$9$k(B.
                    167: $B$3$N(B server $B$N<1JL;R$r(B $root$ $B$H$9$k(B.
                    168: $B$=$N8e(B, $B%0%k!<%WFb$NA4(B server $B$K(B, $root$ $B$rH/?.85$H$9$k(B
                    169: broadcast $B$r<B9T$5$;$k$?$a$N%3%^%s%I$rC`<!Aw?.$9$k(B.
                    170: \end{enumerate}
                    171:
                    172: $B0J2<$G$O(B, $B%0%k!<%WFb$G(B broadcast $B$r9T$&<jB3$-$r(B, MPI $B$G$N<BAu$K(B
                    173: $B$7$?$,$C$F@bL@$9$k(B. $B4JC1$N$?$a(B $root$ $B$,(B $0$ $B$G$"$k$H$7$F(B,
                    174: $B<1JL;R$,(B $b2^k$ ($b$ $B$O4q?t(B) $B$G$"$k(B server $B$NF0:n$r@bL@$9$k(B.
                    175:
                    176: \begin{enumerate}
                    177: \item $B<1JL;R$,(B $(b-1)2^k$ $B$G$"$k(B server $B$+$i%G!<%?$r<u?.$9$k(B.
                    178: \item $B<1JL;R$,(B $b2^k+2^i$ $(i=k-1,\ldots,0)$ $B$N(B server $B$K%G!<%?$rAw?.$9$k(B.
                    179: \end{enumerate}
                    180:
                    181: $B$3$NJ}K!$K$h$l$P(B,
                    182: $B2<0L$K$h$jD9$/O"B3$7$F(B 0 $B$,8=$o$l$k<1JL;R$r;}$D(B server $B$[$I(B
                    183: $B@h$K%G!<%?$rAw?.$7;O$a$k$?$a(B, $B%G%C%I%m%C%/$K$O$J$i$J$$(B. $B$^$?(B,
                    184: $BFHN)$J%Z%"$I$&$7$NDL?.$,F1;~$K9T$($k$H$9$l$P(B, $B%0%k!<%WFb$N(B
                    185: server $B$NAm?t$r(B $nserver$ $B$H$9$k$H$-(B, $B9b!9(B $\lceil \log_2 nserver\rceil$
                    186: $B%9%F%C%W8e$K$OA4$F$N(B server $B$K%G!<%?$,9T$-EO$k(B.
                    187:
1.4       noro      188: $B0J2<$K(B, {\tt ox\_asir} $B$K$*$1$k<BAu$r<($9(B.
                    189:
                    190: \begin{verbatim}
1.5     ! noro      191: void ox_bcast_102(int root)
1.4       noro      192: {
                    193:     Obj data;
                    194:     int r,mask,id,src,dst;
                    195:
                    196:     r = myrank_102-root;
1.5     ! noro      197:     if ( r == 0 )
        !           198:         data = (Obj)asir_pop_one();
1.4       noro      199:     if ( r < 0 ) r += nserver_102;
                    200:     for ( mask = 1; mask < nserver_102; mask <<= 1 )
                    201:         if ( r&mask ) {
                    202:             src = myrank_102-mask;
                    203:             if ( src < 0 ) src += nserver_102;
                    204:             ox_recv_102(src,&id,&data);
                    205:             break;
                    206:         }
                    207:     for ( mask >>= 1; mask > 0; mask >>= 1 )
                    208:         if ( (r+mask) < nserver_102 ) {
                    209:             dst = myrank_102+mask;
                    210:             if ( dst >= nserver_102 ) dst -= nserver_102;
                    211:             ox_send_data_102(dst,data);
                    212:         }
1.5     ! noro      213:     asir_push_one(data);
1.4       noro      214: }
                    215: \end{verbatim}
                    216:
                    217: $BF1MM$N<jB3$-$K(B reduction $B$,$"$k(B. $B$3$l$O(B, $B3F(B server $B$K$"$k%G!<%?$r(B, 2
                    218: $B9`1i;;$K$h$j=hM}$7$F$$$-(B, $B:G8e$K(B $root$ $B$K1i;;7k2L$,=8$a$i$l$k<jB3$-$G(B
                    219: $B$"$k(B.  $B$3$N>l9g$b(B, $B4JC1$N$?$a(B $root$ $B$,(B $0$ $B$G$"$k$H$7$F(B, $B<1JL;R$,(B
                    220: $B<1JL;R$,(B $b$ $B$N(B server $B$G$O(B, $b$ $B$r2<0L%S%C%H$+$i=g$K8+$F(B,
                    221:
                    222: \begin{enumerate}
                    223: \item $B$=$N%S%C%H$,(B 1 $B$J$i(B, $B$=$N%S%C%H$r(B 0 $B$K$7$?<1JL;R$r$b$D(B server
                    224: ($B$=$l$OI,$:B8:_$9$k(B) $B$K%G!<%?$rAw?.$7$F=*N;(B.
                    225: \item $B$=$N%S%C%H$,(B 0 $B$G(B, $B$=$N%S%C%H$r(B 1 $B$K$7$?CM$,(B $nserver-1$ $B0J2<(B
                    226: $B$J$i(B, $B$=$3$+$i%G!<%?$r<u?.$9$k(B. $B$=$N%G!<%?$H<j;}$A$N%G!<%?(B
                    227: $B$N(B 2 $B9`1i;;7k2L$G<j;}$A%G!<%?$r99?7$9$k(B.
                    228: \end{enumerate}
                    229:
                    230: $B$3$NJ}K!$K$h$l$P(B, $B:G=*7k2L$O(B $root$ $B$K%G!<%?$,=8$a$i$l$k(B. $B$3$N>l9g$K$b(B,
                    231: server $B$NAm?t$r(B $nserver$ $B$H$9$k$H$-(B, $B9b!9(B $\lceil \log_2 nserver\rceil$
                    232: $B%9%F%C%W8e$K$O<jB3$-$,=*N;$9$k(B.
                    233:
                    234: \begin{verbatim}
1.5     ! noro      235: void ox_reduce_102(int root,void (*func)())
1.4       noro      236: {
1.5     ! noro      237:     Obj data,data0,t;
1.4       noro      238:     int r,mask,id,src,dst;
                    239:
                    240:     r = myrank_102-root;
                    241:     if ( r < 0 ) r += nserver_102;
1.5     ! noro      242:     data = (Obj)asir_pop_one();
1.4       noro      243:     for ( mask = 1; mask < nserver_102; mask <<= 1 )
                    244:         if ( r&mask ) {
                    245:             dst = (r-mask)+root;
                    246:             if ( dst >= nserver_102 ) dst -= nserver_102;
                    247:             ox_send_data_102(dst,data);
                    248:             break;
                    249:         } else {
                    250:             src = r+mask;
                    251:             if ( src < nserver_102 ) {
                    252:                 src += root;
                    253:                 if ( src >= nserver_102 ) src -= nserver_102;
                    254:                 ox_recv_102(src,&id,&data0);
                    255:                 (*func)(CO,data,data0,&t); data = t;
                    256:             }
                    257:         }
1.5     ! noro      258:     asir_push_one(r?0:data);
1.4       noro      259: }
                    260: \end{verbatim}
                    261:
1.5     ! noro      262: $BBP1~$9$k(B SM $B%3%^%s%I$O0J2<$NDL$j$G$"$k(B.
        !           263:
        !           264: \begin{enumerate}
        !           265: \item
        !           266: \begin{verbatim}
        !           267: SM_bcast_102
        !           268: \end{verbatim}
        !           269:
        !           270: Request:
        !           271: \begin{tabular}{|c|c|c|} \hline
        !           272: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_bcast\_102} & {\tt int32 $root$} \\ \hline
        !           273: \end{tabular}
        !           274:
        !           275: Output: none.
        !           276:
        !           277: Stack after the request:
        !           278: \begin{tabular}{|c|c|}  \hline
        !           279: {\tt int32 OX\_DATA} & {\tt $CMObject$} \\ \hline
        !           280: \end{tabular}
        !           281:
        !           282: \item
        !           283: \begin{verbatim}
        !           284: SM_reduce_102
        !           285: \end{verbatim}
        !           286:
        !           287: Request:
        !           288: \begin{tabular}{|c|c|}  \hline
        !           289: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_reduce\_102} \\ \hline
        !           290: {\tt int32 $root$} & {\tt int32 CMO\_String} {$opname$} \\ \hline
        !           291: \end{tabular}
        !           292:
        !           293: Stack after the request:
        !           294: \begin{tabular}{|c|c|}  \hline
        !           295: {\tt int32 OX\_DATA} & {\tt $CMObject$} \\ \hline
        !           296: \end{tabular}
        !           297:
        !           298: Output: none.
        !           299: \end{enumerate}
1.4       noro      300:
1.1       noro      301: \section{$B%(%i!<=hM}(B}
                    302:
                    303: server $B$O(B RFC-100,101 $B$N(B $B%j%;%C%H%W%m%H%3%k$r<BAu$7$F$$$l$P(B,
                    304: master $B$+$i(B server $B$r%j%;%C%H$7(B, master-server $B4V$NDL?.O)$r(B
1.2       noro      305: $B%j%;%C%H$9$k$3$H$O$G$-$k(B. $B$3$l$K2C$($F(B,$B%0%k!<%WFb$N(B server $B4VDL?.O)(B
1.4       noro      306: $B$r%j%;%C%H$9$kI,MW$,$"$k(B. $B<1JL;R$,(B $i$ ($0\le i \le nserver$)
                    307: $B$N(B server $B$NF0:n$O<!$N$h$&$K$J$k(B.
1.1       noro      308:
1.2       noro      309: \begin{tabbing}
                    310: \underline{$B<1JL;R$,(B $i$ ($0\le i \le nserver$) $B$N(B server $B$NF0:n(B}\\
                    311: for \= $j = 0$ \= to $i-1$ do\\
                    312:     \> do\\
                    313:     \>         \>$data$ $\leftarrow$ $B<1JL;R(B $j$ $B$N(B server $B$+$i$N(B OX $B%G!<%?(B\\
                    314:     \> while $data \neq$ {\tt OX\_SYNC\_BALL}\\
                    315: end for\\
                    316: for $j = i+1$ to $nserver-1$ do\\
                    317:     \> {\tt OX\_SYNC\_BALL} $B$r(B $B<1JL;R(B $j$ $B$N(B server $B$KAw?.(B\\
                    318: end for
                    319: \end{tabbing}
                    320: $B$3$N<j=g$K$h$j(B, $B%G%C%I%m%C%/$J$7$KA4$F$NDL?.O)$r6u$K$9$k$3$H$,$G$-$k(B.
1.3       noro      321: $B$3$NA`:n$O(B, master-server $BDL?.O)$N%j%;%C%H8e$K9T$o$l$k$?$a(B, $B3F(B server
                    322: $B$O(B master $B$+$i$N%G!<%?BT$A>uBV$K$"$k(B. $B$h$C$F(B, $B<!$N(B SM $B%3%^%s%I$r(B
                    323: $B3F(B server $B$K0l@F$KAw$k$3$H$K$h$j9T$&(B.
                    324:
                    325: \begin{verbatim}
                    326: SM_reset_102
                    327: \end{verbatim}
                    328:
                    329: Request:
                    330: \begin{tabular}{|c|c|}  \hline
                    331: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_reset\_102} \\ \hline
                    332: \end{tabular}
                    333:
                    334: Output: none.
                    335:
1.1       noro      336: \section{API}
1.2       noro      337:
                    338: $B0J2<(B, asir $B$K$*$1$k(B RFC-102 $B4XO"$N(B API $B$r>R2p$9$k(B.
                    339:
                    340: \subsection{server $B4VDL?.O)3+@_(B}
                    341:
1.4       noro      342: $B0J2<$N4X?t$O(B, master $BMQ$KMQ0U$5$l$?$b$N$G(B, SM $B%3%^%s%IAw?.MQ$N(B
                    343: wrapper $B$G$"$k(B.
                    344:
1.2       noro      345: \begin{itemize}
1.3       noro      346: \item {\tt ox\_set\_rank\_102($Server$,$Nserver$,$Rank$)}
1.2       noro      347:
1.3       noro      348: $Server$ $B$,B0$9$k%0%k!<%W$KB0$9$k(B server $B$NAm?t(B $Nserver$ $B$H(B,
1.4       noro      349: $B$=$N(B server $B$N%0%k!<%WFb<1JL;R(B $Rank$ $B$rDLCN$9$k(B.
1.2       noro      350:
1.4       noro      351: \item {\tt ox\_tcp\_accept\_102($Server$,$Port$,$Rank$)}
1.2       noro      352:
1.4       noro      353: $Server$ $B$KBP$7(B, $B%]!<%HHV9f(B $Port$ $B$G(B,
                    354: $B<1JL;R(B $Rank$ $B$N(B server $B$+$i$N(B connect $BBT$A>uBV$KF~$k$h$&;X<($9$k(B.
                    355: $BDL?.$,@.N)$7$?$i(B, $BAw<u?.%P%C%U%!$N%;%C%H%"%C%W(B,
1.2       noro      356: $BAj<j@h%F!<%V%k$X$NEPO?$J$I$r9T$&(B.
                    357:
1.4       noro      358: \item {\tt ox\_tcp\_connect\_102($Server$,$Host$,$Port$,$Rank$)}
1.2       noro      359:
1.4       noro      360: $Server$ $B$KBP$7(B, $B%[%9%HL>(B $Host$ $B$N%]!<%HHV9f(B $Port$ $B$N(B TCP $B%]!<%H$KBP$7$F(B
                    361: connect $B$9$k$h$&;X<($9$k(B.
1.2       noro      362: $BDL?.$,@.N)$7$?$i(B, $BAw<u?.%P%C%U%!$N%;%C%H%"%C%W(B, $BAj<j$r(B $Rank$ $B$H$7$F(B
                    363: $BAj<j@h%F!<%V%k$X$NEPO?$J$I$r9T$&(B.
1.4       noro      364:
                    365: \item {\tt ox\_reset\_102($Server$)}
                    366:
                    367: $Server$ $B$KBP$7DL?.O)%j%;%C%HF0:n$r;X<($9$k(B. $B$3$NA`:n$O(B, $B%0%k!<%WFbA4$F$N(B server
                    368: $B$G9T$o$l$J$1$l$P$J$i$J$$(B.
1.2       noro      369: \end{itemize}
                    370:
                    371: \subsection{server $B4VDL?.(B}
                    372:
                    373: \begin{itemize}
1.3       noro      374: \item {\tt ox\_send\_102($Rank$,$Data$)}
1.2       noro      375:
                    376: $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.
1.4       noro      377: $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.
1.2       noro      378:
1.3       noro      379: \item {\tt ox\_recv\_102($Rank$)}
1.2       noro      380:
                    381: $B<1JL;R(B $Rank$ $B$N(B server $B$+$i(B OX $B%G!<%?$r<u?.$9$k(B.
1.4       noro      382: $B<1JL;R(B $Rank$ $B$N(B server $B$OBP1~$9$kAw?.$r3+;O$7$J$1$l$P$J$i$J$$(B.
1.2       noro      383:
1.5     ! noro      384: \item {\tt ox\_bcast\_102($Root$[,$Data$])}
        !           385:
        !           386: $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.
        !           387: $Data$ $B$,;XDj$5$l$?>l9g(B, $B%9%?%C%/$K%W%C%7%e$5$l$k(B.
        !           388: $B$r;XDj$9$kI,MW$,$"$k(B. $B<1JL;R$,(B $Root$ $B$KEy$7$$(B server $B$G(B, $B%9%?%C%/(B
        !           389: $B$+$i%G!<%?$,%]%C%W$5$l(B, $B$=$N%G!<%?$,(B, $B3F8F$S=P$7$NLa$jCM$H$J$k(B.
        !           390:
        !           391: \item {\tt ox\_reduce\_102($Root$,$Operation$[,$Data$])}
        !           392:
        !           393: $B%0%k!<%WFb$N3F(B server $B$N%9%?%C%/$+$i%]%C%W$7$?%G!<%?$KBP$7(B
        !           394: $Operation$ $B$G;XDj$5$l$kFs9`1i;;$r9T$$(B,
        !           395: $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
        !           396: $BJV$9(B.
        !           397: $Data$ $B$,;XDj$5$l$?>l9g(B, $B%9%?%C%/$K%W%C%7%e$7$F$+$i>e5-$NA`:n$r(B
        !           398: $B<B9T$9$k(B. $Root$ $B0J30$N(B server $B$G$NLa$jCM$O(B 0 $B$G$"$k(B.
1.2       noro      399:
                    400: \end{itemize}
1.1       noro      401:
1.4       noro      402: \begin{thebibliography}{99}
                    403: \bibitem{OpenXM}
                    404: Maekawa, M. et al, The Design and Implementation of OpenXM-RFC 100 and 101.
                    405: Proceedings of ASCM2001, World Scientific, 102-111 (2001).
                    406: \bibitem{MPI2}
                    407: Gropp, W., et al, Using MPI-2 Advanced Features of the Message-Passing
                    408: Interface. The MIT Press (1999).
                    409: \end{thebibliography}
1.1       noro      410: \end{document}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>