This thread is locked.Only browsing is available.
Top Page > Browsing
MPI problem during compiling
Date: 2020/07/06 22:35
Name: Eike F. Schwier   <schwier@physik.uni-wuerzburg.de>

Hi everybody,

I tried to compile 3.9.2 for the first time on my cluster and came across an error during linking

[...]-lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl -lifcore -lgfortran -lmpi -lm -o openmx
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `PMPI_Aint_diff'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPII_Op_set_f08'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIR_F_MPI_WEIGHTS_EMPTY'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIX_Comm_revoke'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIX_Comm_failure_get_acked'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPII_Comm_get_attr'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIR_F_MPI_UNWEIGHTED'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPII_Win_set_attr'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIX_Comm_shrink'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `PMPI_Aint_add'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPI_F_ARGVS_NULL'

I am using intel MPI compilers.

is there anybody who has some idea what I am missing?

best wishes,
Eike
メンテ
Page: [1]

Re: MPI problem during compiling ( No.1 )
Date: 2020/07/07 02:44
Name: Naoya Yamaguchi

Hi,

Can you try to change the order of the flags in LIB?

And, I have used the following settings on a cluster or supercomputer:
(ICC+MKL+Intel MPI)
LIB= -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lgfortran -liomp5 -lpthread
(GCC+MKL+Intel MPI)
LIB= -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgfortran -lpthread
(ICC+MKL+Intel MPI)
LIB= -L$(MKLROOT)/lib/intel64/ -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -mkl=parallel -lifcore

Regards,
Naoya Yamaguchi
メンテ
Re: MPI problem during compiling ( No.2 )
Date: 2020/07/09 00:42
Name: Eike F. Schwier  <schwier@physik.uni-wuerzburg.de>

Dear Yamaguchi-san,

thank you very much for your response. I tried all three, unfortunately non compiled successful. I got different errors each time. Seems like -lifcore takes care of the fortran library problem, but the original MPI error remains.

best regards,
Eike


[...] -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lgfortran -liomp5 -lpthread -lm -o openmx
ld: elpa1.o: in function `elpa1_mp_tridiag_real_':
elpa1.f90:(.text+0x324): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0x397): undefined reference to `for_alloc_allocatable'
ld: elpa1.f90:(.text+0x44c): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0x4c2): undefined reference to `for_alloc_allocatable'
ld: elpa1.f90:(.text+0x577): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0x5ed): undefined reference to `for_alloc_allocatable'
ld: elpa1.f90:(.text+0x6a2): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0x718): undefined reference to `for_alloc_allocatable'
ld: elpa1.f90:(.text+0x7c7): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0x83d): undefined reference to `for_alloc_allocatable'
ld: elpa1.f90:(.text+0x9f5): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0xa6b): undefined reference to `for_alloc_allocatable'
ld: elpa1.f90:(.text+0xb25): undefined reference to `for_check_mult_overflow64'
ld: elpa1.f90:(.text+0xb91): undefined reference to `for_alloc_allocatable'


gcc: does not compile due to following error
openmx_common.h:3536:13: warning: inline function ‘Spherical_Bessel’ declared but never defined
inline void Spherical_Bessel( double x, int lmax, double *sb, double *dsb ) ;



[...] -L/usr/lib/x86_64-linux-gnu -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -mkl=parallel -lifcore -lm -o openmx
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `PMPI_Aint_diff'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPII_Op_set_f08'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIR_F_MPI_WEIGHTS_EMPTY'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIX_Comm_revoke'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIX_Comm_failure_get_acked'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPII_Comm_get_attr'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIR_F_MPI_UNWEIGHTED'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPII_Win_set_attr'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `MPIX_Comm_shrink'
ld: /usr/lib/intel/mpi/libmpifort.so: undefined reference to `PMPI_Aint_add'
メンテ
Re: MPI problem during compiling ( No.3 )
Date: 2020/07/09 03:58
Name: Naoya Yamaguchi

Dear Eike-san,

The former is the same error as reported in No.1, 2 of a thread in http://www.openmx-square.org/forum/patio.cgi?mode=view&no=1501
And the solution might be that shown in slide 11 (Frequently Encountered Error Messages (2)) of http://www.openmx-square.org/tech_notes/OpenMX-Compile.pdf
Could you try it?

The latter looks similar to:
https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/Where-are-these-references-located-Installation-error/td-p/1059230?profile.language=en
https://lammps.sandia.gov/threads/msg82768.html
, and the problems don't seem to be solved in both threads. I wonder if there might be some broken parts about MPI.

I left the following in my previous post but (ICC+MKL+Intel MPI) is not correct and should be replaced with (GCC+MKL+Intel MPI).
(ICC+MKL+Intel MPI)
LIB= -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lgfortran -liomp5 -lpthread
And, you need -lifcore in using ICC as you said.

Regards,
Naoya Yamaguchi
メンテ
Re: MPI problem during compiling ( No.4 )
Date: 2020/07/09 23:13
Name: Eike F. Schwier  <schwier@physik.uni-wuerzburg.de>

Dear Yamaguchi-san,

thanks for your advice. I was able to compile the code and successfully run the work/Pt13.dat example using a slightly modified version of your linker line

CC = mpiicc -O3 -xHOST -ip -no-prec-div -qopenmp -I/usr/lib/intel/compiler/include -I/usr/include/mkl/fftw
FC = mpiifort -O3 -xHOST -ip -no-prec-div -qopenmp
LIB= -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lgfortran -liomp5 -lpthread -lifcore


thank you very much for your kind assistance,
best regards,
Eike

メンテ

Page: [1]