| <html> |
| <head> |
| <title>Launching 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">Launching Parallel Programs</h1> |
| <p>This section describes how to launch a parallel program. In PTP, |
| this is called "launching a job". Launching requires the |
| services of a resource manager, which should have been set up as |
| described in <a href="02resMgrSetup.html">Resource Managers</a>. PTP is |
| able to launch parallel applications that use a variety of programming |
| models (e.g. MPI, OpenMP, UPC, etc.) provided that the resource manager |
| 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>launch configuration</i> to encapsulate all the |
| settings and arguments necessary to launch a job normally or under the |
| control of a debugger. A launch configuration is create using the <b>Run |
| > Run Configurations...</b> or <b>Run > Debug Configurations...</b> |
| menus. The only difference between the two is the ultimate action that |
| will be taken; all the configuration information is common and can be |
| used to launch subsequent normal or debug jobs.</p> |
| |
| <p>This section only describes how to launch a parallel program. A |
| description of how to monitor the application launch is provided in the |
| <a href="05monitoring.html">Monitoring Parallel Machines and Jobs</a>. A |
| description of how to debug an application is provided in the <a |
| href="06parDebugging.html">Parallel Debugging</a>.</p> |
| |
| <p>Topics include:</p> |
| <ol> |
| <li><a href="#create">Creating a <b>Parallel Application</b> |
| launch configuration</a></li> |
| <li><a href="#resources">Completing the <b>Resources tab</b></a></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="#debugger">Completing the <b>Debugger tab</b></a></li> |
| <li><a href="#launch">Launching the application </a></li> |
| </ol> |
| <h2 id="create">Step 1: Create a Parallel Application launch |
| configuration</h2> |
| <p>Note: At least one resource manager must have been configured |
| before it is possible to create a parallel application run |
| configuration.</p> |
| <ol> |
| <li> |
| <p>To run the job normally, open the <b>Run Configuration</b> |
| dialog using <b>Run > Run Configurations...</b> or click the run |
| icon menu on the tool bar and select <b>Run Configuration...</b>.</p> |
| </p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>To run the job under the control of the debugger, open the <b>Debug |
| Configuration</b> dialog using <b>Run > Debug Configurations...</b> or |
| click the debug icon menu on the tool bar and select <b>Debug |
| Configuration...</b>.</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>Create a new Parallel Application launch configuration by |
| clicking <b>Parallel Application</b> and then clicking on the <b>New</b> |
| button icon. For brevity, only a normal launch configuration will be |
| shown.</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.</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. The contents of this tab will vary for |
| different resource managers. This description only applys to the Open |
| MPI and MPICH2 resource managers.</p> |
| <ol> |
| <li> |
| <p>Select a resource manager you wish to use from the drop-down. If |
| there is only one resource manager, then it will be automatically |
| selected. If the resource manager you have selected is not running, |
| then you will see a warning message in the dialog.</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>Enter a value in the <b>Number of Processes</b> field. This |
| field must be greater than 0 in order to launch a job, and specifies |
| the number of processes to use for the application launch.</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>Fields in the <b>Options</b> section correspond to command-line |
| options supported by Open MPI. If desired, it is also possible to |
| specify a file containing the list of hosts on which to run the |
| application using the <b>Host file</b> field, or the list can be |
| entered directly into the <b>Host list</b> field.</p> |
| <p><br> |
| </p> |
| <p><img src="images/03launchResTab.png"></p> |
| </li> |
| </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 the <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 resource manager is connected to a remote target, then |
| this means the <i>path of the executable on the remote target</i>. |
| Otherwise, for a resource manager on the local machine, it should be |
| the path to the executable within the project directory.</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>Parallel |
| 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 |
| resource manager is connected 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>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="debugger">Step 7: Complete the Debugger tab</h2> |
| <p>The <b>Debugger tab</b> is only required if you are planning to |
| debug the application. However you must complete it now, even if you are |
| only planning to launch a non-debug job.</p> |
| <ol> |
| <li> |
| <p>If no debugger is visible in the <b>Debugger</b> drop-down, |
| select one. This is the debugger that will control the parallel debug |
| session. Currently only <b>SDM</b> is supported (SDM stands for |
| Scalable Debug Manager), so select this.</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>If you wish the debugger to automatically suspend the |
| application on launch, make sure <b>Stop in main() on startup</b> is |
| checked</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>Under Debugger options, make sure that the path to debugger |
| executable is correct.</p> |
| <p><br> |
| </p> |
| <p>If you are debugging on the local machine, this path should |
| point to the <code>sdm</code> executable in your Ecilpse installation's |
| <code>plugins/org.eclipse.ptp.<i>os.arch_version</i>/bin</code> |
| directory, where <code><i>os.arch_version</i></code> is your operating |
| system (<code>linux</code>, <code>macosx</code>, or <code>aix</code>), |
| architecture (<code>x86</code>, <code>x86_64</code>, or <code>ppc</code>), |
| and version number of the plugin (e.g. <code>4.0.0.201006081437</code>).</p> |
| <ul><li><b>Note:</b> This may have required an extra step during installation to build this executable.</ul> |
| <p><br> |
| </p> |
| <p>If you are debugging remotely, then this path will be the path |
| to where the <code>sdm</code> executable was installed on the remote |
| machine.</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>Set the <b>Debugger session address</b>. This is the address |
| that the debugger will connect to when it starts, and will depend on |
| where you are launching the application:</p> |
| <p><br> |
| </p> |
| <ul> |
| <li> |
| <p>If you are launching onto the local machine, or onto a remote |
| machine using port forwarding, use <code>localhost</code>. (Note that |
| you will need to have the <code>GatewayPorts</code> option set to <code>yes</code> |
| in the <code>sshd</code> configuration file on the remote system for |
| this to work with port forwarding.)</p> |
| <p><br> |
| </p> |
| </li> |
| <li> |
| <p>If you are launching onto a remote machine without using port |
| forwarding, then this should be the address of the local machine (the |
| one running Eclipse). <i>This address must be accessible from the |
| remote machine.</i>. If your local network configuration precludes the |
| remote machine accessing your local machine, you will need to |
| reconfigure the resource manager to use port forwarding.</p> |
| <p><br> |
| </p> |
| <p><img src="images/03launch5.png"></p> |
| </li> |
| </ul> |
| |
| </li> |
| </ol> |
| |
| <h2 id="launch">Step 8: Launching the application</h2> |
| <p>The launch configuration is now complete. Click on the <b>Apply</b> |
| button to save the configuration. If you are running the application, |
| click on the <b>Run</b> button to launch the job, and Eclipse will |
| automatically switch to the <b>Parallel Runtime Perspective</b>. If you |
| are debugging the application, click on the <b>Debug</b> button and |
| Eclipse will automatically switch to the <b>Parallel Debug |
| Perspective</b>. |
| <p><a href="#top">Back to Top</a> | <a href="toc.html">Back to |
| Table of Contents</a> |
| </body> |
| </html> |
| |
| |
| |
| |