Ompi: undefined reference to `MPI_Errhandler_set': MiniAMR

Created on 20 Jan 2019  路  4Comments  路  Source: open-mpi/ompi

Background information

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.

What version of Open MPI are you using? (e.g., v1.10.3, v2.1.0, git branch name and hash, etc.)

  • Test PASSED on: v3.x.x
  • Test FAILED ON: V4.0.0

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

I downloaded openmpi-4.0.0.tar.gz to update.

Please describe the system on which you are running

  • Distributor ID: Ubuntu
  • Description: Ubuntu 16.04.5 LTS
  • Release: 16.04
  • Codename: xenial

and

  • LSB Version: :core-4.1-amd64:core-4.1-noarch
  • Distributor ID: CentOS
  • Description: CentOS Linux release 7.6.1810 (Core)
  • Release: 7.6.1810
  • Codename: Core

Details of the problem

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

Command

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

Awaiting user information question

All 4 comments

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

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)

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AboorvaDevarajan picture AboorvaDevarajan  路  5Comments

leofang picture leofang  路  4Comments

jsquyres picture jsquyres  路  4Comments

amckinlay picture amckinlay  路  8Comments

pharthiphan picture pharthiphan  路  7Comments