Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can Eclipse recognize MPI artifcats without errors?

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.

like image 759
Bedo Avatar asked Mar 24 '23 12:03

Bedo


1 Answers

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]

like image 163
Bedo Avatar answered Apr 07 '23 16:04

Bedo