How does Eclipse recognize MPI artifacts without errors?

I installed Eclipse for parallel applications and MPI v. 2.

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

Eclipse also correctly recognizes MPI artifacts.

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

However, I get a lot of errors in the MPI artifact in the source code, the same errors as in the link above:

Indexer cannot find your include file

"If the indexer cannot find your MPI header file, you may see the following problems:

If your MPI header file is located in a global area that is automatically included in your project, specify the path location, for example / usr / include or / usr / local / include, then everything will work fine, without further changes. Creation and indexing are likely to work correctly.

If you are not using mpicc or a similar build command and you need to include include information and libpath to build and build, you probably want to set PLDT preferences to your include path for MPI, in which case include and link will be added to your commands assembly. "

My code works, but I think it's impossible to work with these red lines in every MPI instruction.

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

Using Ubuntu 64 bit with the latest version of MPI and Eclipse.

+4
source share
2 answers

I found a fix:

  • Right click on the project -> Properties -> C / C ++ General -> Outlines and Symbols
  • On the "Includes" tab, click "GNU C" and then "Add ..". "/ USR / include / MPI"
  • rebuild

It seems that Eclipse does not include directories recursively.

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

+7
source

The link you posted has all the answers you are about to receive here. Are you sure your mpi.h header file is in the place you put in your inclusion path in Eclipse? It seems you might have the wrong path.

0
source

Source: https://habr.com/ru/post/1486704/


All Articles