如何强制/配置为使用intel oneAPI编译器



我最近使用cimmands:安装了英特尔®;oneAPI基本工具包和英特尔®;oneAPI HPC工具包

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

软件包安装在/opt/intel/oneapi中但当我运行./configure时,它通常指定其他编译器:

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

如何强制./configure选择intel oneAPI编译器?

以下是您的问题的解决方案!

设置的关键环境变量

using F90... gfortran
setting FFLAGS... -O3 -g
setting F90FLAGS... $(FFLAGS) -cpp
setting FFLAGS_NOOPT... -O0 -g

所以

export F90=ifort
export FFLAGS='-O3 -xhost -g'
export FFLAGS_NOOPT='-O0 -g'

最新更新