Setup for MPI Tools within the Parallel Language Development Tools

To use the PTP Parallel Language Development Tools feature for MPI development, you need to

  1. Specify the MPI include path in preferences, and
  2. Add the MPI include files etc. to the build information for each project.

Specifying the MPI Include path in Preferences

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 included without it.)

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.

Add MPI Include paths to each project

The MPI include paths must also be added to each project. There are two ways to do this.

  1. Use the PLDT new project wizards, or
  2. Add the build information manually.

Use the PLDT new project wizards

Create a new "C project"
File->New->C project (if you are already in the C/C++ perspective this may be the simplest)
is one way; there are several ways to get to this wizard Enter a project name; under Project types, expand 'executable' and select, e.g. "MPI Hello World C project"

Select Next.
On the next page, fill in any project template values, e.g. your name.
Then select Next.

On the next page, "MPI Project Settings" page, make sure the "Add MPI project settings to this project" is 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.

Select Finish.

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.

Now continue to set up to run the MPI tools

Add the Build Information Manually

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.

  1. Create a CDT project (e.g. Managed Make C Project)
  2. Set up the include paths etc:
    Project Properties, C/C++ Build, Configuration Settings, Tool Settings tab, Directories
    --> Add include path for mpi header files etc. - path to the 'include' dir

    Project Properties, C/C++ Build, Configuration Settings, Tool Settings tab, GCC C Linker, Libraries

    1. Under "Libraries (-l)" add the symbol "mpi"
    2. Under "Library search path (-L)" add the path to the 'lib' dir in MPI dir.
    3. MPI Build Command: 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.

Now continue to set up to run the MPI tools

 

 

 

 

Back to Top | Back to Table of Contents