| <html> |
| <head> |
| <title> |
| Setup for MPI Tools within the Parallel Language Development Tools |
| </title> |
| <link rel="stylesheet" type="text/css" href="help.css"> |
| <script type="text/javascript" src="thumb.js"> </script> |
| <body> |
| <h1 id="top">Setup for MPI Tools within the Parallel Language Development Tools</h1> |
| <h2>Terminology of CDT projects</h2> |
| <p>Note: the older |
| CDT 4.0 refers to a C project in which it manages the makefile as a "Managed Make Project" or a "Managed Build Project" |
| and a project which |
| you supply the makefile is a "Standard Make project." |
| <p>CDT 5.0 refers to a C project in which it manages the makefile as just a "C Project" and a project which |
| you supply the makefile is a <a href="setupMakefileProject.html">"Makefile project."</a> |
| <p>Both terminologies are sometimes used in these instructions. |
| <h2>Project Setup</h2> |
| <p>To use the PTP Parallel Language Development |
| Tools feature for MPI development, you need to |
| <ol> |
| <li><a href="#prefs">Specify the MPI include path in preferences</a>, and</li> |
| <li><a href="#project">Add the MPI include files etc. to the build information for each project.</a> |
| </ol> |
| |
| <h2 id="prefs">Specifying the MPI Include path in Preferences</h2> |
| <p>Note: As of PLDT 2.1, you will be prompted if the MPI (or OpenMP) include path hasn't been set up in PLDT Preferences. |
| The first time you use the New Project Wizard to create an MPI or OpenMP project, |
| you'll be prompted to set up the preferences to point to the appropriate header files. |
| <p>Or, you can set it up ahead of time as specified below. |
| <p>To specify the MPI include path, use Window > Preferences. (For Mac, use Eclipse > Preferences) |
| Under PTP, Parallel Language Development Tools, MPI... |
| (Note: If you do not have core PTP installed, the "Parallel Language |
| Development Tools" section in the preferences will be in the main list.) |
| |
| <p>Add the path to MPI include paths - this tells PLDT what symbols to look |
| for in the MPI Artifact view. You can also specify the default MPI build command. |
| These values will make the MPI New Project Wizard page make more |
| accurate predictions of settings for new projects. |
| <br><img src="images/pldt-prefs1.png"> |
| |
| <p>The "Prompt to include MPI APIs found in other locations (C only)" indicates whether |
| it will ask you if MPI APIS found elsewhere |
| will be considered as artifacts. For example, if you point to <install-loc>/include in the MPI include paths here, |
| but your source files actually include header files from /usr/local/include, it will prompt you to consider these as well |
| during the analysis. |
| This is only valid for C projects, not C++ projects. |
| <p>Hit OK to close the Preferences dialog. |
| |
| |
| |
| <h2 id="project">Add MPI Include paths to each project</h2> |
| <p>The MPI include paths must also be added to each project. |
| There are two ways to do this. |
| <ol> |
| <li><a href="#wizard">Use the PLDT new project wizards</a>, or |
| </li> |
| <li><a href="#manual">Add the build information manually</a>. |
| </ol> |
| <h2 id="wizard">Use the PLDT new project wizards</h2> |
| <p>Create a new "C project" |
| <br>One way is to use the menu: File->New->C project (if you are already in the C/C++ perspective this may be the simplest). |
| <br>There are several ways to get to this wizard (including context menu in the Project Explorer view). |
| Enter a project name; under Project types, expand 'executable' and select, e.g. "MPI Hello World C project" |
| <br> |
| <img src="images/mpiWizard.png"> |
| <p>Note: if you have not set the MPI Preferences yet, you'll be prompted at this point: |
| <br><img src="images/mpiPrefsHaveNotBeenSet.png"> |
| <p> |
| <p>See the above <a href="#prefs">Specify the MPI include path in preferences</a> for how to fill this in. |
| <p>After specifying the preferences, or if it wasn't required, select Next to go to the next page of the New Project Wizard. |
| |
| <br>On the next page, the Basic Settings page of the wizard, fill in any project template values, e.g. your name. |
| <br>Then select Next. |
| <br><img src="images/mpiWizard2.gif"> |
| <p>On the next page, "MPI Project Settings" page, the "Add MPI project settings to this project" should be checked. |
| If you want to change any of the default values for this project, you can do so |
| here by unchecking the "Use default information" and altering the values. |
| The default values were chosen based on your input to the PLDT Preferences above. |
| |
| <br><img src="images/mpiWizard3.gif"> |
| <p>Select Finish. |
| <p>The project is created and should build automatically. |
| The Eclipse workbench is shown below after creating the new "MPI hello world" project. |
| The project explorer view on the left shows the project contents. |
| The source file is under the 'src' directory; expand this to see it. |
| Double-click on the source file name to edit the source file. The outline view on the |
| right shows the outline of the file currently shown in the editor. |
| The Console view at the bottom shows the results of the project build. |
| |
| <br><img src="images/mpiNewProjectWorkbench.gif"> |
| <p> |
| <p><p>Now continue to set up to <a href="run.html">run the MPI tools</a> |
| <p> |
| <h2 id="manual">Add the Build Information Manually</h2> |
| <p>If the new project wizard isn't used as described |
| above to set the MPI information for a project, |
| the MPI information can be added to the project manually as follows. |
| <ol> |
| <li>Create a C project |
| <ul> |
| |
| <li>Note: the following description is for a regular C project (also known as a "Managed Build" CDT project). |
| For information about Makefile projects, in which you provide the makefile yourself, |
| see <a href="setupMakefileProject.html">Setup for Makefile projects</a>. |
| </li> |
| </ul> |
| <li>Set up the include paths etc: |
| <br>To bring up the Project Properties, rightMouse on the project name, and select "Properties" (at the bottom of the context menu list) |
| <br>Project Properties, C/C++ Build, Configuration Settings, |
| Tool Settings tab, Directories |
| <br>--> Add include path for mpi header files etc. - path to the 'include' dir |
| <br><img src="images/include.png"> |
| <p> |
| <p> |
| Project Properties, C/C++ Build, Configuration Settings, |
| Tool Settings tab, GCC C Linker, Libraries |
| <ol> |
| <li>Under "Libraries (-l)" add the symbol "mpi" |
| <li> Under "Library search path (-L)" add the path to the 'lib' dir in MPI dir. |
| <br><img src="images/lib.png"> |
| <p> |
| <li><b>MPI Build Command:</b> Note: If you have an MPI installed that requires a different |
| build command, such as 'mpicc' instead of 'gcc', specify it here as well. |
| Select the compiler tool on the left and modify the 'Command:' value. |
| You probably also need to do the same for the linker tool. |
| <br><img src="images/mpiBuildCommand.png"> |
| </ol> |
| <p> |
| |
| </ol> |
| <p>Note that the above instructions describe how to add information to C projects in which the makefile is generated for you, |
| previously known as "Managed Build" projects. If you provide your own makefile, you will create a "Makefile project" |
| and create the makefile within that project. |
| See <a href="makefileSetup.html">Setting up project properties for a Makefile project</a>. |
| <p>Now continue to set up to <a href="run.html">run the MPI tools</a> |
| |
| <p> |
| <p> <p> <p> |
| <p><a href="#top">Back to Top</a> | <a href="toc.html">Back to Table of Contents</a> |
| |
| </body> |
| </html> |