blob: 6df002bf9f1fcab3e4f2110d9af89afb7495136b [file] [log] [blame]
<html>
<head>
<title>Running Parallel Programs</title>
<link rel="stylesheet" type="text/css" href="help.css">
<script type="text/javascript" src="thumb.js"> </script>
</head>
<body>
<h1 id="top">Running Parallel Programs</h1>
<p>This section describes how to run a parallel program. In PTP,
this is called &quot;running a job&quot;.
<p>Previous releases of PTP required setting up a <i>Resource Manager</i> for each job scheduler/runtime environment before
a job could be launched.
In PTP 6.0 and later this is not handled separately, and instead a
<i>Target System Configuration</i>
is specified on the Run Configuration page. Further interaction to set up the parallel
job is highly dependent on which TSC is selected.
<p>PTP is
able to launch parallel applications that use a variety of programming
models (e.g. MPI, OpenMP, UPC, etc.) provided that the <i>Target System Configuration</i>
supports the programming model. It is also possible to launch multiple
copies of a sequential program so that they execute simultaneously.</p>
<p>Eclipse uses a <i>run configuration</i> (also known as a <i>launch configuration</i>)
to encapsulate all the
settings and arguments necessary to launch a job normally or under the
control of a debugger. A run configuration is created using the <b>Run
&gt; Run Configurations...</b> menu.
<p>This section only describes how to launch a parallel program. A
description of how to monitor the application launch is provided in
<a href="05monitoring.html">Monitoring Jobs and Systems</a>.
A description of how to debug an application is provided in
<a href="06parDebugging.html">Parallel Debugging</a>.</p>
<p>Topics include:</p>
<ol>
<li><a href="#create">Creating a <b>Parallel Application</b>
run configuration</a></li>
<li><a href="#resources">Completing the <b>Resources tab</b></a> - selecting the target system configuration
</li>
<li><a href="#application">Completing the <b>Application
tab</b></a></li>
<li><a href="#arguments">Completing the <b>Arguments tab</b></a></li>
<li><a href="#environment">Completing the <b>Environment
tab</b></a></li>
<li><a href="#synchronize">Completing the <b>Synchronize
tab</b></a></li>
<li><a href="#launch">Running the application </a></li>
</ol>
<h2 id="create">Step 1: Create a Parallel Application run
configuration</h2>
<ol>
<li>
<p>To set up a run configuration, open the <b>Run Configurations</b>
dialog using <b>Run &gt; Run Configurations...</b>
<p><img src="images/03runMenu.png">
<br>or click the run
icon's context menu on the tool bar (small triangle next to the icon) and select <b>Run Configurations...</b>.
<p><img src="images/03runMenu2.png">
</p>
</p>
<p><br>
</p>
</li>
<li>
<p>Create a new Parallel Application run configuration by
clicking <b>Parallel Application</b> and then clicking on the <b>New</b>
button icon.</p>
<p><br>
</p>
<p><img src="images/03launch1.png"></p>
<p><br>
</p>
</li>
<li>
<p>Enter a name for the configuration in the <b>Name:</b> field.
Here we use the same name as the project. If the project was selected in the Project Explorer, it may be already filled in here.</p>
<p><br>
</p>
<p><img src="images/03launch1a.png"></p>
</li>
</ol>
<h2 id="resources">Step 2: Complete the Resources tab</h2>
<p>The <b>Resources tab</b> is used to specify the resources
required for the job execution. After selecting the <b>target system configuration</b>, the contents of this tab will vary for
different target configurations, and your installation may have added others.
<h3 id="ptp-tscs">PTP supported Target System Configurations</h3>
<p>
PTP includes a number of target configurations
for different systems that support various parallel runtime systems and job schedulers. The following table lists the common configurations along with
links to additional help documentation.
<p>
Note that the associated runtime or job scheduler needs to be available on the target system prior to using PTP:
<blockquote>
<table border="1">
<tr>
<th scope="col">Target Configuration</th>
<th scope="col">Description</th>
</tr>
<tr id="gridengine">
<td><a href="rms/gridengine.html">Grid Engine-Generic-Batch</a></td>
<td>Batch execution using Grid Engine</td>
</tr>
<tr id="ibm-ll">
<td><a href="rms/ibm-ll.html">IBM LoadLeveler</a></td>
<td>Generic IBM LoadLeveler batch systems</td>
</tr>
<tr id="ibm-ll-bg">
<td><a href="rms/ibm-ll.html">IBM LoadLeveler (Blue Gene)</a></td>
<td>IBM LoadLeveler on Blue Gene systems</td>
</tr>
<tr id="ibm-pe">
<td><a href="rms/ibm-pe.html">IBM Parallel Environment</a></td>
<td>Interactive execution using IBM Parallel Environment</td>
</tr>
<tr id="ibm-lsf">
<td><a href="PLUGINS_ROOT/org.eclipse.ptp.rm.ibm.platform.lsf.doc.user/html/lsf.html">IBM Platform LSF</a></td>
<td>Batch execution on IBM Platform LSF systems</td>
</tr>
<tr id="ibm-platform-mpi">
<td><a href="rms/ibm-pmpi.html">IBM Platform MPI</a></td>
<td>IBM Platform MPI</td>
</tr>
<tr id="mpich2">
<td>MPICH2-Generic-Interactive</td>
<td>Interactive execution on MPICH2 systems</td>
</tr>
<tr id="openMPI">
<td><a href="rms/openMPI.html">Open MPI-Generic-Interactive</a></td>
<td>Interactive execution on Open MPI systems</td>
</tr>
<tr id="pbs-int">
<td><a href="rms/pbs.html">PBS-Generic-Interactive</a></td>
<td>Interactive job execution using PBS batch systems</td>
</tr>
<tr id="pbs-bgp-batch">
<td><a href="rms/pbs.html">PBS-BGP-Batch</a></td>
<td>Blue Gene/P systems using </td>
</tr>
<tr id="pbs-bgq-batch">
<td><a href="rms/pbs.html">PBS-BGQ-Batch</a></td>
<td>Blue Gene/Q systems using PBS</td>
</tr>
<tr id="slurm">
<td><a href="rms/slurm.html">SLURM-Generic-Batch</a></td>
<td>Generic SLURM batch systems</td>
</tr>
<tr id="slurm-alps">
<td><a href="rms/slurmalps.html">SLURM-ALPS-Generic-Batch</a></td>
<td>Combination of SLURM and ALPS as batch system</td>
</tr>
<tr id="slurm-bgp">
<td><a href="rms/slurm.html">SLURM-BGP-Batch</a></td>
<td>Blue Gene/P systems using SLURM</td>
</tr>
<tr id="slurm-bgq-batch">
<td><a href="rms/slurm.html">SLURM-BGQ-Batch</a></td>
<td>Blue Gene/Q systems using SLURM</td>
</tr>
<tr id="pbs-batch">
<td><a href="rms/pbs.html">PBS-Generic-Batch</a></td>
<td>Generic PBS batch systems</td>
</tr>
<tr id="remote-generic-interactive">
<td><a href="rms/remote-generic-interactive.html">Remote-Generic-Interactive</a></td>
<td>Simple (non-parallel) interactive execution on remote systems</td>
</tr>
<tr id="torque-batch">
<td><a href="rms/torque.html">Torque-Generic-Batch</a></td>
<td>Generic TORQUE batch systems</td>
</tr>
<tr id="torque-int">
<td><a href="rms/torque.html">Torque-Generic-Interactive</a></td>
<td>Interactive job execution using Torque batch systems</td>
</tr>
<tr id="juelich-judge">
<td><a href="rms/de.fz-juelich.judge.html">de.fz-juelich.judge.torque.batch</a></td>
<td>Running batch jobs on the JSC system JUDGE</td>
</tr>
<tr id="juelich-juropa">
<td><a href="rms/de.fz-juelich.juropa.html">de.fz-juelich.juropa.torque.batch</a></td>
<td>Running batch jobs on the JSC system JUROPA</td>
</tr>
<tr id="juelich-juqueen">
<td><a href="rms/de.fz-juelich.juqueen.html">de.fz-juelich.juqueen.ll_bg</a></td>
<td>Running batch jobs on the JSC system JUQUEEN</td>
</tr>
</table>
</blockquote>
</p>
<ol>
<li>
<p>Select a <b>Target System Configuration</b>
you wish to use from the drop-down.
</p>
<p>&nbsp;
<p><img src="images/03resources_configs.png">
</p>
<p>&nbsp;
<p>Note that if you type a lone character (or a few) into the selection box, the list of target system configurations
will be limited to those that start with the character.
<p><img src="images/03resources_configs_cull.png">
</li>
<li>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p>Select the connection to use for the target system.
If you have previously configured a synchronized or remote project, then a connection should be
available, and may be already be selected.
<br>(To launch on the local machine, select <b>Local</b> for the connection type.)
<br>You can create a new connection here by clicking the <b>New...</b> button.
</p>
<p>
<p>&nbsp;</p>
<li>
<p>
Once you select the connection, you may be prompted to open the connection if it is not already open. The contents of the <b>Resources</b>
tab will then populate with controls that allow you to configure the necessary launch information for the target system.
This area usually (depending on the target system configuration) includes further tabs to
segment the other information you can provide.
Fill in the information required by the target system configuration.
<br>
</p>
</li>
<!-- unused image<img src="images/03launchResTab.png"> -->
</ol>
<h2 id="application">Step 3: Complete the <b>Application</b> tab</h2>
<p>The <b>Application tab</b> is used to specify the application
(executable) to be launched.</p>
<ol>
<li>
<p>Ensure that the correct <b>Parallel Project</b> is selected.
This is the project containing the source and binaries for the
application.</p>
<p><br>
</p>
</li>
<li>
<p>Select the <b>Application Program</b> (executable) you wish to
launch. If the target system connection points to a remote target, then
this means the <i>path of the executable on the remote target</i>.
Otherwise, for a connection pointing to the local machine, it should be
the path to the executable within the project directory.
<p>The <b>Browse...</b> button can be used to select the executable file.
</p>
<p><br>
</p>
</li>
<li>
<p>If you are running the application on a remote machine and the
project was <i>built</i> locally, then you will have to copy the
executable to the remote machine first. For this purpose, you may
enable <b>Copy executable from local filesystem</b> and fill <b>Path
to the local file</b> with the path to the executable within the project
directory. This configures the launcher to copy the executable
automatically to the remote target before starting the run/debug
session. If not enabled, then you will need to copy the executable
manually to the remote target.</p>
<p><br>
</p>
</li>
<p><img src="images/03launch6.png"></p>
<p><br>
</p>
<li>
<p>If you wish to have the output from all processes in a single
output console, ensure that the <b>Display output from all
processes in a console view</b> option is checked.</p>
<p><br>
</p>
</li>
</ol>
<h2 id="arguments">Step 4: Complete the Arguments tab</h2>
<p>The <b>Arguments tab</b> is used to specify any command-line
arguments require by the parallel application and to modify the working
directory.</p>
<ol>
<li>
<p>Enter any arguments required by the application in the <b>Program arguments</b> field.
This is a free form text field that will be
passed to the application verbatim.</p>
<p><br>
</p>
</li>
<li>
<p>Select a different working directory if desired. The working
directory is set just prior to the application launch. Note that for a
remote launch, this will be a directory on the remote machine.</p>
</li>
<p><img src="images/03launch3.png"></p>
<p><br>
</p>
</ol>
<h2 id="environment">Step 5: Complete the Environment tab</h2>
<p>The <b>Environment tab</b> is used to specify any environment
variables require by the parallel application or in order to run the
application. The tab also provides the option to append the environment
variables to the native environment, or to replace the native
environment with the variables specified in the tab.</p>
<ol>
<li>
<p>Use the <b>New...</b> button to create a new environment
variable.</p>
<p><br>
</p>
</li>
<li>
<p>Use the <b>Select...</b> button to import environment variables.</p>
<p><br>
</p>
</li>
<li>
<p>Use the <b>Edit...</b> button to edit an environment variables.</p>
<p><br>
</p>
</li>
<li>
<p>Use the <b>Remove...</b> button to remove an environment
variables.</p>
<p><br>
</p>
</li>
<p><img src="images/03launch4.png"></p>
<p><br>
</p>
</ol>
<h2 id="synchronize">Step 6: Complete the <b>Synchronize</b> tab</h2>
<p>The <b>Synchronize tab</b> is used in scenarios where the
connection refers to a remote target. The tab specifies
rules that describe files or directories that need to be copied (<i>uploaded</i>)
to the remote target before starting the parallel application execution.
Typically, this feature is used to upload dependencies (like dynamic
libraries) or input data for test cases.</p>
<p>Note that this may not be necessary for <a href="sync.html">Synchronized Projects</a>,
in which files are copied back and forth to the remote system independently of the
launching mechanism.
<p>This tab also allows to specify rules describing files on the
remote host to be retrieved back (<i>downloaded</i>) to the local host
after the parallel application finishes execution, as output data
produced by the parallel application execution.</p>
<ol>
<li>
<p>If you wish to enable file transfer to the remote target, enable
the <b>Upload rules enabled</b> or <b>Download rules enabled</b>
according which direction of file transfer is required.</p>
<p><br>
</p>
<p><img src="images/03launch7.png"></p>
<p><br>
</p>
</li>
<li>
<p>In order to specify files to be copied from the local system to
the remote target (<i>uploaded</i>), click on <b>New upload rule</b>.
An upload rule lists a collection of files or directories that shall be
copied into a single directory.</p>
<p><br>
</p>
<p>If <b>Use directory from launch configuration</b> is enabled,
then the listed files or directories are copied to the working
directory specified on the launch configuration. At the moment, this is
equivalent to same directory that contains the executable for the
parallel application. If not enabled, they you must specify on <b>Remote
directory</b> a path where the files or directories will be placed. The
path may be absolute or relative (to the working directory).</p>
<p><br>
</p>
<p>In the list underneath, <b>Selected file(s)</b>, add the files
or directories that shall be copied. Click on <b>File(s)</b> to select
one or more individual files from anywhere in the local file system.
The <b>Directory</b> button works similarly to select a directory from
the local file system. Directories are copied recursively. The <b>Workspace</b>
button allows easily choosing files from the current workspace.</p>
<p><br>
</p>
<p>On the bottom of the dialog, you may wish to set attributes to
be applied to the copied files on the remote target. The options <b>Readonly</b>
or <b>Executable</b> sets all copied files to read-only or executable
on the remote host. If <b>Preserve time attributes</b> is enabled, then
the remote copy will assume the same time stamp then the local file,
otherwise, the time stamp will be the time the file was copied. Also,
if the file already exists on the remote target, you may choose how to
react in the <b>If file already exists</b> dropdown.</p>
<p><br>
</p>
<p><img src="images/03launch8.png"></p>
<p><br>
</p>
<p><br>
</p>
</li>
<li>
<p>In order to specify files to be copied from the remote target to
the local system (<i>downloaded</i>) after the parallel application
finishes, click on <b>New download rule</b>.</p>
<p><br>
</p>
<p>An download rule lists a collection of files or directories that
shall be copied into a single local directory. Its options are very
similar to the upload rule.</p>
<p><br>
</p>
<p><img src="images/03launch9.png"></p>
<p><br>
</p>
</li>
</ol>
<h2 id="launch">Step 7: Launching the application</h2>
<p>The launch configuration is now complete.
Select the <b>Run</b> button (in the bottom right corner of the <b>Run Configurations</b> dialog to launch the job.
Switch to the <b>System Monitoring</b> perspective
to view the status of the job and inspect the program output.
<p><a href="#top">Back to Top</a> | <a href="toc.html">Back to Table of Contents</a>
</body>
</html>