[mpich-discuss] Trouble linking mpich2 libraries

Daniel Fulton dfulton at uci.edu
Wed Oct 19 14:15:17 CDT 2011


Hi Dave,

Thanks for the reponse, and the heads up with CLIBS.  I should be 
linking with g++ here.

Compile time problem ended up being another mpi.h located in my petsc 
include directory.

Cheers,
Dan


On 10/18/2011 12:21 PM, Dave Goodell wrote:
> Are you actually "#include"ing mpi.h?
>
> Are you certain that you aren't inadvertently picking up a different implementation's mpi.h that does not properly support MPI's C++ bindings?  You might be able to check this by running your failing compile line with the "-M" option added to cause the compiler to output a make dependency rule for all of the header files that were included.
>
> An aside: your problem is compile-time, not link-time, but your "CLIBS" variable has a set of suspicious flags in it.  If you are linking with mpicxx then you should not add "-lmpich" or "-lmpichcxx" to your link line.  Doing so will very likely cause you problems later on.
>
> -Dave



More information about the mpich-discuss mailing list