3
$\begingroup$

I recently installed IntelĀ® oneAPI Base Toolkit and IntelĀ® oneAPI HPC Toolkit using the cimmands:

sudo yum install intel-basekit
sudo yum install intel-hpckit

The packages are installed in /opt/intel/oneapi but when I run ./configure it usually specifies other compilers:

directory QEHeat/src : ok okkokCI : ok
directory ACFDT/src : not present in /rhome/pkgs/QE/qe-7.1/install
directory KCW/PP : okk
all dependencies updated successfully
checking build system type... x86_64-pc-linux-gnu
checking ARCH... x86_64
checking setting AR... ... ar
checking setting ARFLAGS... ... ruv
checking for gfortran... gfortran
checking whether the Fortran compiler works... yes
checking for Fortran 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 Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for mpiifort... no
checking for mpif90... no
checking for ifort... no
checking for nvfortran... no
checking for pgf90... no
checking for nagfor... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking version of gfortran... gfortran 4.8
checking for Fortran flag to compile .f90 files... none
setting F90... gfortran
setting MPIF90... gfortran
checking for cc... cc
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
setting CC... cc
setting CFLAGS... -O3
using F90... gfortran
setting FFLAGS... -O3 -g
setting F90FLAGS... $(FFLAGS) -cpp
setting FFLAGS_NOOPT... -O0 -g
setting CPP... cpp
setting CPPFLAGS... -P -traditional -Uvector
setting LD... gfortran
setting LDFLAGS... -g
checking whether make sets $(MAKE)... yes
checking whether Fortran files must be preprocessed... no
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking for library containing dgemm... no
MKL not found
in /opt/intel/mkl/lib/intel64: checking for library containing dgemm... no
MKL not found
checking for library containing dgemm... no
in /usr/local/lib: checking for library containing dgemm... no
checking for library containing dgemm... -lblas
setting BLAS_LIBS... -lblas
checking for library containing dspev... -llapack
in /usr/local/lib: checking for library containing dspev... -llapack
checking FFT... checking for library containing dfftw_execute_dft... no
in /usr/local/lib: checking for library containing dfftw_execute_dft... no
using internal copy of FFTW

checking MASS...
checking for library containing mpi_init... no
checking ELPA...
checking for Environ... not used
checking for ranlib... ranlib
checking for wget... wget -O
setting WGET... wget -O
checking for git... git
setting DFLAGS... -D__FFTW
setting IFLAGS... -I. -I$(TOPDIR)/include -I$(TOPDIR)/FoX/finclude
configure: creating ./config.status
config.status: creating install/make_lapack.inc
config.status: creating include/configure.h
config.status: creating make.inc
config.status: creating configure.msg
config.status: creating install/make_wannier90.inc
config.status: creating include/qe_cdefs.h
--------------------------------------------------------------------
ESPRESSO can take advantage of several optimized numerical libraries
(essl, fftw, mkl...).  This configure script attempts to find them,
but may fail if they have been installed in non-standard locations.
If a required library is not found, the local copy will be compiled.

The following libraries have been found:
  BLAS_LIBS= -lblas
  LAPACK_LIBS=-L/usr/local/lib -llapack  -lblas
  FFT_LIBS=



Please check if this is what you expect.

If any libraries are missing, you may specify a list of directories
to search and retry, as follows:
  ./configure LIBDIRS="list of directories, separated by spaces"

Parallel environment not detected \(is this a parallel machine?\).\
Configured for compilation of serial executables.

For more info, read the ESPRESSO User's Guide (Doc/users-guide.tex).
--------------------------------------------------------------------
configure: success

How to force ./configure to choose intel oneAPI compilers?

$\endgroup$
2
  • 1
    $\begingroup$ Did you run . /opt/intel/oneapi/setvars.sh (don't miss out the dot!) before you did this? What happens if you export FC=mpiifort and export CC=mpiicc before you configure (and after you run setvars)? $\endgroup$
    – Ian Bush
    Commented Aug 14, 2022 at 20:31
  • $\begingroup$ Oh, the ./configure realized the ifort compiler ideally after running . /opt/intel/oneapi/setvars.sh. Now I am able to install QE using the ifort instead of gfortran. Thanks for alerting me to that. Please post your comment as an answer. @IanBush $\endgroup$
    – Derive D1
    Commented Aug 14, 2022 at 20:42

1 Answer 1

1
$\begingroup$

This is not specific to Quantum Espresso. As explained in the instructions to use the Intel compilers on Linux you need to set a number of environment variables, this being usually achieved by running a script provided by Intel. If you installed the compilers in the default place, /opt/intel , this is achieved by

. /opt/intel/oneapi/setvars.sh

Don't miss out the initial dot! It's important that the script is run in the current shell.

Note this doesn't necessarily solve all configuration problems, it depends on exactly how the configure scripts search for the required software. It may also be necessary to explicitly set the compiler by

export FC=mpiifort

or similar after you have run setvars.sh

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .