\documentclass[letterpaper,english]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Beowulf ¤¤¤åHOWTO }
\author{Jacek Radajewski and Douglas Eadline }
\date{v1.1.1, 22 November 1998}
\abstract{³o¥÷¤å¥ó¤¶²ÐBeowulf¶W¯Å¹q¸£¬[ºc©M¹ï¼¶¼g¥­¦æµ{¦¡´£¨Ñ¤@¨Ç­I´ºª¾ÃÑ¡A¨Ã¥]¬A¤@¨Ç¦³½ìªº¤å¥ó©Mºô¯¸³s±µ¡C}


\begin{document}
\maketitle
\tableofcontents

\section{«e¨¥}


\subsection{Án©ú}

§Ú­Ì±N¤£¹ï¥»¤å¥ó¤¤¤£¥¿½Tªº¸ê°T¡A©ÎªÌ·í¨Ï¥Î«á³y¦¨ªº·l¥¢­t³d¡C






\subsection{ª©Åv}

³o¥÷¤å¥óªºª©ÅvCopyright \copyright{} 1997 - 1998ÄÝ©óJacek Radajewski©MCouglas Eadline¡C¨Ã¦bGNU General Public Licence¤¹³\¤U´²§G©M­×§ï¥»¤å¥ó¡C




\subsection{¦³Ãö³o¥÷HOWTO}

Jacek Radajewski¦b1997¦~¤Q¤@¤ë¶}©l½s¼g³o¥÷¤å¥ó¡A«Ü§Ö¦aDouglas Eadline¤]¥[¤J¦æ¦C¡A´X­Ó¤ë«áBeowulf HOWTOÅÜ¦¨ªø½gªº¤å¥ó¡A¨Ã¦b1998¦~¤K¤ë¤À¦¨¤T¥÷¡ABeowulf HOWTO¡BBeowulf ¬[ºc³]­pHOWTO ©MBeowulf¦w¸ËºÞ²z HOWTO¡C1998¦~¤Q¤@¤ë¤Q¤@¤éBeowulf HOWTO 1.0.0ª©¥»¦bLinux ¤å¥ó­pµe¤Wµo§G¡A§Ú­Ì§Æ±æ³o¥u¬O§¹¾ãªºBeowulf ¤å¥ó­pµeªº²Ä¤@¨B¡C




\subsection{¦³Ãö³o¨Ç§@ªÌ}

\begin{itemize}
\item Jacek Radajewski ºôºÞ¤H­û¡A²{¥¿¦b¿D¬w«n©ø¤hÄõ¤j¾Ç§ðÅª¹q¸£¬ì¾Ç¡C
Jacek©ó1995¦~²Ä¤@¦¸±µÄ²Linux´N²`¨ü§l¤Þ¡A¥L¦b1997¦~«Ø¥ß¥L¦Û¤vªº²Ä¤@®M
Beowulf¹q¸£¸s¡A±q¨º®É°_¶}©l¬ã¨s¡A¸g±`·Q§ä¨ì§ó·s©M§ó¦nªº¤èªk¬[³]¨t²Î¡C
©p¥i¥H³z¹L¹q¤l¶l¥ó»P¥LÁpÃ´\onlynameurl{jacek@usq.edu.au}¡C

\item Douglas Eadline ³Õ¤h¡A¤]¬O¬ü°êParalogic¤½¥qªº¸³¨Æªø©M¥D­n¬ì¾Ç®a¡C
­ì¥D­×ª«²z¤Î¤ÀªR¤Æ¾Ç¡A1978¦~«Ø¥ß­Ó¤H²Ä¤@¥x¹q¸£¥Î¦b¤Æ¾Ç»ö¾¹¤W¡A
³o¤~¶}©l¶i¤J¹q¸£ªº»â°ì¡AEadline³Õ¤h²{¦b¿³½ì¥]¬ALinux¡ABeowulf¹q¸£¸s©M
¥­¦æalgorithms¡A©p¥i¥H³z¹L¹q¤l¶l¥ó»P¥LÁpÃ´\onlynameurl{deadline@plogic.com}

\end{itemize}





\subsection{µªÁÂ}

¸g¹Lªø®É´Áªº¼¶¼g¡A³Ì«á²×©ó§¹¦¨¡A¯S§O·PÁÂ¥H¤UªB¤Í¹ï¥»¤å¥óªºÀ°¦£©M°^Äm¡C

