mnucci32/aither

mpi 3.1 linking fails due to using c++ bindings, and only linking to c mpi libraries

aerosayan opened this issue · 1 comments

Issue Type (bug, feature request, other)

bug

Description of Issue

linking error with mpi, due to mpi depreciating c++ bindings

Steps to Reproduce Issue

difficult to point out how to reproduce this error on another machine.
mpi 3.1 exists on my machine, and the c++ bindings used in code, were deprecated
cmake file was linking to the mpi c libraries

Solution

i modified the cmake file and linked against the c++ mpi libraries instead of the c mpi libraries, and the executable and shared libraries compiled and linked correctly, but others might face the same issue and don't know how to solve it. might be good if you remove the calls to the c++ bindings, and only use the c bindings.

code section patch :

target_link_libraries (aither ${MPI_CXX_LIBRARIES})
target_link_libraries (aitherStatic ${MPI_CXX_LIBRARIES})
target_link_libraries (aitherShared ${MPI_CXX_LIBRARIES})

System Details (OS, compiler, number of processors, etc)

linux 5.4.0-59-generic on lubuntu 20.04.1 LTS, gcc 9.3.0, mpi 3.1

PS : I really liked your code. It's well designed and "pretty".