Symbol MPI_COMM_WORLD could not be resolved [message #1744256] |
Fri, 23 September 2016 16:03 |
Andrey Solovjev Messages: 8 Registered: December 2014 Location: Moscow |
Junior Member |
|
|
I used MPI functions in my program and everything is ok but the MPI symbol MPI_COMM_WORLD that is marked as error with the hint text:
"Symbol MPI_COMM_WORLD could not be resolved".
For example in code
CheckMPI(MPI_Reduce(&partVol, &totVol, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD));
only MPI_COMM_WORLD is unresolved. MPI_DOUBLE and MPI_SUM are defined in the same file but eclipse has no problem with them. I have path to /usr/include/mpich2 in Project properties -> C/C++ General -> Paths and Symbols -> Includes. In the parser log I have
Project: N-4.3
File: file:/home/zux/C/N-4.3/src/TestGeom.cc
Language: GNU C++
Index Version: 163.0
Build Configuration: D SC1
Context: none
Versions in Index: 1
C++: {NDEBUG=null,_ASSERT_H=null,_ASSERT_H_DECLS=null,_GLIBCXX_CMATH=null,_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=null,__GNUC_MINOR__=6,__GNUC__=4,__GXX_EXPERIMENTAL_CXX0X__=null,__cplusplus=*}; 0 macros, 12 includes, 286 names;
Include Search Path (option -I):
/usr/include/c++/4.6
/usr/include/c++/4.6/x86_64-linux-gnu
/usr/include/c++/4.6/backward
/usr/lib/gcc/x86_64-linux-gnu/4.6/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
/usr/include/mpich2
/home/zux/moab/build/include
/home/zux/C/N-4.3/include
Macro definitions (option -D):
...
Macro definitions (from language + headers in index):
...
MPI_COMM_SELF=((MPI_Comm)0x44000001)
MPI_COMM_WORLD=((MPI_Comm)0x44000000)
MPI_COMPLEX16=((MPI_Datatype)0x4c00102a)
...
Unresolved names:
Attempt to use symbol failed: CheckMPI in file /home/zux/C/N-4.3/src/TestGeom.cc:109
Attempt to use symbol failed: MPI_Reduce in file /home/zux/C/N-4.3/src/TestGeom.cc:109
Attempt to use symbol failed: MPI_COMM_WORLD in file /home/zux/C/N-4.3/src/TestGeom.cc:109
Attempt to use symbol failed: CheckMPI in file /home/zux/C/N-4.3/src/TestGeom.cc:118
Attempt to use symbol failed: MPI_Reduce in file /home/zux/C/N-4.3/src/TestGeom.cc:118
Attempt to use symbol failed: MPI_COMM_WORLD in file /home/zux/C/N-4.3/src/TestGeom.cc:118
Of cause errors with CheckMPI and MPI_reduce are result of the MPI_COMM_WORLD.
You see that MPI_COMM_WORLD is visible for index builder. More, I can jump into /usr/include/mpich2/mpi.h to the correct line after Ctrl+Click on the symbol MPI_COMM_WORLD marked as unresolved. I did refresh and rebuild index. I have line
in the very beginning of the file. Compilation with gcc 4.6.4 is ok. What else can I do to solve this problem?
Ubuntu 12.04, Eclipse Kepler.
|
|
|
|
Powered by
FUDForum. Page generated in 0.05057 seconds