\begin{itemize}
\item  Becky ªº·R¡B¤ä«ù©M½Ì¸Ñ¡C
\item  Tom Sterling, Don Becker, ©M¦bNASA °Ñ»PBeowulf­pµeªºªB¤Í¡C
\item  Thanh Tran-Cong ©M¬[³]{\itshape topcat\/} Beowulf ¾÷¾¹ªº¾÷±ñ¶q´úªº±ÐÂ¾­û¡C
\item  ´£¨Ñ³\¦h«ØÄ³ªº«ü¾É¦Ñ®vChristopher Vance¡C
\item  §ÚªºªB¤Í Russell Waldron ´£¨Ñµ{¦¡¤è­±ªºÂI¤l©M¥L¼ö¤ßªº°Ñ»P¤Î¤ä«ù¡C
\item  §ÚªºªB¤Í David Smith ªº®Õ½Z¡C
\item  ³\¦h¦bBeowulf mailing list¤WªºªB¤Í´£¨Ñªº¤ÏÀ³¤Î«ØÄ³¡C
\item  ©Ò¦³­t³dLinux§@·~¨t²Î©M¦b{\itshape topcat\/}¤Î¨ä¥LBeowulf¾÷¾¹¤W¨Ï¥Î³nÅé®M¥óªºªB¤Í¡C
\end{itemize}





\section{Â²¤¶}



·í®e©ö¨ú±oªº¹q¸£©Mºô¸ôµwÅéªº®Ä¯à´£¤É¡A¨Ã¥B»ù®æ¤£Â_·Æ¸¨¡A§Q¥Î³o¨Ç¥«­±³c°âªº¹q¸£²Õ¸Ë¦¨¥­¦æ¹q¸£´NÅÜ±o«D±`¥i¦æ¡A¦Ó¤£»Ý­nªá¿ú¦b»ù®æ°ª©ùªº¶W¯Å¹q¸£¤W¡C¨Æ¹ê¤WBeowulf¹q¸£ªº»ù®æ®Ä¯à¤ñ¬O¶Ç²Î¶W¯Å¹q¸£ªº¤T­¿¨ì¤Q­¿¡ABeowulf¬[ºc¦bscale¤W¤]¤£¿ù¡A¥¦«Ü®e©ö«Ø¸m¡A§A¥u»Ý­t¾áµwÅé³]³Æªº¶O¥Î¡A¦Ó¤£¶·­t¾á³nÅéªº¶O¥Î¡C




\subsection{½Ö»Ý­n¾\Åª³o¥÷HOWTO¡H}

³o¥÷HOWTO¬O³]­pµ¹¹ïLinux§@·~¨t²Î¦³¨Ç»{ÃÑªº¤H¡A¹ï©óBeowulf§Þ³N¡B§@·~¨t²Î¦³²`¤Jªº»{ÃÑ©Mºô¸ô·§©Àªº¤F¸Ñ³£¤£¬O¥²»Ýªº¡A¦ý¬O¹ï¥­¦æ­pºâ¦³¨Ç¸gÅç¬Oµ´¹ï¦³¦n³Bªº¡]²¦³º§AÁ`»Ý­n¨ÇÂÇ¤f¾\Åª³o¥÷¤å¥ó¡^¡C³o¥÷HOWTO¤å¥óµLªk¦^µªBeowulf¬ÛÃöªº©Ò¦³°ÝÃD¡A¦ý¬O§Æ±æ¯à´£¨Ñ¤@¨Ç·Qªk¡A¨Ã¥B»â¾É§A¨«¦V¥¿½Tªº¤è¦V¡A³o¥÷¤å¥óªº¥Øªº¬O´£¨Ñ¬ÛÃöªº­I´ºª¾ÃÑ¡A©M¤@¨Ç§ó²`¤Jªº°Ñ¦Ò¤å¥ó¡C




\subsection{¤°»ò¬OBeowulf¡H}

{\itshape Famed was this Beowulf: far flew the boast of him, son of Scyld,
in the Scandian lands.  So becomes it a youth to quit him well with
his father's friends, by fee and gift, that to aid him, aged, in after
days, come warriors willing, should war draw nigh, liegemen loyal: by
lauded deeds shall an earl have honor in every clan.\/} 
Beowulf¬O¥Î­^¤å®Ñ¼gªº³Ì¦­¥v¸Ö¡A´y­z¤@­Ó¾Ö¦³¯«¤O©M«i®ðªº­^¶¯¤Hª«¡X¥_¼ÚªZ¤Ò¡A©M¥L¤O¾Ô©ÇÃ~Grendelªº¬G¨Æ¡A  °Ñ¨£\ref{history} {(History)} ¥i¥H§ä¨ì§ó¦h¦³Ãö¥_¼ÚªZ¤Òªº¨ÆÂÝ¡C

Beowulfªº©w¸q¥i¯à©M«Ø³yªÌ©ÎBeowulf¶W¯Å¹q¸£¨Ï¥ÎªÌ¤@¼Ë¦h¡A¦³¨Ç«ÅºÙ°ß¦³©MNASA­ì«¬¾÷¬Û¦P¤~ºÙ¬°Beowulf¡A¤]¦³¤H»{¬°¥u­n¦b¤@¸s¤u§@¯¸¤W°õ¦æ¥­¦æµ{¦¡´N¥i¥HºÙ¬°Beowulf¡C§Ú¹ïBeowulfªº©w¸q¬O¤¶©ó¤GªÌ¤§¶¡¡A¥D­n®Ú¾ÚBeowulf
mailing list¤Wªº¤@¨Ç±i¶K¶l¥ó¡C



Beowulf¬O¤@ºØ¥Î¨Ó§@¥­¦æ­pºâªº¹q¸£¸s¬[ºc¡A³q±`¬O¥Ñ¤@¥x¦øªAºÝ©M¤@¥x¥H¤W¥Î¤áºÝ³z¹L¤A¤Óºô¸ô©Î¨ä¥Lºô¸ô³s±µªº¨t²Î¡A¥¦¬O¥Î¥«­±³c°âªºµwÅé¡]¹³¬O¸Ë¦³Linuxªº­Ó¤H¹q¸£¡^¡B¼Ð·Ç¤A¤Óºô¸ô¥d©M¥æ´«¦¡¶°½u¾¹¡A¥¦¤£¥]§t¥ô¦ó¯S®íªºµwÅé³]³Æ¡A¬O¥i¥H­«·s»s³y¡CBeowulf¨Ã¥B¨Ï¥Î®e©ö¨ú±oªº³nÅé¡A¦pLinux§@·~¨t²Î¡BPVM(Parallel
Virtual Machine)©MMPI(Message Passing Interface¡^¡C¦øªAºÝ±±¨î¾ã­Ó¹q¸£¸s¡A´£¨Ñ¥Î¤áºÝÀÉ®×ªA°È¡A¥¦¨Ã¥B¤]¬O¹q¸£¸sªº±±¨î¥x©M³q°T¹h¡A´£¨Ñ¹ï¥~³s±µªº¥X¤f¡C¤j«¬ªºBeowulf¹q¸£¸s¥i¯à¤£¥u¤@¥x¦øªAºÝ¡A¥i¯à¦³¨Ç¹q¸£¦³¯S©w¥Î³~¡A¨Ò¦p±±¨î¥x©ÎºÊµø¯¸¡A¥Î¤áºÝ¦b¤j¦h¼Æ±¡ªp¤U¬O¤£°µÃB¥~ªº¨Æ±¡¡AÃB¥~¨Æ±¡°µªº¶V¤Ö¶V¦n¡C¥Î¤áºÝ¬O¥Ñ¦øªAºÝ³W¹º©M±±¨î¡A¥u°µ¥¦­Ì³Q¤À¬£ªº¤u§@¡C¦b¤@­ÓµLµwºÐ¥Î¤áºÝªº¬[ºc¡A¥Î¤áºÝ¬Æ¦Ü¤£¥²ª¾¹D¦U¦ÛªºIP¦ì§}©Î¦WºÙ¡A¤@ª½¨ì¦øªAºÝ§iª¾¬°¤î¡CBeowulf©M¤u§@¯¸¸s³Ì¤jªº®t²§ÂI¦b©óBeowulf¬Ý°_¨Ó¤ñ¸û¹³¤@¥x¾÷¾¹¡A¦Ó¤£¬O³\¦h¥x¤u§@¯¸¡C¦b¤j³¡¤À±¡§Î¥Î¤áºÝ¤£»Ý­n³Æ¦³Áä½L©M¿Ã¹õ¡A¥u»Ý­n³z¹L»·ºÝµn¤J©Î§Ç¦C¦¡²×ºÝ¿Ã¹õµn¤J¡ABeowulfªº¥Î¤áºÝ¥iµø¬°³B²z¾¹©M°O¾ÐÅéªº²Õ¦X¡A´O¤J¤@­Ó¹q¸£¸s¤º¡A´N¹³³B²z¾¹©Î°O¾ÐÅé¼Ò²Õ³Q´O¤J¥D¾÷ªO¤W¡C





 Beowulf¤£ÄÝ©ó¯S©w³nÅé®M¥ó¡B¹ñ·sªººô¸ô©Ý¼³©Î¬O³Ì·sªº®Ö¤ßÀb«È¡ABeowulf¬O¤@®M¦ê³sLinux¹q¸£¦¨¶W¯ÅµêÀÀ¥­¦æ¹q¸£ªº§Þ³N¡AÁöµM¦³³\¦hªº¬ÛÃö³nÅé®M¥ó¡A¦p­×§ï¹Lªº®Ö¤ß¡BPVM©MMPIµ{¦¡®w¥H¤Î³W¹º¤u¨ã¡]¥i¥HÅýBeowulf¬[ºc§ó§Ö³t¡B«K±¶¦a³W¹º¨t²Î¡^¡A¥ô¦ó¤H¤]³£¥i¥H¥u¾aLinux¼Ð·Ç®M¥ó¡A¤£»Ý­nÃB¥~ªº»²§U´N¥i¥H«Ø¥ß¤@®M¼Ð·ÇªºBeowulf¾÷¾¹¡C°²¦p§A¦³¤G¥x¤w¸g¤WºôªºLinux¹q¸£¡A¨Ã¥B¥i¥H³z¹LNFS¦@¥Î{\ttfamily /home} ÀÉ®×¨t²Î©M°õ¦ærsh¡]remote
shells¡^«ü¥O¡A³o¼Ë§A¥i¥Hºâ¬O¾Ö¦³¤@¥xÂ²³æªºÂù¸`ÂIBeowulf¾÷¾¹¡C






\subsection{¤ÀÃþ}

Beowulf¨t²Î¤w¸g¥Ñ¦UºØ¤£¦P³¡¥÷²Õ¦¨¡A¬°¤F®Ä¯àªº¦Ò¶q¡A¤@¨Ç«D°Ó«~¤Æ©PÃä³]³Æ¡]¥u¥Ñ¤@®a»s³y°Ó¥Í²£¡^¤w¸g°Ý¥@¡A¬°¤F©ö©ó¸Ñ»¡©M°Q½×¦UºØ¤£¦PÃþ«¬ªº¨t²Î¡A§Ú­Ì´£¥X¤U¦CÂ²³æªº¤ÀÃþ¤è¦¡:

²Ä¤@ÃþBEOWULF:

³oÃþ¾÷¾¹§¹¥þ¥Ñ°Ó«~¤Æ¡Bª½±µ±q¥«­±¤W³c°âªº¹s¥ó©Ò²Õ¦¨¡A§Ú­Ì¥Î¹q¸£ÁÊ¶RªÌ¡]Computer
Shopper¡^»{©w¼Ð·Ç¨Ó©w¸q°Ó«~¤Æ¡Bª½±µ±q¥«­±¤W³c°âªº¹s¥ó¡]¹q¸£ÁÊ¶RªÌ¬O¤@ºØ¨C¤ë¥Xª©ªºÂø»x¡A¦³¤@­^¦T«p¡A¤º®e¤¶²Ð¦UºØ¹q¸£¨t²Î©M¹s¥ó¥Ø¿ý¡^¡A»{©w¼Ð·Ç¦p¤U:

A ²Ä¤@ÃþBeowulf¬O¤@ºØ¾÷¾¹¡A¥¦ªº²Õ¦¨¹s¥ó¦Ü¤Ö¥²¶·¦b¤TºØ°ê»Ú©Ê©Î¥þ²y©Ê°Ó·~¥Ø¿ý¤W§ä¨ì¡C

²Ä¤@Ãþ¨t²Îªº¦n³B¦³:
\begin{itemize}
\item  µwÅé³]³Æ¦³«Ü¦h¨Ó·½¡]»ù®æ§C¡B®e©öºûÅ@¡^
\item  ¤£·|¨Ì¿à¯S©w¤@®aµwÅé¨ÑÀ³°Ó
\item  Linux¤ä´©ªºÅX°Êµ{¦¡
\item  ³q±`¦³¤@¼Ð·Ç°òÂ¦¡]¦pSCSI¡BEthernetµ¥¡^
\end{itemize}


²Ä¤@Ãþ¨t²Îªº¯ÊÂI¦³:
\begin{itemize}
\item »Ý­n²Ä¤GÃþ¨t²ÎªºµwÅé¤~¦³¸û¦nªº®Ä¯à
\end{itemize}


²Ä¤GÃþBEOWULF

¥ô¦ó¨S¦³³q¹L¹q¸£ÁÊ¶RªÌ»{©w¼Ð·Çªº¾÷¾¹ºÙ¤§¡C³o¨Ã¤£¤@©w¬O¥óÃa¨Æ¡A¥¦¥u¬O¤ÀÃþªº¤@ºØ¡C

²Ä¤GÃþ¨t²Îªº¦n³B¦³:
\begin{itemize}
\item ®Ä¯à¬Û·í¦a¦n
\end{itemize}


²Ä¤GÃþ¨t²Îªº¯ÊÂI¦³ :
\begin{itemize}
\item  ÅX°Êµ{¦¡ªº¨ÑÀ³¸g±`§ó´«
\item  ¨Ì¿à¯S©w¤@®aµwÅé¨ÑÀ³°Ó
\item  ¥i¯à¤ñ²Ä¤@Ãþ¨t²Î©ù¶Q
\end{itemize}


¨S¦³¤@ºØÃþ§O¤ñ¨ä¥LªºÀu¨q¡A¥þ¾Ì¨Ï¥ÎªÌªº»Ý¨D©M¹wºâ¡A³oºØ¤ÀÃþ¯Âºé§Æ±æÅý±µ¤U¨Óªº°Q½×§ó¥[Â²©ú¡A«áÀYªº¨t²Î³]­p³¹¸`±N·|À°§U§A¨M©w­þ¤@ºØ¨t²Î³Ì²Å¦X§Aªº­n¨D¡C










\section{¬[ºcÂ²¤¶}






\subsection{¥¦ªø¤°»ò¼Ë¡H}

§Ú»{¬°´y­zBeowulf¶W¯Å¹q¸£¬[ºc³Ì¦X¾Aªº¤èªk¬OÁ|¤@­Ó¯u¹êªº½d¨Ò¡A¨Ã¥B¬O¤j¦h¼Æ¨t²ÎºÞ²zªÌ©Ò¼ô±xªº¡C¨º´N¬O¤@­ÓUNIX¥D¾÷¹êÅç«Ç¡A¤º¦³¤@¥x¦øªAºÝ©M¤@¸s¥Î¤áºÝ¡A§óºë·Ç¦a»¡¡A§Ú·|Á|¦ì¦b«n©ø¤hÄõ¤j¾Ç²z¾Ç°|DEC
Alpha¤j¾Ç³¡­pºâ¾÷¹êÅç«Ç¬°¨Ò¡A¦øªA¾¹³QºÙ¬° {\itshape beldin\/} ¥Î¤áºÝ¾÷¾¹¤À§OºÙ¬° {\itshape scilab01\/}, {\itshape scilab02\/},
{\itshape scilab03\/}, ¤@ª½¨ì {\itshape scilab20\/}.  ¨C¥x¥Î¤áºÝ¤º³¡³£¦w¸ËDigital
Unix 4.0§@·~¨t²Î¡A¦ý¬O¨Ï¥ÎªÌÀÉ®×ªÅ¶¡¡]{\ttfamily /home}¡^©M {\ttfamily /usr/local} ³£¬O³z¹LNFS¡]ºô¸ôÀÉ®×¨t²Î¡^±q¦øªAºÝ¤WÀò±o¡A¨C­Ó¥Î¤áºÝ³£¥i¥H¶i¤J¦øªAºÝ¡A¨Ã¥B©Ò¦³¨ä¥Lªº¥Î¤áºÝ³£·|°O¸ü¦b
{\ttfamily /etc/hosts.equiv} ÀÉ®×¤º¡A¦]¦¹¨C­Ó¥Î¤áºÝ³£¥i¥H¥Î»·ºÝ¾Þ§@´ß¡]rsh¡^¡C¦øªAºÝ¤]¬O¾ã­Ó¹êÅç«ÇªºNIS¦øªA¾¹¡A¦]¦¹©Ò¦³ªº¾÷¾¹³£¦³¬Û¦Pªº±b¸¹¸ê®Æ¡A¬Y¤H¥i¥H§¤¦b{\itshape scilab02\/}ªº±±¨î¥x«eµn¤J¡A´N¹³¥Lµn¤J¦øªAºÝ©Î{\itshape scilab15\/}.  ¤@¼Ë¦³¬Û¦PªºÀô¹Ò¡A©Ò¦³ªº¥Î¤áºÝ¦³¬Û¦PÀô¹Òªº­ì¦]¦b©ó©Ò¦³ªº¾÷¾¹³£¦w¸Ë©M³W¹º¬Û¦Pªº§@·~¨t²Î¡A¨Ã¥B¨Ï¥ÎªÌªº{\ttfamily /home}
©M {\ttfamily /usr/local} °Ï°ì¹êÅé¤W³£¦ì¦b¦øªAºÝ¤W¡A¥i¥H³z¹LNFS¶i¤J¡CNIS©MNFS§ó¶i¤@¨Bªº
°T®§½Ð°Ñ¾\ \onlynameurl{NIS} ©M \onlynameurl{NFS}
HOWTOs.






\subsection{¦p¦ó¦³®Ä§Q¥Î¨ä¥L¸`ÂI¡H}



²{¦b§Ú­Ì¹ï¨t²Î¬[ºc¦³¨Ç·§©À¡AÅý§Ú­Ì¬Ý¬Ý¦p¦ó¨Ï¥Î­pºâ¾÷¹êÅç«Ç¤º¥i¨Ñ¨Ï¥ÎªºCPU¡C¥ô¦ó¤H¥i¥Hµn¤J¥ô¦ó¤@¥x¾÷¾¹¡A¨Ã¥B¦b¨C­Ó¤H¦Û¤vªº¥Ø¿ý¤U°õ¦æµ{¦¡¡A¥L­Ì¤]¥i¥H³z¹L»·ºÝ¾Þ§@´ß¦b¨ä¥L¹q¸£¤W±Ò°Ê¡]spawn¡^¬Û¦Pªºµ{¦¡¡CÁ|¨Ò¨Ó»¡¡A°²³]§Ú­Ì­n­pºâ1¨ì10¤º¾ã¼Æ¥­¤è®ÚªºÁ`©M¡A§Ú­Ì¼g¤F­ÓÂ²³æªºµ{¦¡¦W¬° {\ttfamily sigmasqrt} ¡]½Ð°Ñ¨£\ref{sigmasqrt} {(source code)}) ¡A¬°¤F±o¨ìµ²ªG¡A§Ú­Ì°õ¦æ¥H¤Uªº¨BÆJ
\begin{verbatim}
[jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 10
22.468278

real    0m0.029s
user    0m0.001s
sys     0m0.024s
\end{verbatim}

{\ttfamily time} «ü¥O¥i¥H§i¶D§Ú­Ì°õ¦æµ{¦¡©Òªáªº®É¶¡¡]¹ê»Ú¸g¹Lªº®É¶¡¡^¡A§Ú­Ì¥i¥H¬Ý¨ì¡A³o­Ó¨Ò¤l¥uªá¤F«Üµuªº®É¶¡¡]0.029¬í¡^¡A°²¦p§Ú·Q­pºâ1¨ì1,000,000,000¤º¾ã¼Æªº¥­¤è®ÚÁ`©M¡AÅý§Ú­Ì¸Õ¸Õ¬Ý¡A­«·s­pºâ©Òªáªº®É¶¡

\begin{verbatim}
[jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 1000000000
21081851083600.559000

real    16m45.937s
user    16m43.527s
sys     0m0.108s
\end{verbatim}




³o¦¸°õ¦æµ{¦¡©Òªáªº®É¶¡«D±`¤[¡A¤@­Ó©úÅãªº°ÝÃD´N¬O§Ú­Ì¦p¦ó¥[§Ö°õ¦æªº®É¶¡¡H§Ú­Ì¸Ó¦p¦ó§ïÅÜ°õ¦æµ{¦¡ªº¤è¦¡¥H´î¤Ö°õ¦æ©Òªáªº®É¶¡¡H³Ì©úÅãªºµª®×´N¬O±N¾ã­Ó¤u§@¤À¦¨³\¦h¤p¤u§@¡A¨Ã¥B¦P®É¦b©Ò¦³ªº¹q¸£¤W°õ¦æ¡A§Ú­Ì¥i¥H±N¥[ªkªº¤u§@¤À¦¨¤G¤Q¥÷¡A¨C­Ó³¡¥÷°µ¤@¬q¶}®Ú¸¹ªº¤u§@¡A¨Ã¥[°_¨Ó¡A·í©Ò¦³ªº¸`ÂI§¹¦¨­pºâ¡A¨Ã¶Ç¦^¨Ó¡A±N¤G¤Q­Ó¼Æ¥[°_¨Ó´N±o¨ì³Ì«áªºµª®×¡C¦b°õ¦æµ{¦¡¤§«e¡A§Ú­Ì»Ý­n°µ­Ó¼Ð¦³°O¸¹ªº¿é°eºÞ¡A¥i¥HÅý©Ò¦³ªº¦æµ{¼g¤U¥¦­Ìªºµ²ªG¡C

\begin{verbatim}
[jacek@beldin sigmasqrt]$ mkfifo output
[jacek@beldin sigmasqrt]$ ./prun.sh & time cat output | ./sum
[1] 5085
21081851083600.941000
[1]+  Done                    ./prun.sh

real    0m58.539s
user    0m0.061s
sys     0m0.206s
\end{verbatim}


³o¦^§Ú­Ìªá¤F¤j¬ù58.5¬í¡A³o®É¶¡¬O±q¶}©l¨ì©Ò¦³ªº¸`ÂI³£§¹¦¨­pºâ¡A¨Ã±Nµ²ªG¼g¨ì¿é°eºÞ¡A³o­Ó®É¶¡¨Ã¤£¥]¬A³Ì«á±N¤G¤Q­Ó¼Æ¥[°_¨Ó¡A¤£¹L¨º­Ó®É¶¡«D±`¦aµu¡A¥i¥H©¿²¤¤£­p¡C§Ú­Ì¥i¥H¬Ý¨ì¥­¦æ­pºâ¥i¥H¦³®Ä¦a§ï¶i°õ¦æµ{¦¡¡A¨Æ¹ê¤W³o­Ó¥­¦æ¤u§@¾ã¾ã§Ö¤F¬ù17­¿¡A¬Û¹ï©ó¨Ï¥Î¤F¤G¤Q­¿CPU¼Æ¥Ø¡A®Ä¯à¬O¬Û·í¦X²zªº¡C¤W­z½d¨Òªº¥Øªº¬O­n®i¥Ü¦P®É¥­¦æµ{¦¡³ÌÂ²³æªº¤èªk¡A¹ê»Ú¾Þ§@¤W¡A¦p¦¹Â²³æªº½d¨Ò¬O«Ü¤Ö¨£ªº¡A¨ä¥L§Þ¥©¡]PVM©MMPI
APIs¡^¸g±`¥Î¨Ó¹F¦¨¥­¦æªº¤u§@¡C






\subsection{Beowulf¦p¦ó»PCOW¤£¦P¡H}

¤W­zªº­pºâ¾÷¹êÅç«Çºâ¬O¤@­Ó¤u§@¯¸¸s¡]Cluster of Workstations¡ACOW¡^¡A¨º»òBeowulf¦³¦ó¤£¦P¡H¥¦©MCOW¦³¦ó®t²§¡H¹ê»Ú¤W¤GªÌ¨S¦h¤j®t§O¡A¤£¹LBeowulf­Ë¬O¦³¨Ç¤£¦Pªº¯S¦â¡C²Ä¤@¡B¤j¦h¼ÆªºBeowulf¸sªº¥Î¤áºÝ¨S¦³Áä½L¡B·Æ¹«¡BÅã¥Ü¥d©M¿Ã¹õ¡A©Ò¦³¨ì¥Î¤áºÝªº¤è¦¡³£¬O±q¦øªAºÝ¡B¯S©w±±¨îºÝ©Î¬O§Ç¦C±±¨îºÝ¸g¹L»·ºÝ³s±µµn¤J¡A¦]¬°¹ï¥Î¤áºÝ¦Ó¨¥¡A±q¹q¸£¸s¥~µn¤J¹q¸£©Î¬O±q¥~ÀYªº¹q¸£ª½±µµn¤J¥Î¤áºÝ¬O¨S¦³¥²­nªº¡A¥Î¤áºÝ³q±`¬O¨Ï¥Î¨p¦³ªºIP¦ì§}¡A¨Ò¦p±q10.0.0.0¨ì10.0.0.8©Î¬O192.168.0.0¨ì192.168.0.16¡]°Ñ¨£RFC 1918 \onlynameurl{http://www.alternic.net/rfcs/1900/rfc1918.txt.html}).  ³q±`°ß¤@­n¥Î¨ì²Ä¤G±iºô¸ô¥d¹ï¥~³s±µªº¾÷¾¹¬O¦øªAºÝ¡A¨Ï¥Î³o®M¹q¸£¸s³Ì±`¨£ªº¤èªk¬Oª½±µ¶i¤J¦øªAºÝ¡A©Î¬O±q­Ó¤H¤u§@¯¸¨Ï¥Îtelnet©Î»·ºÝµn¤J¦øªAºÝ¡C¤@¦ý¶i¤J¦øªAºÝ¡A¨Ï¥ÎªÌ¥i¥H½s¿è©M½sÄ¶¥L­Ìªºµ{¦¡¡A¤]¥i¥H¦b¹q¸£¸s¤ºªº¥Î¤áºÝ¤W±Ò°Ê¦æµ{¡C¤j¦h¼Æ±¡§ÎªºCOW¬O¦b±ß¤W¥Î¨Ó°õ¦æ¥­¦æ­pºâ¡A©M¦b¤H­Ì¤£¨Ï¥Î¤u§@¯¸ªº¶g¥½®É¶¡¡A¨Ï¥Î¶¢¸mªºCPU¡C¦Ó³q±`Beowulf±M¥Î¨Ó¥­¦æ­pºâ¡A¨Ã¥B¹ï³o¨Ç¥­¦æ­pºâ°µ³Ì¨Î¤Æ¡A·í§Q¥Î¥«°â¹q¸£¹s²Õ¥ó©M§K¶O³nÅé«ØºcªºBeowulf¤]´£¨Ñ¸û¦nªº»ù®æ®Ä¯à¤ñ¡A¨Ã¥BBeowulfµ¹¤H¤@ºØ³æ¤@¨t²Îªº¦L¶H¡A«Ü®e©öÅý¨Ï¥ÎªÌ±NBeowulf¸s¬Ý§@¬O¤@¥x­pºâ¥Î¤u§@¯¸¡C






\section{¨t²Î³]­p}

¦bÁÊ¶R¥ô¦óµwÅé³]³Æ¤§«e¡A«ä¦Ò¦p¦ó³]­p§A­nªº¨t²Î¬O«D±`­«­nªº¡A°ò¥»¤W¦b³]­p¤@®MBeowulf¨t²Î¦³¨â¶µµwÅé³]³ÆªºÄ³ÃD
: §A±N¨Ï¥Îªº¸`ÂI©ÎºÙ¹q¸£ªº¾÷«¬©M³s±µ¸`ÂIªº¤è¦¡¡A¥u¦³¤@ºØ³nÅéÄ³ÃD·|¼vÅT§A­n¿ï¾ÜªºµwÅé³]³Æ¡A´N¬O³q°T¥Îµ{¦¡®w©ÎºÙAPI¡A§ó¸Ô²ÓªºµwÅé³]³Æ©M³q°T³nÅé°Q½×±N·|¦b¥»¤å¥ó«áÀY¡C

·í¿ï¾Ü©Ê¤£¦hªº®É­Ô¡A¦³´X¼Ë­«­nªº³]­p¨M©w¥²¶·°µªº¡A¦]¬°¥­¦æ­pºâªº¬ì¾Ç¡]©ÎºÙ¬°ÃÀ³N¡^¦³«Ü¦hºØ¤è¦¡¸ÑÄÀ¡Aµy«á¦³§@Â²¤¶¡A°²¦p§A¤£·Q¬Ý¤@¨Ç­I´º¸ê®Æ¡A¥i¥H¸õ¹L¥»¸`¡A¦ý¬O«ØÄ³§A¦b°µµwÅé³]³Æ³Ì«áªº¨M©w¤§«e¡A³Ì¦n¥ý¾\Åª \ref{suitability} {(¥i¾A©Ê¡]Suitability¡^)} ¡C




\subsection{¥­¦æ­pºâªº­I´º¤¶²Ð}

