Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Mpi_Problem

Sherif_Yehia
Beginner
1,310 Views

Dear Expert

  I am trying to set Elpa software with Intel compiler mpiifort

got the following errors.

checking whether mpiifort accepts -g... yes
checking for function MPI_INIT... no
checking for function MPI_INIT in -lmpichf90... no
checking for function MPI_INIT in -lfmpi... no
checking for function MPI_INIT in -lfmpich... no
configure: error: Could not compile an MPI Fortran program

Could you help me to figure out my mistakes

Thanks for your effort and time

 

0 Kudos
8 Replies
Steve_Lionel
Honored Contributor III
1,296 Views

I think you'd get a more informed response in Intel® oneAPI HPC Toolkit - Intel Communities , but my guess is that you don't have an MPI library installed that mpifort knows how to find.

0 Kudos
Sherif_Yehia
Beginner
1,237 Views

Thanks very much for your quick response

I guess I found my problem  with google help & your advice in

1-.bashrc  file 

2-https://stackoverflow.com/questions/70687930/intel-oneapi-2022-libimf-so-no-such-file-or-directory-during-openmpi-compila

 

Please acknowledge that or direct me { I am beginner} 

I created      intel_libs.conf in ld.so.conf.d

with the line in  intel_libs.conf
/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin

then try ldconfig

It work thanks again

Thanks v. much

Best regards

 

0 Kudos
Ron_Green
Moderator
1,292 Views

I agree with Steve - looks like either you don't have an Intel compiler compatible MPI installed or you didn't run the setvars script to path MPI correctly.  Below is where you can download Intel MPI, from here.  

Ron_Green_0-1660683566805.png

 

then go to THIS PAGE and click the "Documentation" tab and read the "Get Started" for your OS

 

0 Kudos
Sherif_Yehia
Beginner
1,276 Views

Hello Steve & Ron

  Thanks my dear experts  for the quick advice I already have the . bashrc 

I downloaded and set up the l_mpi_oneapi_p_2021.6.0.602_offline.sh

Please see the .bashrc

 

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

/opt/intel/oneapi

# FC=ifort

source /opt/intel/oneapi/setvars.sh intel64
source /opt/intel/oneapi/mpi/2021.6.0/env/vars.sh


# CC=icc

source /opt/intel/oneapi/setvars.sh intel64

source /usr/share/Modules/init/sh

 

export F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xhost -g'
export FFLAGS_NOOPT='-O0 -g'
export CC=icc
export CXX=icpc
export PATH=$PATH:/opt/intel/oneapi/compiler/2022.0.2/linux/bin/intel64:/opt/intel_openmpi/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel_openmpi/lib:opt/intel/oneapi/compiler/2022.0.2/linux/compiler/lib/intel64_lin
export LD_RUN_PATH=$LD_RUN_PATH:/opt/intel_openmpi/lib

 

Possibly I am doing another stupid mistake

I hope you can  direct me

Have a wonderful time

Sherif

 

0 Kudos
Ron_Green
Moderator
1,270 Views

shoot, I should have told you to set FC=mpiifort, not ifort

 

before running ./configure, confirm the env var is set

 

echo $FC

  should return

mpiifort

 

next:

which mpiifort

to confirm your setvars.sh was invoked.  Also, you do not need to source /opt/intel/oneapi/mpi/2021.6.0/env/vars.sh, setvars does that.

 

next:

 

 

mpiifort -V
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.6.0 Build 20220226_000000
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.

 

 

next, try

 

./configure FC=mpiifort 

along with any other config options you pass to it.

 

 

0 Kudos
Sherif_Yehia
Beginner
1,164 Views

Thanks Ron

here is your advice

[sherifyehia@192 build]$ echo $FC
mpiifort
[sherifyehia@192 build]$ which mpiifort
/opt/intel/oneapi/mpi/2021.6.0/bin/mpiifort
[sherifyehia@192 build]$ mpiifort -V
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.6.0 Build 20220226_000000
Copyright (C) 1985-2022 Intel Corporation. All rights reserved..

on compiling ELPA software again mpi in NOT WORKING

