[Swift-commit] r2085 - trunk/docs

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Jul 7 04:11:55 CDT 2008


Author: benc
Date: 2008-07-07 04:11:54 -0500 (Mon, 07 Jul 2008)
New Revision: 2085

Modified:
   trunk/docs/userguide.xml
Log:
note on using mpi

Modified: trunk/docs/userguide.xml
===================================================================
--- trunk/docs/userguide.xml	2008-07-06 23:06:23 UTC (rev 2084)
+++ trunk/docs/userguide.xml	2008-07-07 09:11:54 UTC (rev 2085)
@@ -2360,6 +2360,49 @@
 </para>
 
 		</section>
+		<section><title>Launching MPI jobs from Swift</title>
+<para>
+Here is an example of running a simple MPI program.
+</para>
+<para>
+In SwiftScript, we make an invocation that does not look any different
+from any other invocation. In the below code, we do not have any input
+files, and have two output files on stdout and stderr:
+<programlisting>
+type file;
+
+(file o, file e) p() { 
+    app {
+        mpi stdout=@filename(o) stderr=@filename(e);
+    }
+}
+
+file mpiout <"mpi.out">;
+file mpierr <"mpi.err">;
+
+(mpiout, mpierr) = p();
+</programlisting>
+</para>
+<para>
+Now we define how 'mpi' will run in tc.data:
+<programlisting>
+tguc    mpi             /home/benc/mpi/mpi.sh   INSTALLED       INTEL32::LINUX GLOBUS::host_xcount=3
+</programlisting>
+</para>
+<para>
+mpi.sh is a wrapper script that launches the MPI program. It must be installed
+on the remote site:
+<programlisting>
+#!/bin/bash
+mpirun -np 3 -machinefile $PBS_NODEFILE /home/benc/mpi/a.out 
+</programlisting>
+</para>
+<para>
+Because of the way that Swift runs its server side code, provider-specific
+MPI modes (such as GRAM jobType=mpi) should not be used. Instead, the
+mpirun command should be explicitly invoked.
+</para>
+		</section>
 	</section>
 
 	<section><title>The Site Catalog - sites.xml</title>




More information about the Swift-commit mailing list