http:^^www.cs.cornell.edu^info^people^lnt^multimatlab.html

来自「This data set contains WWW-pages collect」· HTML 代码 · 共 1,159 行 · 第 1/5 页

HTML
1,159
字号
[<!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><A HREF=#ref_mpibook>7</A>,<A HREF=#ref_mpi>13</A>].Here is a brief description of how the system is put together.<P>The system is written using <!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><A HREF=http://www.mcs.anl.gov/Projects/mpi/implementations.html>MPICH</A>,a popular and freely available implementation ofMPI developed at Argonne National Laboratory and Mississippi State University[<!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><A HREF=#ref_mpich>6</A>].In particular, MultiMATLABuses the P4 communication layer within MPICH, allowing it to run over aheterogeneous network of workstations. In building upon MPICH, we believewe have developed a portable and extensible system, in that anyonecan freely get a copy of the software and it will run on many systems.Versions of MPICH are beginning to become available that run on PCsrunning Windows, and we expect soon to experiment withMultiMATLAB on those platforms.<P>The MultiMATLAB <CODE>Start</CODE> command builds a P4 process group fileof remote hosts, which are either explicitly specifiedby the user or taken from a default list, and then initializes MPICH.MATLAB processes are then started on the remotehosts.  Each process iterates over a simple loop, waiting for andexecuting commands received from the user's interactiveMATLAB process.  The user may use a <CODE>Quit</CODE> command to shut down theslaves and exit MultiMATLAB.  Additionally, if the user quits MATLABduring a MultiMATLAB session, the slaves are automatically shut down.<P>One limitation of MPI, which was not designed for thisparticular kind of interactiveuse, is that a running program cannot spawn additional processes.A consequence of this limitation is that once MultiMATLAB is runningon multiple processors, it is not possible to add further processors to thelist except by quitting and starting again.It is expected that this limitation of MPI will be removed inthe extension of MPI under development known as<!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><A HREF=http://www.mcs.anl.gov/Projects/mpi/mpi2/mpi2.html>MPI 2</A>.<P>At the user level, MultiMATLAB consists of a collection ofcommands such as <CODE>Send</CODE>, for example.  Such a commandis written as a C file called <CODE>Send.c</CODE>, which is interfacedto MATLAB via the standardMATLAB Fortran/C/C++ interface system known as MEX.Within MPI, many variants on sends and receives are defined.MultiMATLAB is currently built upon the standard send and receive variants,which employ buffered communication for most messages and synchronouscommunication for very large ones.  Our underlying MPI sends and receivesare both blocking operations, to ensure that no data is overwritten,but to the MultiMATLAB programmer,the semantics is that <CODE>Recv</CODE> is blockingwhile <CODE>Send</CODE> is non-blocking.<P>Higher-level MultiMATLAB commands are usually built onhigher-level MPI commands.For example,<CODE>Bcast</CODE> and<CODE>Min</CODE> and<CODE>Max</CODE> and<CODE>Sum</CODE> are built on MPI collective communication routines,and <CODE>Grid</CODE>and <CODE>Coord</CODE> are built on MPI routines that supportcartesian topologies.<P>It should be stressed that MultiMATLAB allows MPIroutines direct access to MATLAB data.As a result, MultiMATLAB does not incur any extra copyingcosts over MPICH, so it is reasonable to expect that itsefficiency should be comparable.  Our experiments showthat this is indeed approximately the case.  Here are theresults of a typical experiment:<BLOCKQUOTE><CODE><PRE>     size of matrix      round-trip latency     (# of doubles)        (milliseconds)                        MPICH    MultiMATLAB                          25            2.5            4.7            50            2.1            6.7           100            2.8           12.6           200            4.4           15.1           400            9.3           20.0           800           18.2           21.1          1600           35.8           38.4          3200           80.8           81.9          6400          165.8          175.7         12800          339.6          360.8         25600          708.9          698.7         51200         1397.4         1406.0        102400         2744.7         2850.3</PRE></CODE></BLOCKQUOTE>     The table compares round-trip latencies for a MultiMATLAB code withthose for an equivalent C code using MPICH, and revealsthat MultiMATLAB does add some overhead to that of MPICH.The timings were obtained on the IBM SP2, not using thehigh-performance switch.This occurs because MATLAB performs memory allocation forreceived matrices.  It might be possible to alleviatethis problem by maintaining a list of preallocated buffers, butwe have not pursued this idea.<P><BR><P><H2>5. Related Work</H2>Many people must have thought about parallelizing MATLAB over theyears.  According to Moler's essay "Why there isn'ta parallel MATLAB," published in the MathWorks Newsletterin 1995 [<!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><A HREF=#ref_moler>14</A>],he was involved with one of the earliest suchattempts in the mid-1980s on an Intel iPSC.  Of course, a greatdeal has happened in distributed computing since then.<P>Our own first experiments were carried out in1993 (A. E. Trefethen).  By making use of a Fortran wrapper basedon IBM's message passing environment (MPL), we ran MATLAB onmultiple nodes of an IBM SP-1.  We were impressedwith the power of this system for certain fluid mechanicscalculations, and this experience ultimately led to our persuadingThe MathWorks to support us in initiating the present project.<P>We are aware of seven projects than have been undertaken elsewherethat share some of the goals and capabilities of MultiMATLAB.We shall briefly describe them.<P>The longest-standing related project, datingto before 1990, is theCONLAB (CONcurrent LABoratory) system of K&aring;gstr&ouml;mand others at the University of Ume&aring;, Sweden[<!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><A HREF=#ref_conlab>4</A>,<A HREF=#ref_conlab2>10</A>].CONLAB is a fully-independent system with MATLAB-likenotation that extends the MATLAB language with controlstructures and functions for explicit parallelism.CONLAB programs are compiled into C code with amessage passing library, PICL [<!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><A HREF=#ref_picl>5</A>], andthe node computations are done using LAPACK.<P>A group at the Center for Supercomputing Research and Developmentat the University of Illinois has developed<!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><A HREF=http://www.csrd.uiuc.edu/falcon/falcon.html>FALCON</A>(FAst Array Language COmputatioN), a programmingenvironment that facilitates the translation of MATLAB code intoFortran 90 [<!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><A HREF=#ref_falcon>2</A>,<A HREF=#ref_falcon2>3</A>].FALCON employs compile time and run time inferencemechanisms to determine variable properties such as type, structure,and size.  Although FALCON does not directly generate parallel code,the future aim of this project is to annotate the generated Fortran 90code with directives for parallelization and data distribution.  Aparallelizing Fortran compiler such as<!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><A HREF=http://www.csrd.uiuc.edu/polaris/polaris.html>Polaris</A>[<!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><A HREF=#ref_polaris>1</A>]may then use these directives to generate parallel code.<P>Another project, from the Technion in Israel,is <!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><A HREF=http://techunix.technion.ac.il/~yak/matcom.html>MATCOM</A>[<!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><A HREF=#ref_matcom>12</A>].MATCOM consists of a MATLAB-to-C++ translator and anassociated C++ matrix class with overloaded operators.At present, MATCOMtranslates MATLAB only into serial C++, but one might hope tobuild a distributed C++ matrix class underneath it which wouldadhere to the same interface as the existing matrix class.<P>A project known as the Alpha Bridge has been developedby Alpha Data Parallel Systems, Ltd., inEdinburgh, Scotland [<!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><A HREF=#ref_alpha>11</A>].Originally, in a system known as the MATLAB-Transputer-Bridge,this group ran a MATLAB-like language in parallelon each node of a transputer.The Alpha Bridge system is an enhancement of this idea in whichhigh-performance RISC processors are linked in a transputer network.A reduced, MATLAB-like interpreter runs on each node of the networkunder the control of a master MATLAB 4.0 process running on a PC.<P>A fifth project has been undertaken not far from Cornellat Integrated Sensors, Inc. (ISI) in Utica, NY, aconsulting company with close links to the US Air ForceRome Laboratories [<!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><!WA25><A HREF=#ref_isi>9</A>].  Here MATLABcode is translated to C code with parallel library routines.This project (and product) aims at executing MATLAB-style programsin parallel for real-time control and related applications.<P>The final two projects we shall mention, though not the mostfully developed, are the closest to our own in concept.One is a system built by a group at the Universities of Rostockand Wismar in Germany[<!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><!WA26><A HREF=#ref_rostock>15</A>,<A HREF=#ref_rostock>16</A>].In this system MATLAB is runon various nodes of a network of Unix workstations, with messagepassing communication viathe authors' own system PSI/IPC based on Unix sockets.<P>Finally, the<!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><!WA27><A HREF=http://www.mthcsc.wfu.edu/pt/pt.html>Parallel Toolbox</A>is a system developed originallyby graduate students Pauca, Liu,Hollingsworth, and Martinez at Wake Forest University in NorthCarolina [<!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><!WA28><A HREF=#ref_pt>8</A>].This system is based upon the message passing system known as<!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><!WA29><A HREF=http://www.epm.ornl.gov/pvm>PVM</A>.In the Parallel Toolbox, there is a level of indirection not presentin MultiMATLAB betweenthe MATLAB master process and the slaves, a PVMprocess known as the PT Engine Daemon.  Besides handlingthe spawning of new processes, the PT Engine Daemon also filtersinput and output, sending error codes to a PT Error Daemon thatlogs the error messages to a file.<P>In summarizing these various projects, the main thing to be saidis that most of them involve original implementations of a MATLAB-likelanguage rather than the use of the existing MATLAB system itself.There are good reasons for this, if one's aim is high performanceand an investigation of what the "ideal" parallel MATLAB-likesystem might look like.The disadvantage is that the existing MATLAB product isat present so widely used, and so extensive in itscapabilities, that it may be unrealistic and inefficient

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?