Annotation of OpenXM/doc/Papers/rims-2003-12-16-ja.tex, Revision 1.1
1.1 ! takayama 1: %% $OpenXM$
! 2: %% $B$3$NJ8=q$K$O(B ox_ntl, oxshell, OX RFC 102, 103 $B$,2r@b$5$l$F$$$k(B.
! 3: %% ChangeLog $B$K$O(B http://www.openxm.org $B$N(B cvsweb $B$G$N%=!<%9%U%!%$%kL>$*$h$S(B
! 4: %% $B$=$N%P!<%8%g%s$,=q$+$l$F$$$k(B.
! 5: \documentclass[twocolumn]{jarticle}
! 6: %% this03/misc-2003/12/RIMS
! 7: %% See also OpenXM/doc/Papersrims-2003-12-16-ja-ohp.tex
! 8: %\usepackage{rims02}
! 9: \usepackage{color}
! 10: \usepackage{rgb}
! 11: \usepackage{epsfig}
! 12: \def\nnn{ {\color{red} $\bullet$}\ } %% $B;v<B(B
! 13: \def\ppp{ {\color{blue} $\bullet$}\ } %% $B;v<B(B
! 14: \def\eee{ {\color{magenta} Example}:\ } %% $BNc(B
! 15: \def\ttt{ {\color{red} $\bullet$}\ } %% $BDjM}(B
! 16:
! 17: \def\pagetitle#1{ \fbox{{\color{magenta} #1 }}}
! 18:
! 19: \newenvironment{FRAME}{\begin{trivlist}\item[]
! 20: \hrule
! 21: \hbox to \linewidth\bgroup
! 22: \advance\linewidth by -30pt
! 23: \hsize=\linewidth
! 24: \vrule\hfill
! 25: \vbox\bgroup
! 26: \vskip15pt
! 27: \def\thempfootnote{\arabic{mpfootnote}}
! 28: \begin{minipage}{\linewidth}}{%
! 29: \end{minipage}\vskip15pt
! 30: \egroup\hfill\vrule
! 31: \egroup\hrule
! 32: \end{trivlist}}
! 33:
! 34: \title{OpenXM $B$N?7%5!<%P(B, $B?7%W%m%H%3%k(B}
! 35: \author{OpenXM $B3+H/%0%k!<%W(B \\ ($B4d:,(B, $B>.86(B, $BLnO$(B, $B9b;3(B) \\
! 36: OpenXM committers \\ openxm.org
! 37: %%\ename{OpenXM committers}%
! 38: % \thanks{$B8D?MKh$N<U<-(B}%
! 39: %% \affil{openxm.org} %\eaffil{$B=jB0$N%m!<%^;zI=5-(B}%
! 40: % \mail{$BCx<T$N%a!<%k%"%I%l%9(B}%
! 41: % \and
! 42: }
! 43: \date{}
! 44:
! 45: \begin{document}
! 46: \maketitle
! 47:
! 48:
! 49: \section{OpenXM $B$NL\E*$HNr;K(B}
! 50:
! 51: OpenXM $B$O(B
! 52: \ppp $B?t3X$G$NJBNs7W;;(B,
! 53: \ppp $B?t3X%=%U%H%&%(%"$NE}9g2=(B $B$^$?$O(B Conglomerate $B2=(B (A.Solomon)
! 54: \ppp $B?t3XE*CN<1$N%^%M!<%8%a%s%H(B (Mathematical Knowledge Management)
! 55: \ppp $B<B:]$K?t3X$N8&5f$d?t3X$N1~MQ$K;H$($k%Q%C%1!<%8$N3+H/(B,
! 56: $B$J$I$rL\I8$K?tG/A0$+$i%Q%C%1!<%8$N3+H/(B, $B%W%m%H%3%k$N3+H/$r$7$F$$$k(B.
! 57: $B$3$N>.J8$G$O9V1i$KMQ$$$?%9%i%$%I$r85$K(B OpenXM $B$N?7$7$$%5!<%P$*$h$S?7$7$$DL?.%W%m%H%3%k$r(B
! 58: $B>R2p$9$k(B.
! 59:
! 60: \noindent OpenXM$B$NNr;K(B \\
! 61: \nnn OpenXM 1.1.1 (January 24, 2000): $B:G=i$N<B83HG(B. \\
! 62: \nnn OpenXM 1.1.2 (March 20, 2000): $B$H$j$"$($:;H$($kHG(B. \\
! 63: \nnn OpenXM 1.1.3 (September 26, 2000): 1.1 $B7O$N:G=*HG(B. OpenXM RFC 100 $B7A<0(B
! 64: $B$N%W%m%;%9LZ(B. 1077 $B8D$N?t3X4X?t$rDs6!(B.
! 65: $BDs6!$7$F$$$k%5!<%P$O(B {\tt ox\_asir}, {\tt ox\_sm1},
! 66: {\tt ox\_phc}, {\tt ox\_gnuplot}, {\tt ox\_m2}, {\tt ox\_tigers},
! 67: {\tt ox\_math}(ematica), {\tt OMproxy}. \\
! 68: \nnn OpenXM 1.2.1 (March 2, 2002): Cygwin (Windows) $B$X$NBP1~3+;O(B.
! 69: $B%^%K%e%"%k<+F0@8@.(B(gentexi)$B$J$I(B. \\
! 70: \nnn OpenXM 1.2.2 (May 13, 2003): RFC 103 ($BItJ,E*(B), autoconf\\
! 71: (\nnn) Digital formula book, OpenMath, tfb, CD (hypergeo*, weylalgebra*, intpath*),
! 72: $B?tCM7W;;(B.
! 73:
! 74:
! 75:
! 76: \section{ {\color{blue} $B?7$7$$%5!<%P(B ntl}}
! 77: http://www.shoup.net/ntl,
! 78: NTL is a high-performance, portable C++ library providing data structures and algorithms for manipulating signed, arbitrary length integers, and for vectors,
! 79: matrices, and polynomials over the integers and over finite fields.
! 80:
! 81:
! 82: {\color{blue} ox\_toolkit $+$ NTL $B%i%$%V%i%j(B}
! 83: $\Rightarrow$ {\color{red} ox\_ntl}
! 84: {\footnotesize
! 85: \begin{verbatim}
! 86: [1145]PID=ox_launch_nox(0,
! 87: "/home/taka/OX4/OpenXM/bin/ox_ntl");
! 88: [1028] F=ntl.ex_data(4)$
! 89: [1029] F = F * subst(F, x, x + 1)$
! 90: [1030] ntl.factor(PID, F);
! 91: /* NTL $B$N(B knapsac factorizer */
! 92: [[1,1],
! 93: [x^16+16*x^15- ... , 1]
! 94: [x^16-136*x^14+ ..., 1]]
! 95: \end{verbatim}
! 96: }
! 97: % [x^16+16*x^15-16*x^14-1344*x^13-4080*x^12+32576*x^11+157376*x^10-255232*x^9-2062624*x^8-249088*x^7+10702080*x^6+9126912*x^5-18643712*x^4-24167424*x^3+2712576*x^2+10653696*x+2324736,1],
! 98: % [x^16-136*x^14+6476*x^12-141912*x^10+1513334*x^8-7453176*x^6+13950764*x^4-5596840*x^2+46225,1]]
! 99:
! 100: $B<BAu$K$h$jL@$i$+$K$J$C$?$3$H(B: \quad ox\_toolkit $B$NM-8z@-(B,
! 101: ox\_toolkit $B$NLdBjE@$N2~A1(B, LLL $B$r$h$V$?$a$K(B CMO array $B$bI,MW(B.
! 102:
! 103: \leftline{\fbox{$B$3$N5!G=$K4X$9$k(B ChangeLog}}
! 104: \noindent
! 105: OpenXM/src/ox\_ntl $B$N2<$NA4$F$N%U%!%$%k(B (2003$BG/(B12$B7n$^$G(B).
! 106: OpenXM/src/ox\_toolkit $B$N2<$N<!$N%U%!%$%k(B.
! 107: \nnn cmo.c 1.17, ox.c 1.13--1.26,
! 108: ox\_toolkit.h 1.24--1.27.
! 109:
! 110: \rightline{$B3+H/(B: $B4d:,(B ($B>.86(B)}
! 111:
! 112:
! 113: \section{{\color{blue} $B?7$7$$%5!<%P(B polymake $B$H(B oxshell}}
! 114:
! 115: {\color{red} Polymake } : $BB?LLBNMQ%=%U%H%&%(%"(B.
! 116: {\tt http://www.math.tu-berlin.de/polymake},
! 117: by Ewgenji Gawrilow, Michael Joswig. \\
! 118: % polemake logo
! 119: Facets, Convex hull, Triangulation, $B9=@.(B, polytope data,
! 120: Visualization by JavaView and Povray.
! 121:
! 122:
! 123: \eee
! 124: $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. \\
! 125: {\tt polymake} $B$G$O$D$.$h$&$JF~NO%U%!%$%k(B {\tt square.poly} $B$r$^$::n@.$9$k(B.
! 126:
! 127: \begin{minipage}{7cm}
! 128: {\footnotesize \color{blue}
! 129: \begin{verbatim}
! 130: POINTS
! 131: 1 0 0
! 132: 1 1 0
! 133: 1 0 1
! 134: 1 1 1
! 135: \end{verbatim}
! 136: }
! 137: \end{minipage}
! 138: \begin{minipage}{7cm}
! 139: $BF~NO(B:
! 140: {\color{red} \verb@ polymake square.poly FACETS @ } \\
! 141: $B7k2L(B:
! 142: {\footnotesize \begin{verbatim}
! 143: FACETS
! 144: 0 0 1
! 145: 0 1 0
! 146: 1 0 -1
! 147: 1 -1 0
! 148: \end{verbatim} }
! 149: \end{minipage}
! 150:
! 151: \begin{figure}[t]
! 152: \epsfxsize=5cm
! 153: \epsffile{rims-2003-12-16-sq.eps}
! 154: \end{figure}
! 155:
! 156:
! 157: \subsection{ Polymake $B$N(B OX 100, 101 $B%5!<%P2=$G2?$,LdBj$G$"$C$?$+(B?}
! 158: %C $B>\$7$$$3$H$O$3$3$K=q$$$F$k$3$H$rFI$s$G$b$i$&$3$H$K$7$F(B, $B0l8@$G$$$($P(B
! 159: %C C $B$N30It%W%m%0%i%`8F$S=P$7%7%9%F%`%3!<%k(B system $B$N5!G=$r6/2=$7$h$&$H$$$&$3$H(B
! 160:
! 161: $B?7$7$$(B OX RFC 100 $B=`5r$N%5!<%P$r:n$k>l9g$K$O(B
! 162: $B%?!<%2%C%H$H$9$k?t3X%=%U%H%&%(%"%7%9%F%`$N%=!<%9%3!<%I$K(B OX RFC 100 $BBP1~ItJ,(B
! 163: $B$r2C$($k:n6H$r$7$J$$$H$$$1$J$$(B.
! 164: $B$3$N:n6H$O%=!<%9%3!<%I$NM}2r$H$+$J$j$N<j4V$rMW$9$k(B.
! 165: C++ $B$G=q$+$l$?(B polymake $B$N%=!<%9$O@hC<E*$J(B C++ $B$N5!G=$r(B
! 166: $BMxMQ$7$F$*$j%3%s%Q%$%k$,MF0W$G$J$$(B.
! 167:
! 168:
! 169: Polymake $B$O$"$i$+$8$a%U%!%$%k$K%3%^%s%I$d%G!<%?$r=q$-=P$7$F$*$/$3$H$K$h$j(B
! 170: unix $B$N(B shell
! 171: $B$+$iMxMQ2DG=$J$h$&$K:n$i$l$F$$$k(B:
! 172: $B$3$N$h$&$J%"%W%j%1!<%7%g%s$r(B {\color{red} $B%P%C%A=hM}BP1~%"%W%j%1!<%7%g%s(B}
! 173: $B$H8F$V(B.
! 174: $B%5!<%P$H$NDL?.$NIQEY$OLdBj$K$h$k$,$"$kDxEYBg$-$$7W;;$N>l9g$ODL?.;~4V$OL5;k$G$-$k(B.
! 175: Polymake $B$OBPOCE*MxMQ$OA[Dj$7$F$*$i$:%5!<%P$N7W;;$rCfCG$7$F(B, $B:FEY3+;O$9$k$J$I$NI,MW$,$J$$(B.
! 176: $B$7$?$,$C$F(B {\tt system} $B4X?t(B
! 177: $B$G(B polymake $B$r8F$S=P$7$F(B, $B7k2L$,=q$-=P$5$l$?%U%!%$%k$r2r@O$9$l$P$h$$(B.
! 178: $B$7$+$7$3$N(B {\tt system} $B4X?t$O;H$$$K$/$$(B.
! 179: $BLdBjE@$O%U%!%$%k%7%9%F%`$d(B OS $B$N0c$$$r5[<}$G$-$J$$(B, $B%W%m%;%94IM}$N$d$j$K$/$5(B
! 180: $B$J$I$G$"$k(B.
! 181: $B2f!9$O(B {\tt system} $B$N6/2=HG$H$7$F(B {\color{blue} oxshell}
! 182: $B$rF3F~$9$k(B.
! 183:
! 184:
! 185: \subsection{ Oxshell $B$H$O(B }
! 186: Oxshell $B$O>e5-$N$h$&$J%P%C%A=hM}BP1~%"%W%j%1!<%7%g%s$r%=!<%9%3!<%I$N2~JQ$J$/(B
! 187: OX RFC 100 $B=`5r$K$9$k$?$a$N$$$o$f$k%i%C%Q!<7?$N(B OX $B%5!<%P$r=q$/$?$a$NJd=u5!G=$r(B
! 188: $BDs6!$9$k(B sm1 $B$X$NAH$_9~$_4X?t$G$"$k(B.
! 189:
! 190: Oxshell $B$rMQ$$$F(B OX $B%5!<%P$r<B8=$9$k$N$,E,@Z$J?t3X%=%U%H%&%(%"$O0J2<$N$h$&$JFCD'$r$b$D$b$N$G$"$m$&(B. \\
! 191: \nnn $B%P%C%A=hM}BP1~%"%W%j%1!<%7%g%s$G$"$k(B.
! 192: \nnn $B%=!<%9%3!<%I$NJQ99$,$G$-$J$$$+:$Fq(B.
! 193: \nnn $B%5!<%P$H$NDL?.$,IQHK$K$*$-$J$$(B.
! 194: \nnn $B%5!<%P$N7W;;$rCfCG$7$F(B, $B:FEY3+;O$9$k$J$I$NI,MW$,$J$$(B.
! 195: \nnn Windows $B$G$b(B unix $B$G$bF0$+$7$?$$(B.
! 196:
! 197: \subsection{ OX RFC 100 $B$NI|=,(B}
! 198:
! 199: $B%/%i%$%"%s%H(B-$B%5!<%P%b%G%k(B.
! 200: $B%5!<%P$O(B stackmachine.
! 201: (1) $B%9%?%C%/%^%7%s$X$N%a%C%;!<%8$rAw$k$3$H$K$h$j7W;;$,?J9T$9$k(B.
! 202: (2) $B7W;;$NCfCG$J$I$N%a%C%;!<%8$b$"$k(B.
! 203: (3) $B%5!<%P$O%(%s%8%s$H%3%s%H%m!<%k%W%m%;%9$h$j$J$k(B.
! 204:
! 205: \noindent OX RFC 100 $B$K$O(B\underline{$B%U%!%$%k$N35G0$,$J$$(B}. $B$7$?$,$C$F(B, \\
! 206: \verb@ polymake $B%U%!%$%kL>(B $BF0:n(B @ \\
! 207: $B$_$?$$$J%W%m%0%i%`$O(B OX $B%9%?%C%/%^%7%s$N>e$N%G!<%?$r%U%!%$%k$K=q$-=P$7$F$+$i(B
! 208: $B<B9T$7$F(B, $B$=$l$+$i$^$?%9%?%C%/%^%7%s$N>e$N%G!<%?$KJQ49$7$J$$$H$$$1$J$$(B.
! 209: ($BC1=c;E;v(B, $B$7$+$7(B, ZPG $B$N6KCW(B; unix $B$H(B windows $B0c$$(B,
! 210: /bin/sh $B$NB8:_(B, $B%W%m%0%i%`$,BgJQFI$_$K$/$/J]<i$b$7$K$/$$(B)
! 211:
! 212: %C $B%"%$%G%#%"$O0l8@$G$$$($P<!$N0l9T$N$_(B.
! 213: {\tt oxshell} $B$G$O$3$N;E;v$O<!$N(B 1 $B9T$G=q$/(B. \\
! 214: {\color{red} \verb@[(polymake) (stringInOut://$B%9%?%C%/%^%7%sJQ?tL>(B.poly) $BF0:n(B] oxshell@}\\
! 215: $B%9%?%C%/%^%7%s$NJQ?t$r%U%!%$%k$r$_$J$7$F$$$k(B.
! 216:
! 217: $B$3$N$h$&$J9M$(J}$O(B, $B$J$K$b?7$7$$$b$N$G$O$J$$(B. \\
! 218: $BNc(B: Java $B$N(B io.StringReader \\ ( io.InputStreamReader $B$NBe$o$j(B). \\
! 219: $BNc(B: $B%9%/%j%W%H8@8l$G$"$k(B Python \\
! 220: \verb@ x=os.popen("abc","r").read(); @
! 221: %C netscape $B$N(B plugin $B$J$I$bFbItE*$K$O;w$?%"%$%G%#%"$rMQ$$$F$$$k$H;W$o$l$k(B.
! 222:
! 223: \noindent
! 224: {\color{blue} $B?7$7$$ItJ,(B}:
! 225: $B$3$N9M$($r?t3X%=%U%H%&%(%"$NE}9g2=$N$?$a$K;H$&$?$a$N<BAu$OB8:_$7$F$$$J$+$C$?(B.
! 226: $B$3$l$,(B oxshell $B%3%^%s%I$NF3F~$K$h$C$F2r7h$5$l$kE@$N0l$D$G$"$k(B.
! 227: $B9M$(J}$,@0M}$5$l%W%m%0%i%`$NJ]<i@-$,BgJQ$h$/$J$j(B, $B$^$??7$7$$%P%C%A7?%"%W%j%1!<%7%g%s$N(BOX $B%5!<%P2=$,3Z$K$J$C$?(B.
! 228:
! 229:
! 230:
! 231: \eee
! 232: $BJ8;zNs(B {\tt S} $B$K3JG<$5$l$?C18l(B dog, cat, lion $B$r(B unix $B$N%D!<%k(B sort $B$G(B
! 233: $BJB$YJQ$($k$K$O<!$N$h$&$K=q$/(B.
! 234: $BF~NO$O(B oxshell $B$r<B9T$7$F$$$k%9%?%C%/%^%7%s$NJQ?t(B {\tt S} $B$K3JG<$5$l$F$$$k(B.
! 235:
! 236: {\footnotesize
! 237: \begin{verbatim}
! 238: [1163]:= S="dog\ncat\nlion\n";
! 239: [1164]:= oxshell.set_value("S",S);
! 240: [1165]:= T=oxshell.oxshell(
! 241: ["sort","stringIn://S"]);
! 242: [cat
! 243: dog
! 244: lion
! 245: ,]
! 246: \end{verbatim}
! 247: }
! 248:
! 249:
! 250: \subsection{ oxshell.facets() $B$N<BAu(B, $B?t3X4X?t$N<BAuNc(B }
! 251:
! 252: %C $B$b$&0l$D$N%]%$%s%H$O(B tfb, OpenMath $B$NM-8z@-$N<B>Z(B.
! 253: %C $BEv$jA0$@$,L5$/$F$O$J$i$J$$8&5f$@$C$?(B.
! 254: \noindent
! 255: \nnn $B%G!<%?JQ49$K$O(B tfb/2 ($BEDB<(B)format $B$rMxMQ(B, OpenMath $B%"!<%-%F%/%A%c$rMxMQ(B.
! 256: {\color{blue}$B@.2L(B}: $B$=$NM-8z@-$r<B>Z$G$-$?(B.)
! 257: %% $B$3$l$b?7$7$$E@$G$"$m$&(B.
! 258: {\footnotesize \begin{verbatim}
! 259: [$polymake.data(
! 260: polymake.POINTS([[1,0,0],[1,1,0],[1,0,1],[1,1,1]]),
! 261: polymake.FACETS([[0,0,1],[0,1,0],[1,0,-1],[1,-1,0]]),
! 262: polymake.AFFINE_HULL())$
! 263: CMO tree expression of the data above
! 264: Outputs to stdout and stderr ]
! 265: \end{verbatim} }
! 266:
! 267: %C $B?t3XE*$K$O<!$NF05!(B. D-module $B$N7W;;$G(B facet $B$@$;$k(B.
! 268: %C ($B:XF#$`$D$_$N(B) $b$ function $B$r(B polytope algorithm $B$G5a$a$k=i$a$F$N<BAu(B.
! 269: {\color{red} taka\_ahg.b(A,Idx)}(OpenXM/src/asir-contrib/packages/src/taka\_ahg.rr)
! 270: oxshell $B$K$h$k(B polymake $B8F$S=P$75!G=$rMQ$$$??t3X4X?t(B.
! 271: $B$3$N4X?t$O(B $B9TNs(B {\tt A} $B$KIU?o$7$?(B $BJ}8~(B {\tt Idx} $B$N$"$k(B $b$ $B4X?t$r7W;;$9$k(B.
! 272: $B$3$l$O(B {\tt A} $B$NDj5A$9$k(B cone $B$N%U%!%;%C%H$r$"$i$o$90l<!<0$N@Q$GI=8=$5$l$k$3$H$,(B,
! 273: $BCN$i$l$F$$$k(B
! 274: (Saito, Mutsumi; Sturmfels, Bernd; Takayama, Nobuki; Hypergeometric polynomials and integer programming. Compositio Math. 115 (1999), no. 2, 185--204
! 275: $B$*$h$S(B
! 276: Saito, Mutsumi; Parameter shift in normal generalized hypergeometric systems. Tohoku Math. J. (2) 44 (1992), no. 4, 523--534
! 277: $B$r$_$h(B.)
! 278:
! 279:
! 280:
! 281: \begin{minipage}{10cm}
! 282: {\footnotesize
! 283: \begin{verbatim}
! 284: [1163]:= load("oxshell.rr");
! 285: [1164]:= load("taka_ahg.rr");
! 286: [1165]:= A=[[1,0,0],[1,1,0],[1,0,1],[1,1,1],[1,2,0]];
! 287: [1166]:= fctr(taka_ahg.b(A,0,[s1,s2,s3]));
! 288: [[1,1],[s1-s3,1],[2*s1-s2-s3,1],[2*s1-s2-s3-1,1]]
! 289: \end{verbatim}
! 290: }
! 291: \end{minipage}
! 292: %
! 293: \begin{minipage}{10cm}
! 294: \epsfxsize=8cm
! 295: \epsffile{rims-2003-12-16-sq2.eps}
! 296: \end{minipage}
! 297:
! 298: {\footnotesize
! 299: \begin{verbatim}
! 300: def b(A,Idx,V) {
! 301: F = oxshell.facets(A);
! 302: /* Computing all the facets by polymake server.*/
! 303: F = F[1]; /* F is the set of the facets */
! 304: P = A[Idx];
! 305: Nfacets = length(F);
! 306: F = toPrimitive2(P,F);
! 307: /* Translate into primitive supporting function */
! 308: Bf = 1;
! 309: for (I=0; I<Nfacets; I++) {
! 310: H = matrix_inner_product(P,F[I]);
! 311: if (H != 0) {
! 312: B = matrix_inner_product(P,V);
! 313: for (J=0; J<H; J++) {
! 314: Bf = Bf*(B-J); /* See the papers above. */
! 315: }
! 316: }
! 317: }
! 318: return(Bf);
! 319: }
! 320: \end{verbatim}
! 321: }
! 322:
! 323: \leftline{\fbox{$B$3$N5!G=$K4X$9$k(B ChangeLog}}
! 324: \noindent OpenXM/src/kan96xx $B$N2<$N<!$N3F%U%!%$%k(B.
! 325: \nnn Doc/oxshell.oxw 1.1--1.2.
! 326: \nnn trans $B$N2<$N%U%!%$%k$9$Y$F(B(2003$BG/(B12$B7n(B).
! 327: \nnn Kan/kanExport0.c 1.19--1.20,
! 328: option.c 1.13, primitive.c 1.10--1.11,
! 329: shell.c 1.1--1.9,
! 330: stackmachine.c 1.13--1.14,
! 331: kclass.h 1.4--1.5.
! 332: \nnn kclass/tree.c 1.1--1.7, tree.hh 1.1--1.2. \\
! 333: OpenXM/src/k097 $B$N2<$N<!$N3F%U%!%$%k(B.
! 334: \nnn help.k 1.11--1.12, ki.c 1.16, ox\_k0.c 1.5,
! 335: slib.k 1.11, slib.sm1 1.10. \\
! 336: OpenXM/src/asir-contrib/packages/src $B$N2<$N(B
! 337: oxshell.rr 1.1--1.3. \\
! 338: OpenXM/src/util $B$N2<$N(B
! 339: ox\_pathfinder.c 1.8--1.17.
! 340:
! 341: \rightline{$B3+H/(B: $B9b;3(B}
! 342:
! 343: \noindent
! 344: \section{{\color{blue} OX-RFC 103 ( 100, 101 $BJd0d(B)}}
! 345:
! 346: $B$3$N(B RFC $B$O(B OpenXM RFC 100 ($B$*$h$S(B 101) $B$N<BAu$K$h$jL@$i$+$K$J$C$?<o!9$NLdBjE@$r$b$H$K(B
! 347: RFC 100 $B%W%m%H%3%k$X$N4v$D$+$NDI2C$rDs0F$9$k(B.
! 348:
! 349: \noindent
! 350: \nnn $B%U%!%$%k$X$NFI$_=q$-(B \\
! 351: \nnn $B?7$7$$(B CMO \\
! 352: \nnn $B%(%s%8%sG'>Z<jB3$-(B \\
! 353: \nnn $BCfCG$*$h$SJQ?t$NEAGE(B \\
! 354: 1. $B<+J,$N;R6!%W%m%;%9$r$9$Y$F%j%9%H$9$k(B
! 355: (asir$B$N>l9g(B:{\tt ox\_get\_serverinfo()}) \\
! 356: 2. $B;R6!%W%m%;%9$K=gHV$K(B OpenXM-RFC 100 $B$NCfCG%a%C%;!<%8$rAw$k(B.
! 357:
! 358: \noindent
! 359: {\color{red} ox103\_set\_shared\_variable(} CMO string {\tt Name}, CMO object {\tt
! 360: value}{\tt )}
! 361: $B%(%s%8%s%9%?%C%/%^%7%s$NJQ?t(B {\tt Name} $B$KCM(B
! 362: {\tt value} $B$,@_Dj(B,
! 363: $B$5$i$K;R$I$b$N%W%m%;%9$9$Y$F$N%(%s%8%s4X?t(B
! 364: {\tt ox103\_set\_shared\_variable}
! 365: $B$r$h$V(B.
! 366:
! 367: \noindent
! 368: \leftline{\fbox{$B$3$N5!G=$K4X$9$k(BChangeLog}}
! 369: OpenXM/src $B$N2<$N<!$N%U%!%$%k(B. \\
! 370: asir-contrib/packages/src/oxrfc103.rr 1.1--1.4,
! 371: kan96xx/Doc/oxrfc103.sm1 1.1--1.3,
! 372: util/ox\_pathfinder.c 1.17.
! 373:
! 374: \rightline{$B3+H/(B: $B9b;3(B}
! 375:
! 376:
! 377: \section{{\color{blue} OX-RFC 102 -- $BK\3JE*$J%5!<%P4VDL?.$rMQ$$$?J,;67W;;(B}}
! 378:
! 379:
! 380: OX-RFC-100, 101 : master-server $B4VDL?.$rMQ$$$?J,;67W;;(B
! 381:
! 382: OX-RFC-102 : server-server $B4VDL?.(B
! 383:
! 384: \underline{$BL\I8(B} : $BK\3JE*J,;6JBNs7W;;$r2DG=$K$9$k$3$H(B
! 385:
! 386: \underline{$B1~MQNc(B}
! 387: \begin{itemize}
! 388: \item broadcast $B$r8zN(2=$9$k(B
! 389: N $B8D$N(B server $B$X$N(B broadcast $B$,(B $O(\log_2 N)$ $B$G$G$-$k(B
! 390: \item LU $BJ,2r$NJ,;6JBNs7W;;(B
! 391: ScaLAPACK $BIw$K(B, $B9TNs$rJ,;6J];}$7$FJBNs7W;;(B
! 392: \end{itemize}
! 393:
! 394: \underline{$B;EMM(B}
! 395:
! 396: 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
! 397: $B;29M$K$9$k(B. {\tt http://www-unix.mcs.anl.gov/mpi}
! 398:
! 399: \underline{$B?7$7$$E@(B}
! 400:
! 401: OX RFC 100 $B$rA0Ds(B $\Rightarrow$ $B%G!<%?7?$N4IM}$NI,MW$,$J$$(B,
! 402: 100 $B$NCfCG%W%m%H%3%k$N3HD%(B,
! 403: $B$J$I(BMPI $B$h$jMF0W$KMxMQ2DG=(B.
! 404: %C $B$^$?(B, $B%7%9%F%`$N@_7W$G4sM?$G$-$J$/$F$b(B, $B<BNc$G$NM-8z@-(B, $B$"$kFCDj$NLdBj$G$N(B
! 405: %C $B@_7W$N2~A1Ey$r9M$($k(B. $B2f!9$O(B Shoup $B$N(B $B%"%k%4%j%:%`$,8zN(NI$/<BAu$G$-$k(B
! 406: %C $B$3$H$r<($7$?(B.
! 407:
! 408: \subsection{server $B$N5/F0(B, server $B4VDL?.O)$N3+@_(B}
! 409:
! 410: server $B$O(B OX RFC-100, 101 $B$K$h$j5/F0$9$k(B. $B$3$NDL?.O)$K0J2<$N(B SM
! 411: $B%3%^%s%I$rAw$k(B.
! 412:
! 413: \begin{itemize}
! 414: \item {\tt SM\_set\_rank\_102} $nserver$ $rank$
! 415:
! 416: server $B$K(B, $B%0%k!<%WFb$N(B server $B$NAm?t(B $nserver$ $B$H(B, $B$=$NCf$G$N(B
! 417: $B<1JL;R(B $rank$ ($0 \le rank \le nserver$) $B$rDLCN$9$k(B.
! 418:
! 419: \item {\tt SM\_tcp\_accept\_102} $port$ $peer$
! 420:
! 421: $B%]!<%HHV9f(B $port$ $B$N(B TCP $B%]!<%H$G(B, bind, listen, accept $B$r<B9T(B
! 422: $B$7$F(B connect $B$rBT$D(B. $BDL?.$,@.N)$7$?$i(B, byte order negotiation
! 423: $B$r9T$$(B, $BAj<j@h%F!<%V%k$KEPO?$9$k(B.
! 424:
! 425: \item {\tt SM\_tcp\_connect\_102} $peerhost$ $port$ $peer$
! 426:
! 427: $B%[%9%H(B $peerhost$ $B$N%]!<%HHV9f(B $port$ $B$N(B TCP $B%]!<%H$K(B connect $B$9$k(B.
! 428: $BDL?.$,@.N)$7$?$i(B, byte order negotiation $B$r9T$$(B, $BAj<j@h%F!<%V%k$KEPO?(B
! 429: $B$9$k(B.
! 430:
! 431: \end{itemize}
! 432:
! 433:
! 434:
! 435: \noindent
! 436: \subsection{server $B4VDL?.(B, broadcast, reduction}
! 437:
! 438: server $B4VDL?.$O(B, $BAj8_$N?.Mj$K4p$E$-9T$&(B --- $BAw$j<j$,Aw?.$7$?$i(B, $B<u$1<j$O(B
! 439: $B$A$c$s$H<u?.F0:n$KF~$k$3$H(B
! 440:
! 441: $B%G!<%?$O(B OX $B%?%0IU$-$G(B --- {\tt OX\_SYNC\_BALL} $B$K$h$kDL?.O)%j%;%C%H$KI,MW(B
! 442:
! 443: $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
! 444: $B%0%k!<%WFb$NA4$F$N(B server $B$G<B9T$5$l$J$1$l$P$$$1$J$$(B.
! 445:
! 446: \begin{itemize}
! 447: \item {\tt SM\_bcast\_102} $root$
! 448:
! 449: $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
! 450: broadcast $B$9$k(B. $B3F(B server $B$N%9%?%C%/$K(B broadcast $B$5$l$?%G!<%?$,(B push
! 451: $B$5$l$k(B.
! 452:
! 453: \item {\tt SM\_reduce\_102} $root$ $opname$
! 454:
! 455: $B3F(B server $B$N%9%?%C%/>e$N%G!<%?$,(B pop $B$5$l(B, $opname$ $B$G;XDj$5$l$k(B
! 456: $BFs9`1i;;(B($B7k9gB'$,I,MW(B) $B$r=g$K9T$$(B, $B7k2L$r(B $root$ $B$G;XDj$5$l$k(B server
! 457: $B$N%9%?%C%/$K(B push $B$9$k(B. $BB>$N(B server $B$K$O(B $0$ $B$,(B push
! 458: $B$5$l$k(B.
! 459: \end{itemize}
! 460:
! 461:
! 462:
! 463: \noindent
! 464: \subsection{broadcast $B$N<jB3$-(B}
! 465:
! 466: {SM\_bcast\_102} $B$N<B9T(B
! 467:
! 468: $root=0$ $B$G(B, $B<1JL;R$,(B $b2^k$ ($b$ $B$O4q?t(B) $B$N(B server $B$NF0:n(B
! 469:
! 470: \vskip\baselineskip
! 471: \begin{tabbing}
! 472: $data \leftarrow$ $B<1JL;R$,(B $(b-1)2^k$ $B$N(B server $B$+$i$N%G!<%?(B\\
! 473: for \= $i=k-1$ down to $0$\\
! 474: \> $B<1JL;R$,(B $b2^k+2^i$ $B$N(B server $B$K(B $data$ $B$rAw?.(B\\
! 475: end for
! 476: \end{tabbing}
! 477: \vskip\baselineskip
! 478: 2 $B$G3d$j@Z$l$k2s?t$,B?$$<1JL;R$r;}$D(B server $B$,@h$K%G!<%?Aw?.(B
! 479:
! 480: $\Rightarrow$ $B%G%C%I%m%C%/$K$J$i$J$$(B
! 481:
! 482: $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
! 483: ($N$ $B$O(B server $B$NAm?t(B) $B$G(B broadcast $B40N;(B.
! 484:
! 485:
! 486:
! 487: %C $B:YIt$O>JN,(B. $B$"$H$G(B 16 $B8D$N%5!<%P$N<BNc$G@bL@(B.
! 488: \noindent
! 489: \subsection{reduction $B$N<jB3$-(B}
! 490:
! 491: {SM\_reduce\_102} $B$N<B9T(B
! 492:
! 493: server $B?t(B $N$, $root=0$ $B$G(B, $B<1JL;R$,(B $b$ $B$N(B server $B$NF0:n(B
! 494:
! 495: $B<j;}$A$N%G!<%?$r(B $data$ $B$H$9$k(B
! 496:
! 497: \vskip\baselineskip
! 498: \begin{tabbing}
! 499: for \= $i=0$ to $\lfloor \log_2 N \rfloor$\\
! 500: \> if \= ( $b$ $B$K(B $2^i$ $B$N(B bit $B$,$"$k(B) then\\
! 501: \> \> $B<1JL;R(B $b-2^i$ $B$N(B server $B$K(B $data$ $B$rAw?.$7$F=*N;(B\\
! 502: \> else if ( $b+2^i < N$ ) then \\
! 503: \> \> $data_0 \leftarrow$ $B<1JL;R(B $b+2^i$ $B$N(B server $B$+$i$N%G!<%?(B\\
! 504: \> \> $data \leftarrow data$ $B$H(B $data_0$ $B$NFs9`1i;;7k2L(B \\
! 505: \> end if\\
! 506: end for
! 507: \end{tabbing}
! 508: \vskip\baselineskip
! 509:
! 510: $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
! 511: ($N$ $B$O(B server $B$NAm?t(B) $B$G(B reduction $B40N;(B. $B7k2L$O(B root $B$K;D$k(B.
! 512:
! 513:
! 514: \noindent
! 515: \subsection{broadcast $B;~$N%G!<%?$NN.$l(B}
! 516:
! 517:
! 518: $N=16$, $root=0$ $B$N>l9g(B
! 519:
! 520: \begin{center}
! 521: \begin{tabular}{|c|c|c|c|}
! 522: step 1 & step 2 & step 3 & step 4 \\ \hline
! 523: $0\rightarrow 8$&$0\rightarrow 4$ &$0\rightarrow 2$ &$0\rightarrow 1$ \\
! 524: &$8\rightarrow 12$&$8\rightarrow 10$ &$8\rightarrow 9$ \\
! 525: & &$4\rightarrow 6$ &$4\rightarrow 5$ \\
! 526: & &$12\rightarrow 14$&$12\rightarrow 13$ \\
! 527: & & &$2\rightarrow 3$ \\
! 528: & & &$10\rightarrow 11$ \\
! 529: & & &$6\rightarrow 7$ \\
! 530: & & &$14\rightarrow 15$
! 531: \end{tabular}
! 532: \end{center}
! 533:
! 534: reduction $B$N>l9g(B, $B%G!<%?$NN.$l$O5U$K$J$k(B (step 4 $\rightarrow$ step 1,
! 535: $BLp0u$,5U(B)
! 536:
! 537:
! 538: %C $B$3$l$O%*%j%8%J%k(B.
! 539: \noindent
! 540: \subsection{$B%(%i!<=hM}(B}
! 541:
! 542: master-server $B4VDL?.O)$O(B, OX RFC-100 $B$G5,Dj$5$l$F$$$k(B.
! 543:
! 544: 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
! 545:
! 546: \begin{tabbing}
! 547: for \= $j = 0$ \= to $i-1$ do\\
! 548: \> do\\
! 549: \> \>$data$ $\leftarrow$ $B<1JL;R(B $j$ $B$N(B server $B$+$i$N(B OX $B%G!<%?(B\\
! 550: \> while $data \neq$ {\tt OX\_SYNC\_BALL}\\
! 551: end for\\
! 552: for $j = i+1$ to $nserver-1$ do\\
! 553: \> {\tt OX\_SYNC\_BALL} $B$r(B $B<1JL;R(B $j$ $B$N(B server $B$KAw?.(B\\
! 554: end for
! 555: \end{tabbing}
! 556:
! 557: master-server $B%j%;%C%H8e(B : $B3F(B server $B$O%3%^%s%IBT$A>uBV(B
! 558:
! 559: $\Rightarrow$ $B<!$N(B SM $B%3%^%s%I$r3F(B server $B$KAw?.$9$l$P$h$$(B
! 560:
! 561: \begin{itemize}
! 562: \item {\tt SM\_reset\_102} ($B0z?t$J$7(B, collective)
! 563: \end{itemize}
! 564:
! 565:
! 566: \subsection{Asir (master) $B>e$G$N(B API}
! 567:
! 568: \begin{itemize}
! 569: \item {\tt ox\_set\_rank\_102($Server$,$Nserver$,$Rank$)}
! 570:
! 571: $Server$ $B$K(B {\tt SM\_set\_rank\_102} $B$rAw$k(B.
! 572:
! 573: \item {\tt ox\_tcp\_accept\_102($Server$,$Port$,$Rank$)}
! 574:
! 575: $Server$ $B$K(B {\tt SM\_tcp\_accept\_102} $B$rAw$k(B.
! 576:
! 577: \item {\tt ox\_tcp\_connect\_102($Server$,$Host$, \\ \quad\quad\quad\quad\quad $Port$,$Rank$)}
! 578:
! 579: $Server$ $B$K(B {\tt SM\_tcp\_connect\_102} $B$rAw$k(B.
! 580:
! 581: \item {\tt ox\_reset\_102($Server$)} (collective)
! 582:
! 583: $Server$ $B$K(B {\tt SM\_reset\_102} $B$rAw$k(B
! 584:
! 585: \end{itemize}
! 586:
! 587:
! 588:
! 589: \noindent
! 590: \subsection{Asir (server) $B>e$G$N(B API}
! 591:
! 592: \begin{itemize}
! 593: \item {\tt ox\_send\_102($Rank$,$Data$)}
! 594:
! 595: $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.
! 596: $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.
! 597:
! 598: \item {\tt ox\_recv\_102($Rank$)}
! 599:
! 600: $B<1JL;R(B $Rank$ $B$N(B server $B$+$i(B OX $B%G!<%?$r<u?.$9$k(B.
! 601: $B<1JL;R(B $Rank$ $B$N(B server $B$OBP1~$9$kAw?.$r3+;O$7$J$1$l$P$J$i$J$$(B.
! 602:
! 603: \item {\tt ox\_bcast\_102($Root$[,$Data$])} (collective)
! 604:
! 605: $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.
! 606: $Data$ $B$,;XDj$5$l$?>l9g(B, $B%9%?%C%/$K%W%C%7%e$5$l$k(B.
! 607: $B<1JL;R$,(B $Root$ $B$KEy$7$$(B server $B$G(B, $B%9%?%C%/(B
! 608: $B$+$i%G!<%?$,%]%C%W$5$l(B, $B$=$N%G!<%?$,(B, $B3F8F$S=P$7$NLa$jCM$H$J$k(B.
! 609:
! 610: \item {\tt ox\_reduce\_102($Root$,$Operation$[,$Data$])} (collective)
! 611:
! 612: $B%0%k!<%WFb$N3F(B server $B$N%9%?%C%/$+$i%]%C%W$7$?%G!<%?$KBP$7(B
! 613: $Operation$ $B$G;XDj$5$l$kFs9`1i;;$r9T$$(B,
! 614: $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
! 615: $BJV$9(B.
! 616: $Data$ $B$,;XDj$5$l$?>l9g(B, $B%9%?%C%/$K%W%C%7%e$7$F$+$i>e5-$NA`:n$r(B
! 617: $B<B9T$9$k(B. $Root$ $B0J30$N(B server $B$G$NLa$jCM$O(B 0 $B$G$"$k(B.
! 618: \end{itemize}
! 619:
! 620:
! 621:
! 622:
! 623: \noindent
! 624: \subsection{$B<B9TNc(B : $B0lJQ?tB?9`<0$N@Q(B (master $BB&(B)}
! 625:
! 626: {\footnotesize
! 627: \begin{verbatim}
! 628: def d_mul(F1,F2)
! 629: {
! 630: Procs = getopt(proc);
! 631: /* process $B;XDj$,$J$$>l9g$K$O(B, $B<+J,$G7W;;(B */
! 632: if ( type(Procs) == -1 ) return umul(F1,F2);
! 633: if ( !var(F1) || !var(F2) ) return F1*F2;
! 634: NP = length(Procs);
! 635: /* $B0z?t$r(B server 0 $B$KAw$k(B */
! 636: ox_push_cmo(0,[F1,F2]);
! 637: /* $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 */
! 638: for ( I = 0; I < NP; I++ )
! 639: ox_cmo_rpc(I,"d_mul_main",0);
! 640: /* server 0 $B$+$i7k2L$r<u$1<h$k(B */
! 641: R = ox_pop_cmo(0);
! 642: return R;
! 643: }
! 644: \end{verbatim}
! 645: }
! 646:
! 647: \subsection{$B<B9TNc(B : $B0lJQ?tB?9`<0$N@Q(B (server $BB&(B; collective)}
! 648: {\footnotesize
! 649: \begin{verbatim}
! 650: def d_mul_main(Root) /* Shoup's algorithm */
! 651: {
! 652: /* server $B$NAm?t(B, $B<+J,$N(B id $B$rCN$k(B */
! 653: Id = ox_get_rank_102(); NP = Id[0]; Rank = Id[1];
! 654: /* Root $B$K$"$k0z?t$r(B broadcast $B$G6&M-(B */
! 655: Arg = ox_bcast_102(Root); F1 = Arg[0]; F2 = Arg[1];
! 656: L = setup_modarrays(F1,F2,NP);
! 657: Marray = L[0]; MIarray = L[1]; M = L[2];
! 658: R = umul_chrem(F1,F2,MIarray[Rank],Marray[Rank],M);
! 659: Arg = 0; F1 = 0; F2 = 0;
! 660: /* $B3F(B server $B$N7k2L$rB-$79g$o$;$F(B, Root $B$KCV$/(B */
! 661: R = ox_reduce_102(Root,"+",R);
! 662: /* Root $B$N$_(B, $B7k2L$r(B normalize $B$9$k(B */
! 663: if ( Rank == Root )
! 664: R = uadj_coef(R%M,M,ishift(M,1));
! 665: return R;
! 666: }
! 667: \end{verbatim}
! 668: }
! 669:
! 670: \leftline{\fbox{$B$3$N5!G=$K4X$9$k(BChangeLog}}
! 671: \noindent
! 672: OpenXM\_contrib2/asir2000/
! 673: $B$N2<$N<!$N3F%U%!%$%k(B.
! 674: \nnn lib/dmul102, 1.1--1.2.
! 675: \nnn include/ox.h, 1.18--1.19.
! 676: \nnn parse/glob.c, 1.41.
! 677: \nnn io/tcpf.c 1.43--1.50,
! 678: ox.c 1.21--1.24, ox\_asir.c 1.45--1.50.
! 679:
! 680: \rightline{$B3+H/(B: $BLnO$(B}
! 681:
! 682: \end{document}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>