Question

I installed Eclipse for Parallel Applications and MPI v. 2.

I created inside Eclipse a new Hello World MPI project and run it using 4 processes. I can build and run it from Eclipse, it works.

Eclipse also recognizes MPI artifacts correctly.

I configured the includes as described here: http://help.eclipse.org/juno/topic/org.eclipse.ptp.pldt.doc.user/html/includes.html

However I'm getting a lot of errors on MPI artifact on the source code, same errors as described in the above link:

The Indexer can't find your include file

"If the indexer can't find your MPI header file, you may see problems like the following:

If your MPI header file is located in a global area that automatically gets included in your project's include path location, such as /usr/include or /usr/local/include, then things will probably work just fine without further alteration. Building and indexing will probably both operate correctly.

If you do not use mpicc or a similar build command and need to specify include and libpath information on building and linking, you will probably want to set the PLDT preferences to point to your include path for MPI, in which case, the include and link arguments will be added to your build commands."

My code works but I think it is impossible to work with al these red lines on every MPI instruction.

So my question is: how can I configure Eclipse in order to recognize MPI functions without telling me that there are errors?

Using Ubuntu 64 bit with last version of MPI and Eclipse.

Was it helpful?

Solution

I found a fix:

  • Right click on project -> Properties -> C/C++ General -> Paths and Symbols
  • On tab "Includes" click on "GNU C" and then on "Add.." "/usr/include/mpi"
  • rebuild

It sounds like Eclipse does not include directories recursively.

Source: http://tinyurl.com/nkq2gwp [pages 35-36]

OTHER TIPS

The link you posted seems to have all the answers that you're going to get here. Are you sure that your "mpi.h" header file is in the location you put in your include path in Eclipse? It seems that you may have the wrong path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top