Top Page > Browsing
Error in undefined reference to `ompi_mpi_comm_null'
Date: 2024/03/27 14:39
Name: Jaysen Brian S.

Dear OpenMx developers,

I currently have a problem in compiling OpenMx. Here are my makefile settings:

MPIROOT = /opt/intel/oneapi/mpi/2021.3.0/include
MKLROOT = /opt/intel/oneapi/mkl/2021.3.0
CC = mpicc -O3 -ffast-math -fopenmp -fcommon -I/opt/intel/oneapi/mkl/2021.3.0/include/fftw
FC = mpif90 -O3 -ffast-math -fopenmp -fallow-argument-mismatch -I${MPIROOT}/gfortran/9.1.0
LIB= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl -lgfortran

and below is the error message

/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_comm_null'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `MPI_Comm_f2c'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_double'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_dblcplex'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_packed'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_op_max'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_op_maxloc'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_op_min'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_byte'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_comm_world'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_float'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_request_null'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_cplex'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_unsigned_short'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `MPI_Comm_c2f'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_double_int'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_int'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_long_long_int'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_integer'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_dblprec'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `MPI_Type_f2c'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `MPI_Op_f2c'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_op_sum'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `MPI_Op_c2f'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `ompi_mpi_real'
/usr/bin/ld: /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_blacs_openmpi_lp64.so: undefined reference to `MPI_Type_c2f'
collect2: error: ld returned 1 exit status
make: *** [makefile:211: openmx] Error 1

I'm using Ubuntu 22.04.3 LTS as WSL.

Any help will be appriciated.Thanks in advance.

Sincerely,
Jaysen Brian S
メンテ
Page: [1]

Re: Error in undefined reference to `ompi_mpi_comm_null' ( No.1 )
Date: 2024/03/28 16:18
Name: Naoya Yamaguchi

Hi,

If you are using oneAPI, it appears that the parameters in the makefile are not set correctly.
Please refer to https://www.openmx-square.org/forum/patio.cgi?mode=view&no=3214 .

Regards,
Naoya Yamaguchi
メンテ
Re: Error in undefined reference to `ompi_mpi_comm_null' ( No.2 )
Date: 2024/03/29 10:41
Name: Jaysen Brian S.

Thanks for the reply.

I already solved the problem by adding -lifcore to LIB.
メンテ

Page: [1]

Thread Title (must) Move the thread to the top
Your Name (must)
E-Mail (must)
URL
Password (used in modification of the submitted text)
Comment (must)

   Save Cookie