../configure FC=mpiifort CC=mpiicc --prefix=/opt/elpa-2021.05.002_bugfix FCFLAGS="-O0 -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -I/opt/intel/oneapi/mpi/latest/bin -L/opt/intel/oneapi/mpi/2021.6.0/include -L/opt/intel/oneapi/mkl/latest/lib/intel64 -lpthread -ldl -liomp5" SCALAPACK_LDFLAGS="-L/usr/local/lib -lmkl_scalapack_lp64 -L/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core" CFLAGS="-O0 -traceback"

 

 

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for build time... 1660766859
checking for GNU make... make
checking whether in C interface the error argument should be optional... no
checking for GNU make... make
checking whether --enable-openmp is specified... no
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether icpc accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of icpc... gcc3
checking whether to compile using MPI... yes
checking for gcc... mpiicc
checking whether we are using the GNU C compiler... yes
checking whether mpiicc accepts -g... yes
checking for mpiicc option to accept ISO C89... none needed
checking whether mpiicc understands -c and -o together... yes
checking dependency style of mpiicc... gcc3
checking for function MPI_Init... yes
checking for mpi.h... yes
checking whether C compiler accepts -std=gnu11... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for x86 cpuid output... unknown
checking for x86-AVX xgetbv output... unknown
checking for x86 cpuid 0x00000000 output... 10:68747541:444d4163:69746e65
checking for x86 cpuid 0x80000000 output... 80000020:68747541:444d4163:69746e65
checking for x86 cpuid 0x00000001 output... 860f01:7080800:7ed8320b:178bfbff
checking for x86 cpuid 0x00000007 output... 0:219c91a9:400004:0
checking for x86 cpuid 0x80000001 output... 860f01:0:75c237ff:2fd3fbff
checking for x86-AVX xgetbv 0x00000000 output... 7:0
checking whether RDRND is supported by the processor... yes
checking whether RDRND is supported by the processor and OS... yes
checking whether C compiler accepts -mrdrnd... yes
checking whether BMI1 is supported by the processor... yes
checking whether BMI1 is supported by the processor and OS... yes
checking whether C compiler accepts -mbmi... yes
checking whether BMI2 is supported by the processor... yes
checking whether BMI2 is supported by the processor and OS... yes
checking whether C compiler accepts -mbmi2... yes
checking whether ADX is supported by the processor... yes
checking whether ADX is supported by the processor and OS... yes
checking whether C compiler accepts -madx... yes
checking whether MPX is supported by the processor... no
checking whether PREFETCHWT1 is supported by the processor... no
checking whether ABM is supported by the processor... yes
checking whether ABM is supported by the processor and OS... yes
checking whether C compiler accepts -mabm... yes
checking whether MMX is supported by the processor... yes
checking whether MMX is supported by the processor and OS... yes
checking whether C compiler accepts -mmmx... yes
checking whether SSE is supported by the processor... yes
checking whether SSE is supported by the processor and OS... yes
checking whether C compiler accepts -msse... yes
checking whether SSE2 is supported by the processor... yes
checking whether SSE2 is supported by the processor and OS... yes
checking whether C compiler accepts -msse2... yes
checking whether SSE3 is supported by the processor... yes
checking whether SSE3 is supported by the processor and OS... yes
checking whether C compiler accepts -msse3... yes
checking whether SSSE3 is supported by the processor... yes
checking whether SSSE3 is supported by the processor and OS... yes
checking whether C compiler accepts -mssse3... yes
checking whether SSE4.1 is supported by the processor... yes
checking whether SSE4.1 is supported by the processor and OS... yes
checking whether C compiler accepts -msse4.1... yes
checking whether SSE4.2 is supported by the processor... yes
checking whether SSE4.2 is supported by the processor and OS... yes
checking whether C compiler accepts -msse4.2... yes
checking whether SSE4a is supported by the processor... yes
checking whether SSE4a is supported by the processor and OS... yes
checking whether C compiler accepts -msse4a... yes
checking whether SHA is supported by the processor... yes
checking whether SHA is supported by the processor and OS... yes
checking whether C compiler accepts -msha... yes
checking whether AES is supported by the processor... yes
checking whether AES is supported by the processor and OS... yes
checking whether C compiler accepts -maes... yes
checking whether AVX is supported by the processor... yes
checking whether AVX is supported by the processor and OS... yes
checking whether C compiler accepts -mavx... yes
checking whether FMA3 is supported by the processor... yes
checking whether FMA3 is supported by the processor and OS... yes
checking whether C compiler accepts -mfma... yes
checking whether FMA4 is supported by the processor... no
checking whether XOP is supported by the processor... no
checking whether AVX2 is supported by the processor... yes
checking whether AVX2 is supported by the processor and OS... yes
checking whether C compiler accepts -mavx2... yes
checking whether AVX512-F is supported by the processor... no
checking whether AVX512-CD is supported by the processor... no
checking whether AVX512-PF is supported by the processor... no
checking whether AVX512-ER is supported by the processor... no
checking whether AVX512-VL is supported by the processor... no
checking whether AVX512-BW is supported by the processor... no
checking whether AVX512-DQ is supported by the processor... no
checking whether AVX512-IFMA is supported by the processor... no
checking whether AVX512-VBMI is supported by the processor... no
checking whether heterogenous-cluster-support should be enabled... no
checking how to run the C preprocessor... mpiicc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of long int... 8
checking whether 64bit integers should be used for math libraries (BLAS/LAPACK/SCALAPACK)... no
checking whether 64bit integers should be used for the MPI library... no
checking whether C compiler can use _Generic ... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of mpiicc... gcc3
checking for mpiicc option to accept ISO C99... none needed
checking whether to compile using MPI... yes
checking whether we are using the GNU Fortran compiler... no
checking whether mpiifort accepts -g... yes
checking for function MPI_INIT... no
checking for function MPI_INIT in -lmpichf90... no
checking for function MPI_INIT in -lfmpi... no
checking for function MPI_INIT in -lfmpich... no
configure: error: Could not compile an MPI Fortran program

 

    Thank you very much for the help

0 Kudos
Sherif_Yehia
Beginner
1,244 Views

Hello

  Thanks for the kindly help

I followed your advice

[root@192 build]# echo $FC
mpiifort
[root@192 build]# which mpiifort
/opt/intel/oneapi/mpi/2021.6.0/bin/mpiifort
[root@192 build]# mpiifort -V
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.6.0 Build 20220226_000000
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

 

 I guess my problem is the file mpif.h is not seen and I get the same problems  please see the errors

 

checking the archiver (ar) interface... ar
checking dependency style of mpiicc... gcc3
checking for mpiicc option to accept ISO C99... none needed
checking whether to compile using MPI... yes
checking whether we are using the GNU Fortran compiler... no
checking whether mpiifort accepts -g... yes
checking for function MPI_INIT... no
checking for function MPI_INIT in -lmpichf90... no
checking for function MPI_INIT in -lfmpi... no
checking for function MPI_INIT in -lfmpich... no
configure: error: Could not compile an MPI Fortran program

 

   Thanks experts

Have a good day

 

 

0 Kudos
Ron_Green
Moderator
1,208 Views

you did in 'source /opt/intel/oneapi/setvars.sh' ?

 

maybe your configure needs you to tell it where MPI is located?

 

./configure --help

 

or look in the configure script for any MPI* variables it may be using.  better yet, attach your configure script here

0 Kudos
Reply