- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get an link error when compile espresso-5.0.2, the problem are as follows:(icc version 14.0.1 icpc version 14.0.1 ifort version cpp version 4.4.7 ifort version 14.0.1)
my configure is ./configure CC=icc CXX=icpc F77=ifort F90=ifort FC=ifort CPP=cpp
then it success,I entry make all, get the problem:
ifort -O3 -g -c lsame.f -o lsame.o
ifort -O3 -g -c lsametst.f -o lsametst.omp
if90 -L/opt/intel/lib/intel64 -o testlsame lsame.o lsametst.olsametst.o:
In function `test1':
/home/qz/espresso-5.0.2/lapack-3.2/INSTALL/lsametst.f:1: undefined reference to `__intel_new_feature_proc_init'
/home/qz/espresso-5.0.2/lapack-3.2/INSTALL/lsametst.f:1: undefined reference to `for_set_reentrancy'
/home/qz/espresso-5.0.2/lapack-3.2/INSTALL/lsametst.f:27: undefined reference to `for_write_seq_lis'
/home/qz/espresso-5.0.2/lapack-3.2/INSTALL/lsametst.f:27: undefined reference to `for_write_seq_lis_xmit'
/home/qz/espresso-5.0.2/lapack-3.2/INSTALL/lsametst.f:33: undefined reference to `for_write_seq_fmt'
/home/qz/espresso-5.0.2/lapack-3.2/INSTALL/lsametst.f:33: undefined reference to `for_write_seq_fmt_xmit'
collect2: ld returned 1 exit status
make[3]: *** [testlsame] Error 1
make[3]: Leaving directory `/home/qz/espresso-5.0.2/lapack-3.2/INSTALL'
make[2]: *** [lapack_install] Error 2
make[2]: Leaving directory `/home/qz/espresso-5.0.2/lapack-3.2'
make[1]: *** [liblapack_internal] Error 2
make[1]: Leaving directory `/home/qz/espresso-5.0.2/install'
make: *** [liblapack] Error 2
I try a lot of thing such as modify the configure to ./configure CC=icc CXX=icpc F77=ifort F90=ifort FC=ifort CPP=cpp LDFLAGS="-L/opt/intel/lib/intel64"
but it does not work ,anyone can help? thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From your log, it looks like you're using the command "if90" to do the link step.
What do you have "if90" defined to be? May I suggest you set it to be "ifort", and try again.
The undefined references are found in Fortran run time libraries that would be automatically pulled in by the "ifort" command.
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lorri Menard (Intel) wrote:
From your log, it looks like you're using the command "if90" to do the link step.
What do you have "if90" defined to be? May I suggest you set it to be "ifort", and try again.
The undefined references are found in Fortran run time libraries that would be automatically pulled in by the "ifort" command.
--Lorri
sorry, I have made a mistake when copy the message to there:(
"f90" is the copy mistake by "mpif90", the complete output is"mpif90 -g -o testlsame lsame.o lsametst.o",I am very sorry for my carelessness
by the way, the Makefile is not made by myself , I just use ./configure ,the it generate automatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lorri Menard (Intel) wrote:
From your log, it looks like you're using the command "if90" to do the link step.
What do you have "if90" defined to be? May I suggest you set it to be "ifort", and try again.
The undefined references are found in Fortran run time libraries that would be automatically pulled in by the "ifort" command.
--Lorri
sorry, I have made a mistake when copy the message to there:(
"f90" is the copy mistake by "mpif90", the complete output is"mpif90 -g -o testlsame lsame.o lsametst.o",I am very sorry for my carelessness
by the way, the Makefile is not made by myself , I just use ./configure ,the it generate automatically.
Makefile
# make.sys. Generated from make.sys.in by configure.
# compilation rules
.SUFFIXES :
.SUFFIXES : .o .c .f .f90
.f90.o:
$(MPIF90) $(F90FLAGS) -c $<
# .f.o and .c.o: do not modify
.f.o:
$(F77) $(FFLAGS) -c $<
.c.o:
$(CC) $(CFLAGS) -c $<
MANUAL_DFLAGS =
DFLAGS = -D__GFORTRAN -D__STD_F95 -D__FFTW3 -D__MPI -D__PARA $(MANUAL_DFLAGS)
FDFLAGS = $(DFLAGS)
IFLAGS = -I../include
MOD_FLAG = -I
MPIF90 = mpif90
#F90 = gfortran
CC = icc
F77 = ifort
CPP = cpp
CPPFLAGS = -P -traditional $(DFLAGS) $(IFLAGS)
CFLAGS = -O3 $(DFLAGS) $(IFLAGS)
F90FLAGS = $(FFLAGS) -x f95-cpp-input $(FDFLAGS) $(IFLAGS) $(MODFLAGS)
FFLAGS = -O3 -g
FFLAGS_NOOPT = -O0 -g
FFLAGS_NOMAIN =
LD = mpif90
LDFLAGS = -g
LD_LIBS =
BLAS_LIBS = /home/qz/espresso-5.0.2/BLAS/blas.a
BLAS_LIBS_SWITCH = internal
LAPACK_LIBS = /home/qz/espresso-5.0.2/lapack-3.2/lapack.a
LAPACK_LIBS_SWITCH = internal
ELPA_LIBS_SWITCH = disabled
SCALAPACK_LIBS =
FFT_LIBS = -lfftw3
MPI_LIBS =
MASS_LIBS =
AR = ar
ARFLAGS = ruv
RANLIB = ranlib
FLIB_TARGETS = all
LIBOBJS = ../flib/ptools.a ../flib/flib.a ../clib/clib.a ../iotk/src/libiotk.a
LIBS = $(SCALAPACK_LIBS) $(LAPACK_LIBS) $(FFT_LIBS) $(BLAS_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(LD_LIBS)
WGET = wget -O
TOPDIR = /home/qz/espresso-5.0.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If mpif90 is a proper wrapper for ifort, you will get an Intel build date from mpif90 -v, and adding -# to the if90 command line will show the library searches. Depending on your variety of mpif90, 'mpif90 -showme' may reveal its identity. You can't mix varieties of Fortran simply by adding library paths.
If you are using Intel MPI, mpif90 comes configured for gfortran, not ifort, while mpiifort is configured for ifort.
Current versions of OpenMPI use mpifort, but you still need to build it against ifort in accordance with their FAQ, so that you have ifort compatible builds of the MPI Fortran libraries. If you simply installed OpenMPI from your linux package manager, that would use the corresponding (old?) version of gfortran. It's worth while to have a current MPI, even if you use old gcc. 4.4.7 is years out of date, but ifort use (and icpc, within the limitations of the old g++) with are supported).

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page