I am trying to execute a commonly used application by Sandia National Labs (MiniAMR). I was able to get it to build/compile with openmpi-3.x.x. However, now I have updated my system with openmpi-4.0.0 and it fails.
I downloaded openmpi-4.0.0.tar.gz to update.
and
main.o: In function main':
main.c:(.text.startup+0x1a9): undefined reference toMPI_Errhandler_set'
collect2: error: ld returned 1 exit status
make: * [ma.x] Error 1
wget --no-check-certificate https://github.com/mantevo/miniamr/archive/7ae7865.tar.gz -O - | tar xz && mv miniA* miniamr && cd miniamr/ref && sed -i 's/cc/mpicc/' Makefile && make -j4
Since Open MPI 4.0, some symbols that were removed from the standard are no more built by default.
This symbol should have been marked as deprecated from the mpi.h header file, but be part of the libmpi.{a,so} library. Unfortunately, there was an issue in 4.0.0 and the symbol is not built into the library (and this is really a bug)
Your best option is to modernize your code and use MPI_Comm_set_errhandler() instead.
If this is not feasible, you can rebuilt Open MPI with configure --enable-mpi1-compatibility ...
(keep in mind this option might be removed from Open MPI 5 or later)
Be sure to see https://www.open-mpi.org/faq/?category=mpi-removed
Be sure to see https://www.open-mpi.org/faq/?category=mpi-removed
Since Open MPI 4.0, some symbols that were removed from the standard are no more built by default.
This symbol should have been marked as deprecated from the
mpi.hheader file, but be part of thelibmpi.{a,so}library. Unfortunately, there was an issue in 4.0.0 and the symbol is not built into the library (and this is really a bug)Your best option is to modernize your code and use
MPI_Comm_set_errhandler()instead.If this is not feasible, you can rebuilt Open MPI with
configure --enable-mpi1-compatibility ...
(keep in mind this option might be removed from Open MPI 5 or later)
All the suggestions helped. Thanks. I will report it to the application developer so they can make the changes accordingly.
Thank you!
We need to educate all the MPI app developers out there to stop using API's that were removed from the MPI spec years ago. Fortunately, it's pretty trivial to update the apps to use the newer MPI APIs.