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."
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 "Makefile project."
Both terminologies are sometimes used in these instructions.
To use the PTP Parallel Language Development Tools feature for MPI development, you need to
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.
Or, you can set it up ahead of time as specified below.
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.)
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.
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.
Hit OK to close the Preferences dialog.
The MPI include paths must also be added to each project. There are two ways to do this.
Create a new "C project"
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).
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"
Note: if you have not set the MPI Preferences yet, you'll be prompted at this point:
See the above Specify the MPI include path in preferences for how to fill this in.
After specifying the preferences, or if it wasn't required, select Next to go to the next page of the New Project Wizard.
On the next page, the Basic Settings page of the wizard, fill in any project template values, e.g. your name.
Then select Next.
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.
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
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.
Project Properties, C/C++ Build, Configuration Settings, Tool Settings tab, GCC C Linker, Libraries
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 Setting up project properties for a Makefile project.
Now continue to set up to run the MPI tools