Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error when openmpi is upgraded to 4.0.0 #3

Open
abeltre1 opened this issue Jan 20, 2019 · 4 comments
Open

Compilation error when openmpi is upgraded to 4.0.0 #3

abeltre1 opened this issue Jan 20, 2019 · 4 comments

Comments

@abeltre1
Copy link

abeltre1 commented Jan 20, 2019

I was able to test it on Openmpi-3.0.0 and it worked fine. However, when I moved my system to 4.0.0 I was hit with an error at this line.

ierr = MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);

SOLUTION:

I removed the line from main and everything compiled perfectly. However, as I am not one of the application developers. I would like to know if you can take a look and if removing that line does not trigger other things to fail throughout the different application components.

@nmhamster
Copy link
Member

Hey, what error did you get during the compile?

@abeltre1
Copy link
Author

Hey, what error did you get during the compile?

mpicc -o ma.x block.o check_sum.o comm_block.o comm.o comm_parent.o comm_refine.o comm_util.o driver.o init.o main.o move.o pack.o plot.o profile.o rcb.o refine.o stencil.o target.o util.o -lm
main.o: In function main': main.c:(.text.startup+0x1bc): undefined reference to MPI_Errhandler_set'
collect2: error: ld returned 1 exit status
Makefile:15: recipe for target 'ma.x' failed
make: *** [ma.x] Error 1

@abeltre1
Copy link
Author

@jsquyres
Copy link

@nmhamster The issue is that Open MPI v4.0.0 finally removed some MPI APIs that were removed from the MPI v3.0 spec back in 2012.

Fortunately, updating to stop using MPI_Errhandle_set is trivial: just use MPI_Comm_set_errhandler instead -- the arguments and behavior is exactly the same (see https://www.open-mpi.org/faq/?category=mpi-removed#mpi-1-mpi-errhandler-set). MPI_Comm_set_errhandler has been in the MPI spec since v2.0 -- i.e., 1996. So every MPI implementation has it; you shouldn't have any portability problems when you switch over to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants