xiaoyeli / superlu_dist

Distributed memory, MPI based SuperLU
https://portal.nersc.gov/project/sparse/superlu/
Other
188 stars 65 forks source link

openmpi 4.0 drops support for MPI1 #35

Open opoplawski opened 6 years ago

opoplawski commented 6 years ago

Build fails with openmpi 4.0:

mpicc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power8 -mtune=power8 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power8 -mtune=power8 -O3 -DNDEBUG -DUSE_VENDOR_BLAS -DDEBUGlevel=0 -DPRNTlevel=0 -fopenmp -std=c99 -DUSE_VENDOR_BLAS -fPIC -O3 -DNDEBUG -DUSE_VENDOR_BLAS -DDEBUGlevel=0 -DPRNTlevel=0 -fopenmp -std=c99 -DUSE_VENDOR_BLAS -fPIC  -DUSE_VENDOR_BLAS -I /builddir/build/BUILD/SuperLU_DIST_6.0.0/SRC -c sp_ienv.c 
mpicxx -Wl,-z,relro  -fopenmp pddrive.o dcreate_matrix.o sp_ienv.o  /builddir/build/BUILD/SuperLU_DIST_6.0.0/SRC/libsuperlu_dist.a -lptscotchparmetis -lmetis -lscotch -lptscotch -lptscotcherr -lptscotcherrexit -lopenblas -lm -o pddrive
BUILDSTDERR: /builddir/build/BUILD/SuperLU_DIST_6.0.0/SRC/libsuperlu_dist.a(pdgstrf.o): In function `pdgstrf':
BUILDSTDERR: /builddir/build/BUILD/SuperLU_DIST_6.0.0/SRC/pdgstrf.c:430: undefined reference to `MPI_Attr_get'
BUILDSTDERR: collect2: error: ld returned 1 exit status
zerothi commented 5 years ago

Docs: https://www.open-mpi.org/doc/v4.0/man3/MPI_Attr_get.3.php

Simply replace with MPI_Comm_get_Attr

zerothi commented 5 years ago

For future reference, one should simply configure OpenMPI 4.X with --enable-mpi1-compatibility and problem could also be solved (for older versions of SuperLU-dist)