¥»¸`´£¨Ñ¤@¨Ç¥­¦æ­pºâÆ[©Àªº°ò¥»ª¾ÃÑ¡A³oµ´¤£¬O¥­¦æ­pºâ¬ì¾Ç©M§Þ³Nªº¸Ô²Ó´y­z¡A³o¥u¬O¥­¦æ­pºâ¤¤»PBeowulf³]­pªÌ©M¨Ï¥ÎªÌ¬ÛÃöªº¤@¨ÇÂ²¤¶¡C

·í§A­n³]­p©M«Øºc¦Û¤vªºBeowulf¡A¤U¦C§Y±N´y­zªº³\¦h¶µÄ³ÃD¦b§A°µ¨M©wªº¹Lµ{¤¤±N·|ÅÜ±o«D±`­«­n¡A»F¦]©ó¥¦ªº¹s¥ó¯S©Ê¡A¤@­ÓBeowulf¶W¯Å¹q¸£¥i³Q§Ú­Ì©Ò´x±±¡A¤@¨Ç¦]¯À´N±o¥J²Ó¦Ò¶q¡A¤@¯ë¨Ó»¡¡A¥­¦æ­pºâ©Ò²o§èªºÄ³ÃD¨Ã¤£¤ÓÃø¤F¸Ñ¡Aªº½T¦p¦¹¡A¤@¥¹¤F¸Ñ³o¨ÇÄ³ÃD¡A­Ó¤Hªº´Á«Ý±N·|¹ê½î¡A¦¨¥\±N§ó®e©ö¹ê²{¡C¤£¹³´`§Çªº¥@¬É¡A³B²z¾¹ªº³t«×¬O°ß¤@³Ì­«­nªº¦]¯À¡A¦b¥­¦æªº¥@¬É¤¤¡A³B²z¾¹³t«×¥u¬O¨M©w¾ã­Ó¨t²Î®Ä¯à©M®Ä¯q¼Æ­Ó¦]¯À¤§¤@¡C






\subsection{¥­¦æ­pºâªº¤èªk}

¥­¦æ­pºâ¥i¤À¦¨¦n´XºØÃþ«¬¡A±q¨Ï¥ÎªÌÆ[ÂI¡A¦Ò¼{¨CºØÃþ«¬ªºÀu¯ÊÂI³£«Ü­«­n¡A±µ¤U¨Óªº³¹¸`¹Á¸Õ´£¨Ñ¥­¦æ­pºâ¤èªkªºÆ[ÂI¡A¨Ã«ü¥XBeowulf¾÷¾¹¬OÄÝ©ó­þºØ¡C




\subsubsection{¬°¤°»ò­n¤@Áû¥H¤Wªº³B²z¾¹?}

¦^µª³o­Ó°ÝÃD¬O«Ü­«­nªº¡A¥Î¤KÁûCPU¶]¤å®Ñ³B²z³nÅéÅ¥°_¨Ó¦ü¥G¦³ÂI±þÂû¥Î¤û¤M¡X¹ê»Ú¤W¤]¬O³o¼Ë¡C¨º¨ä¥L¹³¬Oweb
server¡Bdatabase¡Brendering program©Î¬Oproject scheduler¡HÃB¥~ªºCPU¥i¯à¦³©ÒÀ°§U¡C½ÆÂøªº¼Æ­È¼ÒÀÀ¤S¦p¦ó¡H¬yÅé°Ê¤O¾Ç½X©Î¬Odata
mining application¡A¦b³o¨Çª¬ªp¤U¡AÃB¥~ªºCPUµ´¹ï¬O»Ý­nªº¡Aªº½T¡A¦h³B²z¾¹¥i¥H¥Î¨Ó¸Ñ¨M§ó¦h°ÝÃD¡C

±µ¤U¨Óªº°ÝÃD³q±`¬O¡u¬°¤°»ò§Ú»Ý­n¤G©Î¥|ÁûCPU¡H§Ú¥i¥Hµ¥·¥³tªº986¥X²{¡C¡v¡A¦³¤U¦C´X­Ó­ì¦]¥i¥H¦^µª³o­Ó°ÝÃD:
\begin{enumerate}
\item  ¥Ñ©ó¨Ï¥Î¦h¤u§@·~¨t²Î¡A¹q¸£¥i¥H¦P®É°µ«Ü¦h¨Æ±¡¡A¥u­n¦³¤@Áû¥H¤W§C»ùCPU´N¥i¥H¹F¨ì³Ì¦ÛµMªº¥­¦æ¤Æ¡C
\item  ³B²z¾¹ªº³t«×¨C¤Q¤K­Ó¤ë´N¼W¥[¤@­¿¡A¦ý¬O°O¾ÐÅé©MµwºÐªº³t«×©O¡H«Ü¤£©¯¦a¡A¥¦­Ìªº³t«×¼W¥[¦a¨Ã¨S¦³CPU§Ö¡A§Ú­Ì¥²¶·°O±o¡A¤j¦h¼ÆªºÀ³¥Î³nÅé³£§Q¥Î¨ìcache¥H¥~ªº°O¾ÐÅé©MµwºÐ¡A¥­¦æ¤Æ¬O¥i¥HÂ\²æ³o¨Ç­­¨îªº¤@ºØ¤èªk¡C
\item  ¹w­p¦b2005¦~¤§«á¡A³B²z¾¹ªº³t«×±N¤£·|¦A¨C¤Q¤K­Ó¤ë´N¼W¥[¤@­¿¡A­n¹F¨ì³oºØ´¿¥[³t«×ªºÁÍ¶Õ¡A¤¤¶¡ÁÙ¦³³\¦h»ÙÃª¡C
\item  ¥­¦æ­pºâ¥i¥H¦³2­¿¨ì500­¿³t«×ªº´£¤É¡]¦³®É§ó§Ö¡^¡A³o¥þ¬Ý°õ¦æªºÀ³¥Îµ{¦¡¡C³oºØ´£¤É¬OµLªk³æ¾a³æ¤@³B²z¾¹¡A§Y¨Ï¬O´¿¸g¤@«×¨Ï¥Î¯S§O³]­p¶W§Ö³B²z¾¹ªº¶W¯Å¹q¸£¡A¦p¤µ¤]¬O¥Î¦hÁû¥«°â¥BÀH¤â¨ú±oªºCPU©Ò²Õ¦¨¡C
\end{enumerate}


°²¦p§A¦]¬°¹J¨ì­pºâ­­¨î¡]computer bound¡^©Î¬O¿é¥X¢A¿é¤J­­¨î¡]I/O bound¡^¦Ó»Ý­n³t«×¡A¥­¦æ¬O­È±o¦Ò¼{ªº¤èªk¡A¦]¬°¥­¦æ­pºâ¥i¥H¦³«Ü¦h¤è¦¡¡A¥­¦æ¦a¸Ñ¨M§Aªº°ÝÃD±N­n«ä¦Ò³\¦h­«­nªº§à¾Ü¡A³o¨Ç§à¾Ü·|ÄY­«¼vÅTÀ³¥Îµ{¦¡ªº¥iÄâ©Ê¡B®Ä¯à©M§A©Òªáªº®É¶¡¡Bºë¯«¥H¤Îª÷¿ú¡C

¦b§Ú­Ì¤F¸Ñ¥­¦æ­pºâªº§Þ³N¤§«e¡AÅý§Ú­Ì¥ý¬Ý¬Ý¼ô±xªº¯u¥¿¥­¦æ­pºâ°ÝÃDªº¹ê¨Ò¡X¦b©±ªù«e¤j±ÆªøÀs¡C 




\subsubsection{¥­¦æ­pºâªº°Ó©±}

·Q·Q¬Ý¤@­ÓÂd¥x«e¦³¤K¥x¦P®É¨Ï¥Î¦¬»È¾÷ªº¤j«¬°Ó©±¡A°²³]¨C­Ó¦¬»È¾÷´N¬O¤@ÁûCPU¡A¨C­Ó«È¤H´N¬O¤@­Ó¹q¸£µ{¦¡¡A¹q¸£µ{¦¡ªº¤j¤p¡]¤u§@ªº¦h¹è¡^´N¬O¨C­Ó«È¤H¿ïÂIªº¦h¤Ö¡A±µ¤U¨Ó©Ò§@Ãþ¤ñªº¤è¦¡´N¬O­n»¡©ú¥­¦æ­pºâªºÆ[©À¡C




\paragraph{³æ¤u§@·~¨t²Î}

¥u¦³¤@¥x¦¬»È¥x¥´¶}¡A¤@¦¸¥u¯à³B²z¤@­Ó«È¤H¡C

½d¨Ò : MS DOS




\paragraph{¦h¤u§@·~¨t²Î}

¥u¦³¤@¥x¦¬»È¾÷¥´¶}¡A¦ý¬O²{¦b¤@¦¸³B²z¤@­Ó«È¤H¿ïÂIªº¤@³¡¥÷¡AµM«á²¾¨ì¤U­Ó«È¤H¡A³B²z¥L¿ïÂIªº¤@³¡¥÷¡A¨C­Ó¤H¦ü¥G¦P®É³£¦³¦b²¾°Ê¡A°²¦p¨S¦³¨ä¥L¤H¦b±Æ¶¤¡A«Ü§Ö´N·|½ü¨ì§A¡C

½d¨Ò : UNIX¡A¨Ï¥Î³æ¤@CPUªºNT¡C




\paragraph{¦hÁûCPU¥B¦h¤u§@·~¨t²Î}

²{¦b§Ú­Ì±N¨ä¥Lªº¦¬»È¾÷¥´¶}¡A¨C­Ó«È¤H³£¦³¤@¥x¦¬»È¾÷ªA°È¡A³o®É±Æ¶¤ªº¶¤¥î²¾°Ê¦a«Ü§Ö¡A³oºÙ¬°SMP¡X¹ïºÙ¦¡¦h¦æµ{¡CÁöµM¦³ÃB¥~ªº¦¬»È¾÷¥´¶}¡A¦ý¬Oµ´§Ö¤£¹L¥u¦³¤@¥x¦¬»È¾÷©M¤@­Ó«È¤H¡C 

½d¨Ò : UNIX¡A¨Ï¥Î¦hCPUªºNT






\paragraph{¦h¤u¦hCPUªººü¡]thread¡^}

°²¦p±N§A¿ïÂIªº¶µ¥Ø©î¶}¨Ó¡A¦h¥x¦¬»È¾÷¦P®É¨Ï¥Î°O±b¡A§A´N¥i¥H§ó§Ö¤@ÂI¡C­º¥ý§Ú­Ì±o°²³]§A¶R¤F«Ü¦hªF¦è¡A¦]¬°§Aªá¦b©î¶}¶µ¥Øªº®É¶¡¥²¶·¥Ñ¦h¥x¦¬»È¾÷¸ÉÀv¦^¨Ó¡A²z½×¤W¡A§A¥i¥H¤ñ¥H«e§ÖN­¿¡AN¬O¦¬»È¾÷ªº¥x¼Æ¡C·í¦¬»È­û»Ý­n±o¨ì¨ä¥L³¡¥÷ªº¤p­p®É¡A¥L­Ì¥i¥H³z¹L¥æ½Í©ÎÆ[±æ¨ä¥L¦¬»È¾÷¡A«Ü§Ö¦a¥æ´«¥L­Ì©Ò»Ý­nªº¸ê°T¡A¥L­Ì¬Æ¦Ü¥i¥H¥´±´¨ä¥Lªº¦¬»È¾÷¡A§ä´M»Ý­nªº¸ê®Æ¡A¨Ï±o¤u§@§ó§Ö¨Ç¡CµL½×¦p¦ó³£ÁÙ¬O¦³¨Ç­­¨î¡A¤]´N¬O³o®a©±¦b¦U­Ó¦a¤è¥i¥H¦³®Ä¦a©ñ¸m¦h¤Ö¥x¦¬»È¾÷¡C

Amdals©w«ß¤]¨ÏÀ³¥Îµ{¦¡¼W§Öªº³t«×±N¨ü­­¦b´`§Çµ{¦¡¤¤³ÌºCªº³¡¥÷¡C 

½d¨Ò ¡GNUIX©Î¬O¦b¬Û¦P¥D¾÷ªO¤Wªº¦hCPUªºNT¨Ã¥i¥H°õ¦æ¦hºü¡]multi-threaded¡^µ{¦¡¡C






\paragraph{¦b¦h¤u§@·~¨t²Î¤W¦V¨ä¥LCPU¶Ç»¼°T®§}

¬°¤F§ïµ½®Ä¯à¡A©±®a¦b«áÀY¤S¼W¥[¤F¤K¥x¦¬»È¾÷¡A¦]¬°·sªº±b³æÂ÷«e¤èÂd¥x«Ü»·¡A¦¬»È­û¥²¶·¥Î¹q¸Ü±N¤p­p§i¶D«e¤èÂd¥x¡A°£¤F¶Ç»¼¥~¡AÁÙ¥[¤WÃB¥~®É¶¡ªº­t¾á¡A¦ý¬O°²¦p¶Ç»¼®É¶¡«Üµu¡A¥¦±N¤£·|³y¦¨°ÝÃD¡C°²¦p©p­n¶RªºªF¦è«Ü¦h¡A»Ý­n©Ò¦³ªº¦¬»È¾÷¡A³o®É¦b¨Ï¥Î©Ò¦³¦¬»È¾÷¨Ó§ï¶i¦¬±bªº³t«×¤§«e¡AÃB¥~ªº®É¶¡­t¾á¤´¶·¦Ò¼{¶i¥h¡C¦³®É­Ô¡A¬Y¨Ç°Ó©±¦b¦U­Ó¨¤¸¨¥u³æ¿W©ñ¸m¤@¥x¦¬»È¾÷¡A¨C­Ó¦¬»È¾÷´N¥u¯à³z¹L¹q¸ÜÁpÃ´¡A³o®É¥¦­Ì©Ò¦bªº¦ì¸m´N¤£­«­n¤F¡C

½d¨Ò¡G¦h¥xUNIX©Î¦hCPUªºNT¡A¥i¯à¦b¦P¤@±i¥D¾÷ªO©Î³\¦h¥D¾÷ªO¤W¡A©¼¦¹¯à¬Û¤¬ÁpÃ´¡C

¤W­z»¡©úÁöµM¤£°÷ºë·Ç¡A¦ý¹ï¥­¦æ¨t²Îªº­­¨î¨Ó»¡¡Aºâ¬O¤£¿ùªº´y­z¡A¤£¹³³æ¤@CPUªº¶Ç»¼¤´¬O­ÓÄ³ÃD¡C




\subsection{¥­¦æ­pºâªº¬[ºc}

¥­¦æ­pºâªº¤èªk©M¬[ºc±N¦b¤U¸`¤¶²Ð¡AÁöµM´y­z±N·|«Ü¼sªx¡A¦ý¬O¤]¨¬¥H¤F¸ÑBeowulf³]­pªº¤@¨Ç¬ÛÃöÄ³ÃD¡C 




\subsubsection{µwÅé¬[ºc}



¦bµwÅé¤W¦³¤GºØ°ò¥»ªº¥­¦æ¹q¸£¡G

\begin{enumerate}
\item  ¦Û¦³°O¾ÐÅé¾÷¾¹¡A¤§¶¡¥i¥H¥æ´«¸ê°T¡]Beowulf ¹q¸£¸s¡^¡C
\item  ¦@¨É°O¾ÐÅé¾÷¾¹¡A³z¹L°O¾ÐÅé¶Ç»¼¸ê®Æ¡]SMP¾÷¾¹¡^¡C
\end{enumerate}


¨å«¬ªºBeowulf¬O¥Ñ¤@¸s³æCPU¾÷¾¹²Õ¦¨¡A³z¹L°ª³t¤A¤Óºô¸ô³s±µ¡A©Ò¥HºÙ¬°¦Û¦³°O¾ÐÅé¾÷¾¹¡C4
way SMP¬O¤@¥x¦@¨É°O¾ÐÅé¾÷¾¹¡A¥i¥Î¨Ó§@¥­¦æ­pºâ¡A¥­¦æªºÀ³¥Î³nÅé³z¹L¦@¨É°O¾ÐÅé¶Ç»¼¸ê®Æ¡C¥H¹q¸£³c°â©±°µ¤ñ³ë¡A¦Û¦³°O¾ÐÅé¾÷¾¹¡]³æ¿W¼È¦s±b³æ¡^¦bCPU¼Æ¶q¤W¥i¥H«Ü¦h¡A¦ý¬O¦@¨É°O¾ÐÅé¾÷¾¹¥Ñ©ó°O¾ÐÅéªºÃö«Y¡ACPUªº¼Æ¥Ø¬O¦³­­¨îªº¡C 

¦ý¬O³s±µ¦h¥x¦@¨É°O¾ÐÅé¾÷¾¹¬O¥i¦æªº¡A³o¨Ç²V¦X¦¡¦@¨É°O¾ÐÅé¾÷¾¹¹ï¨Ï¥ÎªÌ¬Ý°_¨Ó´N¹³¤@¥x¤j«¬ªºSMP¡A¸g±`ºÙ§@¾q°¨¡]NUMA¡Anon
uniform memory access¡A«D§¡¤Ã°O¾ÐÅéµn¤J¡^¡A¦]¬°¨Ï¥ÎªÌ¬Ý¨ìªº¬O¤@¶ô¤j°O¾ÐÅé¡A¥Ñ©Ò¦³ªºCPU¦@¨É¡A¦³µÛ¦UºØ¤£¦Pªº©µ¿ð¡]latencies¡^¡C¦b¬YºØµ{«×¤W¡A¾q°¨¾÷¾¹¤¤¦U­Ó¦Û¦³¦@¨É°O¾ÐÅé¤§¶¡¬O¥²¶·¤¬¬Û¶Ç»¼°T®§¡C

§âSMP¾÷¾¹·í§@¦Û¦³°O¾ÐÅéªº­pºâ¸`ÂI¡A¨Ã±N¥¦­Ì³s±µ°_¨Ó¬O¦³¥i¯àªº¡C¨å«¬ªº²Ä¤@Ãþ¥D¾÷ªO¥i¥H¦³¤GÁû©Î¥|ÁûCPU¡A¨Ï¥Î³oÃþ¹q¸£³q±`¥i¥H­°§C¾ãÅéªº¦¨¥»¡ALinux¤º³¡±Æ§Ç¨M©w¦p¦ó¦@¨É³o¨ÇCPU¡A¦b³o­Ó¶¥¬q¡A¨Ï¥ÎªÌµLªk«ü©w©Ò­n°õ¦æªº¤u§@¥Ñ­þ­ÓCPU­t³d¡A¦ý¬O¨Ï¥ÎªÌ¥i¥H¦P®É°õ¦æ¤G­Ó¤£¬Û¤zªº¦æµ{¡A©Î¬O¤@­Ó¦³ºüªº¦æµ{¡]threaded processes¡^¡A¨Ã§Æ±æ®Ä¯à¤ñ¤@­ÓCPUªº¨t²Î¦n¡C




\subsubsection{³nÅéAPI¬[ºc}

°ò¥»¤W¦³¤GºØ¤è¦¡¥i¥H¦bµ{¦¡¤ºªí²{¥X¦P®Éªº¯S©Ê¡G
\begin{enumerate}
\item  ¦b³B²z¾¹¤§¶¡¨Ï¥Î°T®§¶Ç°e¡C
\item  ¨Ï¥Î¨t²Îªººü
\end{enumerate}


¤´¦³§OºØ¤èªk¡A¦ý¬O³o¤GºØ¬O³Ì±`¥Îªº¡C¦³¤@ÂI¥²¶·ª`·N¡A´N¬O¦P®É¤£»Ý­n¥Ñ©³¼hªºµwÅé©Ò±±¨î¡A°T®§©Mºü³£¥i¥H¦bSMP¡B¾q°¨SMP©M¹q¸£¸s¤W¨Ï¥Î¡A¦ý¦p¤W©Ò­z¡A®Ä¯à©M¥iÄâ©Ê¤´¬O­«­nªºÄ³ÃD¡C




\paragraph{°T®§}

±q¾ú¥vªºÆ[ÂI¨Ó¬Ý¡A°T®§¶Ç»¼ªº§Þ³N¤ÏÀ³¥X¦­´Á¦Û¦³°O¾ÐÅé¥­¦æ¹q¸£ªº³]­p¹Lµ{¡A·íºü»Ý­n¸ê®Æ®É¡A°T®§³Q­n¨D»Ý­n«þ¨©¡A«þ¨©°T®§ªº©µ¿ð©M³t«×ÅÜ¦¨°T®§¶Ç»¼¼Ò¦¡ªº­­¨î¦]¯À¡C°T®§¶Ç»¼¨ä¹ê¬Û·íÂ²³æ¡A¤@¨Ç¸ê®Æ©M¶Ç»¼ªº¥Øªº¦a¡]³B²z¾¹¡^¡C¤@¯ë±`¨£°T®§¶Ç»¼ªºAPI¦³ \onlynameurl{PVM} ©Î \onlynameurl{MPI}¡A°T®§¶Ç»¼¥i¥H¦b¤@¥xSMP¾÷¾¹©M¹q¸£¸s¤W¦³®Ä¦a¨Ï¥Îºü©M°T®§¡A¬Û¹ï©óºü¡A°T®§¶Ç»¼¦b¤@¥xSMP¤Wªº¦n³B¬O¡A¥¼¨Ó¤@¥¹©p¨M©w­n¨Ï¥Î¹q¸£¸s¡A¥u»Ý­n»´©ö¦a¼W¥[¾÷¾¹¡C




\paragraph{ºü}

§@·~¨t²Îºüªºµo®i¥D­n¦]¬°¦@¨É°O¾ÐÅéªºSMP³]­p¤¹³\µ{¦¡¤¤¦P®Éªº³¡¥÷¥i¥H¦³«Ü§Ö¦a¦@¨É°O¾ÐÅé¶Ç»¼©M°O¾ÐÅé¦P¨B¡Aºü¦bSMP¨t²Î°õ¦æ¦a¤£¿ù¡A³o¬O¦]¬°¶Ç»¼¬O³z¹L¦@¨É°O¾ÐÅé¡A¥Ñ©ó³o­Ó­ì¦]¡A¨Ï¥ÎªÌ¥²¶·±N·í¦aªº¸ê®Æ±q¾ãÅéªº¸ê®Æ¤¤¿W¥ß¥X¨Ó¡A§_«hµ{¦¡±N¤£¯à¥¿½T¦a°õ¦æ¡C¬Û¹ï©ó°T®§¶Ç»¼¡A¦]¬°¸ê®Æ¬O¥Ñ¦æµ{©Ò¦@¨É¡A¤j¶qªº¸ê®Æ«þ¨©¥i¥HÁ×§K¡ALinux¤ä´©POSIXºü¡Aºüªº°ÝÃD¦b©ó«ÜÃøÂX®i¨ì¤@¥xSMP¾÷¾¹¥H¥~¡A³o¬O¦]¬°¸ê®Æ¬O¥ÑCPU©Ò¦@¨É¡A§Ö°{¤@­P©ÊªºÄ³ÃD·|³y¦¨­t¾á¡C±Nºü¦³®Ä¦aÂX®i¨ì¦h¥xSMP¾÷¾¹¥²¶·¥õ¿à¾q°¨§Þ³N¡A¦ý¬O¾q°¨«D±`¯Ó®É¡A¨Ã¥B°ò¥»ªºLinux¬O¤£¤ä´©ªº¡C±Nºü«Øºc¦b°T®§¶Ç»¼¤§¤W¡A´¿¸g¦³¤H°µ¹L (\onlynameurl{(http://syntron.com/ptools/ptools\_pg.htm)})¡A¦ý¬Oºü©M°T®§¶Ç»¼¦b¤@°_´NÅÜ±o®ÄªG¤£¨Î¡C

¥H¤U¬O©M®Ä¯à¦³Ãöªº¸ê°T
\begin{verbatim}
          SMP¾÷¾¹®Ä¯à      ¹q¸£¸s®Ä¯à     ¤ñ¨Ò¼W¥[µ{«×                           
          ---------------     ----------------         ----------------
°T®§          ¦n               ¨Î                 ¨Î

  ºü           ¨Î               ¤£¨}*            ¤£¨}*

* ­n¨D©ù¶Qªº¾q°¨§Þ³N¡C
\end{verbatim}





\subsubsection{À³¥Î³nÅé¬[ºc}

¬°¤F¦b¦hCPU¤U¥­¦æ¦a¶]À³¥Îµ{¦¡¡A¦b¦P®É³¡¥÷¥²¶·³Q¤À¶}¨Ó¡A¤@­Ó¼Ð·Çªº³æCPUÀ³¥Î³nÅé¤£·|¤ñ¥¦¦b¦h³B²z¾¹¤U¶]ªº§Ö¡A¦³¨Ç¤u¨ã©M½sÄ¶¾¹¥i¥H°µ³oºØ¤u§@¡A¦ý¬O±Nµ{¦¡¥­¦æ¤Æ¥i¤£¬O¡§ÀH´¡§Y¥Î¡§¡C³o§¹¥þ©Mµ{¦¡¦³Ãö¡A¦³¨Çµ{¦¡«Ü®e©ö¥­¦æ¤Æ¡A¦³¨Ç¬O·¥«×§xÃø¡A¦³¨Ç±¡§Î¨ü­­©óalgorithmªº¬ÛÃö©Ê¦Ó®Ú¥»¤£¥i¯à°µ¨ì¥­¦æ¡C 

¦b°Q½×³nÅéÄ³ÃD¤§«e¡A¥ý­n¤¶²Ð¦X¾A©ÊªºÆ[©À¡C




\subsection{¦X¾A©Ê¡]Suitability¡^\label{suitability}}

Ãö¥­¦æ­pºâªº¤j¦h¼Æ°ÝÃD³£¦³¬Û¦Pªºµª®×¡G

¥þ©MÀ³¥Îµ{¦¡¥»¨­¦³Ãö¡C

¦b§Ú­Ì¶i¤J³o­ÓÄ³ÃD¤§«e¡A¦³¤@­Ó«D±`­«­nªº¤£¦PÂI»Ý­nÂç²M¡X¦P®É¡]CONCURRENT¡^©M¥­¦æ¡]PARALLEL¡^¤§¶¡ªº®t²§©Ê¡A¬°¤F¤è«K°Q½×°_¨£¡A§Ú­Ì¥ý©w¸q³o¤G­ÓÆ[©À¡G

µ{¦¡¤º¦P®Éªº³¡¥÷¬O«ü¥i¥H³æ¿W­Ó§O­pºâªº³¡¥÷¡C

µ{¦¡¤º¥­¦æªº³¡¥÷¬O«ü¨º¨Ç¥i¥H¦b¦P¤@®É¶¡¤º¤À§O¥Ñ¤£¦P³B²z¾¹°õ¦æªº¦P®É³¡¥÷¡C

¤GªÌ¬Û²§ªº¦a¤è¬O«D±`­«­n¡A¦]¬°¦P®É¬Oµ{¦¡¥»¨­ªº¯S©Ê¡A¦Ó¦³®Äªº¥­¦æ«h¬O¾÷¾¹ªº¯S©Ê¡A²z·Qª¬ªp¤U¡A¸û§Öªº®Ä¯à»F¦]©ó¥­¦æ°õ¦æ¡A¥­¦æ®Ä¯àªº­­¨î¦]¯À¦b©ó­pºâ¸`ÂI¤§¶¡ªº¶Ç»¼³t«×©M©µ¿ð¡]©µ¿ð¤]·|¥X²{¦bºüSMPÀ³¥Î³nÅé¡A¥D­n¨Ó¦Û©ó§Ö°{¡]cache¡^ªº¤@­P©Ê¡^¡C¤j¦h¼Æ³q¥Îªº¥­¦æ´ú¸Õ®M¥ó³£¦³«Ü°ªªº¥­¦æ©Ê¡A¶Ç»¼©M©µ¿ð³£¤£¬O²~ÀV¡A³oÃþ°ÝÃD¥i¥HºÙ§@¡§Åã¦Ó©ö¨£ªº¥­¦æ¡§¡]obviously
parallel¡^¡A¨ä¥LªºÀ³¥Î³nÅé´N¨S¨º»òÂ²³æ¡A¥­¦æ¦a°õ¦æµ{¦¡¤¤ªº¦P®É³¡¥÷¥i¯à·|³y¦¨µ{¦¡¶]±o¸ûºC¡A©è®ø±¼¨ä¥L¦P®É³¡¥÷©Ò±o¨ìªº®Ä¯à¡CÂ²³æ»¡¡A¶Ç»¼©Òªá¶Oªº®É¶¡¥²¶·±q»ü¬Ùªº­pºâ®É¶¡¸ÉÀv¡A§_«h¥­¦æ°õ¦æ¦P®É³¡¥÷·|«Ü¤£¸gÀÙ¡C   

µ{¦¡³]­pªÌªº¤u§@¬O­n¨M©wµ{¦¡­þ¨Ç¦P®Éªº³¡¥÷À³¸Ó¥­¦æ¤Æ¡A­þ¨Ç«h¤£­n¡C³o±N·|¨M©wÀ³¥Îµ{¦¡ªº®Ä¯à¡A¤U­±ªº¹Ï¹ïµ{¦¡³]­pªÌ°µ¤F¨ÇÁ`µ²¡C

\begin{verbatim}

¦ûÀ³¥Îµ{
¦¡ªº¦Ê¤À¤ñ

         | *
         | *
         | *
         | *
         |  *
         |  *
         |  *
         |  *
         |    *
         |     *
         |      *
         |        ****
         |            ****
         |                ********************
         +-----------------------------------
                     ¶Ç»¼®É¶¡ / ­pºâ®É¶¡
\end{verbatim}


¦b¤@­Ó²z·Qªº¥­¦æ¹q¸£¡A¶Ç»¼©M­pºâ¤GªÌ¬Û·í¡A¥ô¦ó¦P®É³£¥i¥H¥­¦æ¤Æ¡A«Ü¤£©¯¦a¡A¯u¹êªº¥­¦æ¹q¸£¡]¥]¬A¦@¨É°O¾ÐÅé¾÷¾¹¡^³£¹³¤W¹Ï©Ò¥Ü¡C·í³]­pBeowulf®É¡A¨Ï¥ÎªÌ¥²¶·¨c°O³o¹Ï¡A¦]¬°¹ï¤@¯S©w¥­¦æ¹q¸£¡A¥­¦æ®Ä¯à¨M©w©ó¶Ç»¼®É¶¡©M­pºâ®É¶¡¤§¤ñ¡AÀ³¥Îµ{¦¡¥i¯à¥i¥H¦b¦UºØ¥­¦æ¹q¸£¤W°õ¦æ¡A¦ý¬O¤£¯à«OÃÒ¤@©w·|¦³¸û¨Îªº®Ä¯à¡C

¤@¯ë¨Ó»¡¡A¨S¦³¬J¥iÄâ©Ê¤S¦³®Ä¯àªº¥­¦æµ{¦¡¡C

¤W¹ÏÁÙ¦³¨ä¥Lªº©µ¦ùÄ³ÃD¡A·í®Ä¯à¨ú¨M©ó¶Ç»¼©M­pºâ¤ñ¡A§ïÅÜ¤ñ­È¤¤ªº¬Y¤@¶µ¤£ªí¥Ü¤@©w¥i¥H´£°ª®Ä¯à¡C§ïÅÜ³B²z¾¹ªº³t«×¡A¦ý¤£§ïÅÜ¶Ç»¼ªº³t«×¡Aµ{¦¡¥i¥H¦³¨Sª½Ä±©Êªº®ÄªG¡CÁ|¨Ò¨Ó»¡¡ACPU³t«×´£¤É¤G­¿©Î¤T­¿¡A¦ý«O«ù¶Ç»¼³t«×¡A¥i¯à¨Ï©pªºµ{¦¡¦³¸û¦nªº¥­¦æ®ÄªG¡A¤ñ´`§Ç°õ¦æ§ó¦³®Ä¡Athat
is, it may now be faster to run the previousloy PARALLEL parts as SEQUENTIAL¡C§ó¶i¤@¨B¡A¥­¦æ¦a°õ¦æ¨S¦³®Ä²vªº³¡¥÷¡A¥i¥H¨Ï©pªºµ{¦¡µLªk¹F¨ì³Ì§Öªº³t«×¡A¦]¦¹¡AÂÇ¥Ñ¼W¥[§ó§Öªº³B²z¾¹¡A©p¥i¥HÅýµ{¦¡ºC¤U¨Ó¡]©p¥¿Åý·sªºCPU¤£¥Î¥¦³Ì§Öªº³t«×°õ¦æµ{¦¡¡^¡C

¤É¯Å¨ì§ó§ÖªºCPU¥i¯à¤Ï¦Ó­°ºC©pªºµ{¦¡³t«×¡C

¦]¦¹¡A¥²¶·ª¾¹D©p¬O§_¥i¥H¥Î¥­¦æµwÅéÀô¹Ò¡A©p¥²¶·¹ï©pªºµ{¦¡¦b¤@¯S©w¹q¸£¤Wªº¥i¾A©Ê¦³¬Û·íªº»{ÃÑ¡A©p¥²¶·ª¾¹D¬Û·í¦hªºÄ³ÃD¡A¥]¬ACPU³t«×¡B½sÄ¶¾¹¡B°T®§¶Ç»¼ªºAPI¡Bºô¸ôµ¥µ¥¡C½Ðª`·N¡A¥u»{ÃÑÀ³¥Îµ{¦¡¬O¤£°÷ªº¡A©p¥²¶·«ü¥Xµ{¦¡¤¤­pºâ¶q³Ì­«ªº³¡¥÷¡A¦ý¬O©p¤£ª¾¹D³o­Ó³¡¥÷ªº¶Ç»¼ªá¶O¡A¹ï¯S©w¨t²Î¡A¥¦ªº¶Ç»¼©Òªáªº®É¶¡¥i¯àµLªkÅýµ{¦¡µLªk¦³®Ä¦a¥­¦æ¤Æ¡C

   
³Ì«á­n»¡¤@¨Ç±`µo¥Íªº¿ù»~Æ[©À¡A§Ú­Ì¸g±`»¡¡G¤@­Óµ{¦¡³Q¥­¦æ¤Æ¡A¦ý¬O¯u¹êªº±¡§Î¬Oµ{¦¡ªº¦P®É³¡¥÷¤~³Q¥­¦æ¤Æ¡A±q¥H¤Wªº»¡©ú¡A¤@­Óµ{¦¡¨Ã¨S¦³¥­¦æ¤Æ¡A¥­¦æ¤Æªº®Ä¯q¬O¾÷¾¹ªº¯S©Ê¡C  






\subsection{¼¶¼g©M²¾´Ó¥­¦æ³nÅé}

¤@¥¹©p¨M©w»Ý­n¥­¦æ­pºâ¡A¨Ã¥B·Q­n³]­p©M¬[³]¤@®MBeowulf¡A®Ú¾Ú¤W­zªº°Q½×¨Ó«ä¦Ò¤@¨Ç©M©pªºÀ³¥Îµ{¦¡¦³Ãöªº«ØÄ³±N¬O­Ó«Ü¦nªº¥D·N¡C 

¤@¯ë¦Ó¨¥¡A¦³¨â¥ó¨Æ©p¯à°÷°µªº¡G
\begin{enumerate}
\item ª½±µ¬[³]²Ä¤@ÃþBeowulf¡AµM«á·Q¿ìªkÅý©pªºÀ³¥Îµ{¦¡¨Ó¾AÀ³³o®M¨t²Î¡A©ÎªÌ¦bBeowulf¤Wª½±µ¶]¤@­Ó²{¦¨ªº¥­¦æÀ³¥Îµ{¦¡¡]¥²¶·ª`·N¤W­z©Ò´£ªº¥iÄâ©Ê©M®Ä¯àªºÄ³ÃD¡^¡C
\item ¥ý«ä¦Ò¤@¤U©p±N­n¦b©pªºBeowulf¤W¶]ªºÀ³¥Îµ{¦¡¡AµM«á¦ô­p¦óºØÃþ«¬ªºµwÅé©M³nÅé¬O©p©Ò»Ý­nªº¡C
\end{enumerate}


¨âºØ±¡§Î©p³£­n¦Ò¼{®Ä¯àªºÄ³ÃD¡A¤@¯ë¦Ó¨¥¡A¦³¤T¥ó¨Æ©p»Ý­n°µ¡G
\begin{enumerate}
\item  ¨M©w©pªºµ{¦¡¤¤ªº¦P®É³¡¥÷¡C
\item  ¦ô­p¥­¦æ®Ä¯à¡C
\item  ´y­z¥Xµ{¦¡¤¤ªº¦P®É³¡¥÷¡C
\end{enumerate}


Åý§Ú­Ì¤@¤@¸Ô­z¡C




\subsubsection{¨M©w©pªºµ{¦¡¤¤ªº¦P®É³¡¥÷}

³o­Ó¨BÆJ³q±`¬O­n¦Ò¼{±N©pªºµ{¦¡¥­¦æ¤Æ¡A¦p¦ó¥­¦æ¤Æ±N¦b²Ä¤G­Ó¨BÆJ¡A²{¦b©p­n¨M©w¸ê®ÆªºÃö³s©Ê¡C

{$>$}±q¹ê»Ú¾Þ§@ªº¨¤«×¨Ó¬Ý¡AÀ³¥Îµ{¦¡¥i¯à¦³¤GºØ§ÎºAªº¦P®É©Ê¡G­pºâ¡]¼Æ¦rªº­pºâ¡^©MI/O¡]¸ê®Æ®w¡^¡CÁöµM¤j³¡¤À±¡§Î¡A­pºâ©MI/O¦P®É©Ê¬O¬Û¤¬¥¿¥æªº¡]orthogonal¡^¡A¦ý¬O¦³¨Çµ{¦¡¬O¨âªÌ³£»Ý­n¡A¦³¨Ç¤u¨ãµ{¦¡¥i¥H¹ï²{¦³ªºµ{¦¡°µ¦P®É©Êªº¤ÀªR¡A³o¨Ç¤u¨ã¤j³¡¤À¬O¬°Fortranµ{¦¡»y¨¥³]­pªº¡A¨Ï¥ÎFortran»y¨¥¦³¨âºØ²z¥Ñ¡G«Ü¦­¥H¨Ó¡A¤j³¡¤Àªº¼Æ¦r­pºâµ{¦¡¬O¥ÎFortran»y¨¥¼gªº¡A¥t¥~Fortran¬O«Ü®e©ö¤ÀªRªº¡C°²¦p¨S¦³¥i§Q¥Îªº¤u¨ã¡A³o­Ó¨BÆJ¹ï²{¦sªºÀ³¥Îµ{¦¡±N¬O«D±`§xÃø¡C




\subsubsection{¦ô­p¥­¦æ®Ä¯à}

¨S¦³¤u¨ãµ{¦¡ªºÀ°§U¡A³o­Ó¨BÆJ±N»Ý­n¤£Â_¦a¹Á¸Õ¿ù»~¡A©Î¬O®Ú¾ÚÂÂ¦³¸gÅç¨Ó²q´ú¡C°²¦p©p¤ß¥Ø¤¤¤w¸g¦³¯S©wªºÀ³¥Îµ{¦¡¡A·Q­n¨M©w³o­ÓÀ³¥Îµ{¦¡¬OCPU­­¨î¡]­pºâ­­¨î¡^¡AÁÙ¬OµwºÐ­­¨î¡]I/O­­¨î¡^¡A®Ú¾Ú©pªº»Ý¨D¡A©pªºBeowulf¥i¯à·|¦³«Ü¤jªº®t²§¡CÁ|¨Ò¨Ó»¡¡A¤@­Ó­pºâ­­¨îªº°ÝÃD¥i¯à»Ý­n¤@¨Ç«Ü§ÖªºCPU¡A°ª³t¥B§C©µ¿ðªººô¸ô¡A¦ý¬O¤@­ÓI/O­­¨îªº°ÝÃD¥i¯à»Ý­n¸ûºCªºCPU©M°ª³t¤A¤Óºô¸ô¡C

³o­Ó«ØÄ³¥O¤j¦h¼Æ¤HÄ±±o«Ü³Y²§¡A¤@¯ëªº·Qªk¬O³B²z¾¹¶V§Ö¶V¦n¡A³o·Qªk·íµM¬O¥¿½Tªº¡A¦ý¬O©p¥²¶·­n¦³¤£¨ü­­¨îªº¹wºâ¸g¶O¡A¹ê»Ú±¡§Î¬O­n¦b¦³­­ªº¸g¶O±o¨ì³Ì°ª®Ä¯àªº¨t²Î¡A¹ï¤@­ÓI/O­­¨îªº°ÝÃD¡A¤w¦³²{¦¨ªº³W«h¡]ºÙ§@Eadline-Dedkov©w«ß¡^¥i¨Ñ§Q¥Î¡C

¹ï¨â®M¦³¬Û¦P²Ö¿nCPU®Ä¯à«ü¼Æªº¥­¦æ¹q¸£¦Ó¨¥¡A¤@­Ó¾Ö¦³¸ûºC³B²z¾¹¡]¤@­Ó¸ûºCªº³B²z¾¹¶¡ªº¶Ç¿éºô¸ô¡^¹ïI/O¥D¾ÉªºÀ³¥Îµ{¦¡±N·|¦³¸û¨Îªº®Ä¯à¡C

­nÃÒ©ú³o¶µ³W«h±N·|¶W¥X¥»¤å¥óªº½d³ò¡A©p­YÄ±±o¦³½ì¡A¥i¥H¤U¸ü³o½g½×¤å {\itshape I/O¥D¾ÉÀ³¥Îµ{¦¡¦b¥­¦æ¹q¸£¤Wªº®Ä¯à¦Ò¶q¡]Performance
Considerations for I/O-Dominant Applications on Parallel
Computers¡^\/} (Postscript ®æ¦¡ 109K ) \onlynameurl{(ftp://www.plogic.com/pub/papers/exs-pap6.ps)}

¤@¥¹©p¤w¸g¨M©wµ{¦¡¤¤ªº¦P®É©Ê¬O¦óºØ§ÎºA¡A©p±N»Ý­n¦ô­p¤@¥¹¥­¦æ³B²zªº¸Ü¡A®Ä¯à±N·|¦p¦ó¡C°Ñ¨£ \ref{software} {(Software)} ¦³¹ï³nÅé¤u¨ãªº´y­z¡C

­Y¨S¦³³o¨Ç¤u¨ã¡A©p¥i¥H³z¹L³o­Ó¨BÆJ¡A¦Û¦æ¦Ò¶q¡A°²¦p¨C¦¸­pºâ¬O¥H¤ÀÄÁ­p¡A¸ê®Æ¶Ç¿é«h¥H¬í­p¡A¨º¥¦±N¬O«Ü¦nªº¥­¦æ¹ï¶H¡A¦ý¬O°O¦í¡A°²¦p©p±N16¤ÀÄÁªº­pºâ®É¶¡©î¦¨32¥÷¡A¦Ó¨C¥÷ªº¸ê®Æ¶Ç»¼»Ý­n¼Æ¬íÄÁ¡A¨º»ò¨Æ±¡±NÅÜ±oÄY­«¡C




\subsubsection{´y­z¥Xµ{¦¡¤¤ªº¦P®É³¡¥÷}

¦³´XºØ¤èªk§ä¥Xµ{¦¡¤¤ªº¦P®É³¡¥÷¡G
\begin{enumerate}
\item  ©ú½T¦a¥­¦æ°õ¦æ
\item  Áô§t¦a¥­¦æ°õ¦æ
\end{enumerate}


³o¤GªÌ¥D­nªº®t§O¦b©ó©ú½T¦a¥­¦æ¤Æ¨ú¨M©ó¨Ï¥ÎªÌ¡AÁô§t¦a¥­¦æ¤Æ¨ú¨M©ó½sÄ¶¾¹¡C




\paragraph{©ú½Tªº¤èªk}

¦³¤@¨Ç°ò¥»ªº¤èªk¬O­n¾a¨Ï¥ÎªÌ±M¬°¥­¦æ¹q¸£¨Ó­×§ï­ì©l½X¡A¨Ï¥ÎªÌ¥²¶·¨Ï¥Î \onlynameurl{PVM} ©Î
\onlynameurl{MPI}¦bµ{¦¡¤º¼W¥[¸ê°T¡A ©Î
¬O¨Ï¥ÎPOSIXºü¡]µL½×¦p¦ó­n¨c°O¤ß¤¤¡AºüµLªk¦bSMP¥D¾÷ªO¤§¶¡²¾°Ê¡^¡C

©ú½Tªº¤èªk¦b¹ê¦æ©M°£¿ù¤W³Ì¬°§xÃø¡A¨Ï¥ÎªÌ³q±`¦b¼Ð·ÇFortran 77©Î C/C++­ì©l½X¤¤¥[¤J¨ç¦¡¡CMPIµ{¦¡®w¥[¤J¤@¨Ç¨ç¦¡¡A¨Ï±o¤@¨Ç¼Ð·Ç¥­¦æ¤èªk®e©ö¹ê¦æ¡]¨Ò¦p¤À´²©M¦¬¶°¨ç¦¡¡^¡A¥t¥~ÁÙ¥i¥H¨Ï¥Î¤w¸g³Q¥­¦æ¤Æªº¼Ð·Çµ{¦¡®w¡CµL½×¦p¦ó­n±N¥iÄâ©Ê©M®Ä¯à¤§¶¡ªº¥­¿Å¨c°O¤ß¤¤¡C

  
±q¾ú¥v¤Wªº²z¥Ñ¡A¤j¦h¼Æ¼Æ­È­pºâªºµ{¦¡¬O¥ÎFortran»y¨¥©Ò¼gªº¡A¦]¦¹¦b¥­¦æ­pºâ¤¤¡AFortran¬O¨ü³Ì¤jªº¤ä´©¡]¤u¨ã¡Bµ{¦¡®wµ¥¡^¡C²{¦b¤j¦h¼Æªºµ{¦¡³]­pªÌ³£¬O¥ÎC»y¨¥¡A©Î¬O»{¬°C»y¨¥¥i¥H°õ¦æ¦a§ó§Ö¡A¦Ó¥ÎC»y¨¥­«·s§ï¼g²{¦sªºFortranÀ³¥Îµ{¦¡¡C¥Ñ©óC»y¨¥³Ì±µªñ³q¥Îªº¾÷¾¹»y¨¥¡AC»y¨¥¸û§Ö¥i¯à¬O¥¿½Tªº¡A¦ý¬O¥¦¤]¦³¤@¨Ç­«­nªº¯Ê³´¡CC»y¨¥¨Ï¥Î«ü¼Ð¡]pointer¡^·|Åý¸ê®Æ¬ÛÃö©Êªº¨M©w·¥«×§xÃø¡A¦Û°Ê¤ÀªR«ü¼Ð¤]¬O·¥«×§xÃø¡A°²¦p©p¦³²{¦¨ªºFortranµ{¦¡¡A¨Ã¥B¥¼¨Ó·Q­nÅÜ¦¨¥­¦æµ{¦¡¡X¤d¸U¤£­n§â¥¦Âà¦¨C»y¨¥¡C




\paragraph{Áô§tªº¤èªk}

Áô§t¤èªk¬O¨Ï¥ÎªÌ©ñ±ó¤@¨Ç©Î¥þ³¡©ñ±ó¦Û¦æ¥­¦æ¡A§ï¥Î½sÄ¶¾¹ªº¤@ºØ¤èªk¡A¨Ò¦p FORTRAN 90¡A °ª®Ä¯àFrotran
(High Performance Fortran¡AHPF), ¤j¶q¨ó¦P¥­¦æ¡]Bulk Synchronous Parallel¡ABSP)ÁÙ¦³³\¦h¥¿¦bµo®i·í¤¤¡C



Áô§t¤èªk¤´­n¨D¨Ï¥ÎªÌ¹ï©óµ{¦¡¦P®Éªº¯S©Ê´£¨Ñ¤@¨Ç¸ê°T¡A¦ý¬O½sÄ¶¾¹¥²¶·¹ï¦p¦ó¥­¦æ¦a°õ¦æ¦P®É©Ê°µ¥X³\¦h¨M©w¡A³o¨Ç¤èªk´£¨Ñ¬YºØµ{«×ªº¥iÄâ©Ê©M®Ä¯à¡A¦ý¬O¹ï¤@­Ó¥­¦æ½sÄ¶¾¹¡A¤´µM¨S¦³¤@­Ó³Ì¦nªº¤èªk¨Ó´y­z¦P®É©Êªº°ÝÃD¡C






\section{Beowulf¸ê·½}






\subsection{°_ÂI}



\begin{itemize}
\item Beowulf mailing list.  ¥u­n¹q¤l¶l¥ó±H¨ì \onlynameurl{beowulf-request@cesdis.gsfc.nasa.gov} ¡A¦b¶l¥ó¤º®e¶ñ¤W
{\itshape subscribe\/} ¡C
\item Beowulf ºô­¶ \onlynameurl{http://www.beowulf.org}
\item Extreme Linux \onlynameurl{http://www.extremelinux.org}
\item ¦bRedHatºô¯¸¤WªºExtreme Linux ³nÅé \onlynameurl{http://www.redhat.com/extreme}
\end{itemize}







\subsection{¤å¥ó}



\begin{itemize}
\item Beowulf HOWTO³Ì·sª©¥» \onlynameurl{http://www.sci.usq.edu.au/staff/jacek/beowulf}.
\item ¬[³]¤@­ÓBeowulf¨t²Î \onlynameurl{http://www.cacr.caltech.edu/beowulf/tutorial/building.html}
\item Jacekªº Beowulf ³sµ² \onlynameurl{http://www.sci.usq.edu.au/staff/jacek/beowulf}.
\item Beowulf¦w¸ËºûÅ@HOWTO \onlynameurl{http://www.sci.usq.edu.au/staff/jacek/beowulf}.
\item Linux¥­¦æ­pºâHOWTO \onlynameurl{http://yara.ecn.purdue.edu/\~{}pplinux/PPHOWTO/pphowto.html}
\end{itemize}







\subsection{¬ÛÃö½×¤å\label{papers}}



\begin{itemize}
\item Chance Reschke, Thomas Sterling, Daniel Ridge, Daniel Savarese,
Donald Becker, and Phillip Merkey {\itshape A Design Study of Alternative
Network Topologies for the Beowulf Parallel Workstation\/}.
Proceedings Fifth IEEE International Symposium on High Performance
Distributed Computing, 1996. \onlynameurl{http://www.beowulf.org/papers/HPDC96/hpdc96.html}

\item Daniel Ridge, Donald Becker, Phillip Merkey, Thomas Sterling
Becker, and Phillip Merkey. {\itshape Harnessing the Power of Parallelism in
a Pile-of-PCs\/}.  Proceedings, IEEE Aerospace, 1997. \onlynameurl{http://www.beowulf.org/papers/AA97/aa97.ps}

\item Thomas Sterling, Donald J. Becker, Daniel Savarese, Michael
R. Berry, and Chance Res. {\itshape Achieving a Balanced Low-Cost
Architecture for Mass Storage Management through Multiple Fast
Ethernet Channels on the Beowulf Parallel Workstation\/}.
Proceedings, International Parallel Processing Symposium, 1996.
\onlynameurl{http://www.beowulf.org/papers/IPPS96/ipps96.html}

\item Donald J. Becker, Thomas Sterling, Daniel Savarese, Bruce
Fryxell, Kevin Olson. {\itshape Communication Overhead for Space Science
Applications on the Beowulf Parallel Workstation\/}.
Proceedings,High Performance and Distributed Computing, 1995.
\onlynameurl{http://www.beowulf.org/papers/HPDC95/hpdc95.html}


\item Donald J. Becker, Thomas Sterling, Daniel Savarese, John
E. Dorband, Udaya A. Ranawak, Charles V.  Packer. {\itshape BEOWULF: A
PARALLEL WORKSTATION FOR SCIENTIFIC COMPUTATION\/}.  Proceedings,
International Conference on Parallel Processing, 95.
\onlynameurl{http://www.beowulf.org/papers/ICPP95/icpp95.html}
\item Papers at the Beowulf site \onlynameurl{http://www.beowulf.org/papers/papers.html}

\end{itemize}







\subsection{³nÅé\label{software}}

\begin{itemize}
\item PVM - Parallel Virtual Machine \onlynameurl{http://www.epm.ornl.gov/pvm/pvm\_home.html}


\item LAM/MPI (Local Area Multicomputer / Message Passing Interface
\onlynameurl{http://www.mpi.nd.edu/lam}
\item BERT77 - FORTRAN conversion tool \onlynameurl{http://www.plogic.com/bert.html}
\item Beowulf software from Beowulf Project Page \onlynameurl{http://beowulf.gsfc.nasa.gov/software/software.html}
\item Jacek's Beowulf-utils \onlynameurl{ftp://ftp.sci.usq.edu.au/pub/jacek/beowulf-utils}
\item bWatch - cluster monitoring tool \onlynameurl{http://www.sci.usq.edu.au/staff/jacek/bWatch}
\end{itemize}









\subsection{Beowulf¾÷¾¹}

\begin{itemize}
\item Avalon ¬O¥Ñ 140¥xAlpha ³B²z¾¹²Õ¦¨¡A36GB°O¾ÐÅé¡A¥i¯à¬O³Ì§ÖªºBeowulf¾÷¾¹¡A­pºâ³t«×°ª¹F47.7Gflops¡A¦b¥þ¥@¬É«e¤­¦Ê§Öªº¾÷¾¹¤¤±Æ¦W²Ä114¡C
\onlynameurl{http://swift.lanl.gov/avalon/}
\item Megalon-A Massively PArallel CompuTer Resource (MPACTR)¥Ñ14¥x­Ó¤H¹q¸£²Õ¦¨¡A¨C¥x¹q¸£¤º¦³¥|ÁûPentium Pro200³B²z¾¹¡AÁ`¦@¦³14GB°O¾ÐÅé
\onlynameurl{http://megalon.ca.sandia.gov/description.html}
\item HIVE - Highly-parallel Integrated Virtual Environment ¬O¥t¤@®M°ª³tªºBeowulf¶W¯Å¹q¸£¡A¦³64­Ó­pºâ¸`ÂI¡A¦@­p128Áû³B²z¾¹¡A4GB°O¾ÐÅé¡C
\onlynameurl{http://newton.gsfc.nasa.gov/thehive/}
\item Topcat ¬O¤@®M¤ñ¸û¤p«¬ªº¾÷¾¹¡AÁ`¦@¦³16Áû³B²z¾¹©M1.2GB°O¾ÐÅé¡C
\onlynameurl{http://www.sci.usq.edu.au/staff/jacek/topcat}
\item MAGI cluster ¬O­Ó¦³½ìªººô¯¸¡A¤º¦³³\¦h¦³½ìªº³sµ²¡C
\onlynameurl{http://noel.feld.cvut.cz/magi/}
\end{itemize}









\subsection{¨ä¥L¦³½ìªººô¯¸}



\begin{itemize}
\item SMP Linux \onlynameurl{http://www.linux.org.uk/SMP/title.html}
\item Paralogic - Buy a Beowulf \onlynameurl{http://www.plogic.com}
\end{itemize}





\subsection{¾ú¥v\label{history}}

\begin{itemize}
\item  Legends - Beowulf  \onlynameurl{http://legends.dm.net/beowulf/index.html}
\item  The Adventures of Beowulf  \onlynameurl{http://www.lnstar.com/literature/beowulf/beowulf.html}
\end{itemize}





\section{­ì©l½X}




\subsection{sum.c\label{sum}}

\begin{verbatim}
/* Jacek Radajewski jacek@usq.edu.au */
/* 21/08/1998 */

#include <stdio.h>
#include <math.h>

int main (void) {

  double result = 0.0;
  double number = 0.0;
  char string[80];
  

  while (scanf("%s", string) != EOF) {

    number = atof(string);
    result = result + number;
  }
    
  printf("%lf\n", result);
  
  return 0;
  
}
\end{verbatim}





\subsection{sigmasqrt.c\label{sigmasqrt}}

\begin{verbatim}
/* Jacek Radajewski jacek@usq.edu.au */
/* 21/08/1998 */

#include <stdio.h>
#include <math.h>

int main (int argc, char** argv) {

  long number1, number2, counter;
  double result;
  
  if (argc < 3) {
    printf ("usage : %s number1 number2\n",argv[0]);
    exit(1);
  } else {
    number1 = atol (argv[1]);
    number2 = atol (argv[2]);
    result = 0.0;
  }

  for (counter = number1; counter <= number2; counter++) {
    result = result + sqrt((double)counter);
  }
    
  printf("%lf\n", result);
  
  return 0;
  
}
\end{verbatim}







\subsection{prun.sh\label{prun}}

 

\begin{verbatim}
#!/bin/bash
# Jacek Radajewski jacek@usq.edu.au
# 21/08/1998

export SIGMASQRT=/home/staff/jacek/beowulf/HOWTO/example1/sigmasqrt

# $OUTPUT must be a named pipe
# mkfifo output

export OUTPUT=/home/staff/jacek/beowulf/HOWTO/example1/output

rsh scilab01 $SIGMASQRT         1  50000000 > $OUTPUT < /dev/null&
rsh scilab02 $SIGMASQRT  50000001 100000000 > $OUTPUT < /dev/null&
rsh scilab03 $SIGMASQRT 100000001 150000000 > $OUTPUT < /dev/null&
rsh scilab04 $SIGMASQRT 150000001 200000000 > $OUTPUT < /dev/null&
rsh scilab05 $SIGMASQRT 200000001 250000000 > $OUTPUT < /dev/null&
rsh scilab06 $SIGMASQRT 250000001 300000000 > $OUTPUT < /dev/null&
rsh scilab07 $SIGMASQRT 300000001 350000000 > $OUTPUT < /dev/null&
rsh scilab08 $SIGMASQRT 350000001 400000000 > $OUTPUT < /dev/null&
rsh scilab09 $SIGMASQRT 400000001 450000000 > $OUTPUT < /dev/null&
rsh scilab10 $SIGMASQRT 450000001 500000000 > $OUTPUT < /dev/null&
rsh scilab11 $SIGMASQRT 500000001 550000000 > $OUTPUT < /dev/null&
rsh scilab12 $SIGMASQRT 550000001 600000000 > $OUTPUT < /dev/null&
rsh scilab13 $SIGMASQRT 600000001 650000000 > $OUTPUT < /dev/null&
rsh scilab14 $SIGMASQRT 650000001 700000000 > $OUTPUT < /dev/null&
rsh scilab15 $SIGMASQRT 700000001 750000000 > $OUTPUT < /dev/null&
rsh scilab16 $SIGMASQRT 750000001 800000000 > $OUTPUT < /dev/null&
rsh scilab17 $SIGMASQRT 800000001 850000000 > $OUTPUT < /dev/null&
rsh scilab18 $SIGMASQRT 850000001 900000000 > $OUTPUT < /dev/null&
rsh scilab19 $SIGMASQRT 900000001 950000000 > $OUTPUT < /dev/null&
rsh scilab20 $SIGMASQRT 950000001 1000000000 > $OUTPUT < /dev/null&
\end{verbatim}






\end{document}
