[Pw_forum] compilation problem on PC with Intel compiler

Andriy H. Nevidomskyy ahn22 at hermes.cam.ac.uk
Mon Feb 24 00:09:04 CET 2003


Dear users of PWSCF,

The compilation of PW-code fails on the PC-mashine when using Intel ifc
compiler and Intel MKL library.
It fails at the linking stage and produces the following log:
(sorry for this long e-mail)

cft_3.o: In function `cft_3_':
cft_3.o(.text+0xe4): undefined reference to `fftw3d_f77_create_plan_'
cft_3.o(.text+0x10c): undefined reference to `fftwnd_f77_one_'
cft_fftw.o: In function `cft_1_':
cft_fftw.o(.text+0x5a): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x7d): undefined reference to `fftw_f77_'
cft_fftw.o: In function `cft_1s_':
cft_fftw.o(.text+0x163): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x182): undefined reference to `fftw_f77_'
cft_fftw.o: In function `cft_2_':
cft_fftw.o(.text+0x2f3): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x32b): undefined reference to `fftw_f77_'
cft_fftw.o(.text+0x354): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x3bd): undefined reference to `fftw_f77_'
cft_fftw.o(.text+0x45a): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x4c2): undefined reference to `fftw_f77_'
cft_fftw.o(.text+0x4ff): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x537): undefined reference to `fftw_f77_'
cft_fftw.o: In function `cft_2s_':
cft_fftw.o(.text+0x6cb): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x702): undefined reference to `fftw_f77_'
cft_fftw.o(.text+0x72b): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x795): undefined reference to `fftw_f77_'
cft_fftw.o(.text+0x82d): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x8a3): undefined reference to `fftw_f77_'
cft_fftw.o(.text+0x8e0): undefined reference to `fftw_f77_create_plan_'
cft_fftw.o(.text+0x917): undefined reference to `fftw_f77_'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/temp/ahn22/PWSCF/PW'
make: *** [pw] Error 2

Apparantly this has something to do with the -D option of the compiler,
where macroses are defined. However I didn't succeed to compile it
successfully.
Could anyone help me to resolve this problem, please?

I attached to this e-mail the make.sys file that I was using for
compilation.

Best regards,
Andriy
.------------------------------------------------------------------.
|                        Mr Andriy H. Nevidomskyy                  |
|                                                                  |
|     TCM Group, Cavendish Laboratory, University of Cambridge     |
|          Madingley Road, Cambridge CB3 0HE United Kingdom        |
| Tel:+44-1223-337433,Fax:+44-1223-337356, E-mail: ahn22 at cam.ac.uk |
`------------------------------------------------------------------'


-------------- next part --------------
OSHOME=/temp/ahn22/PWSCF
#
# System-dependent Make definitions for Linux, Intel compiler (v.5-6)
# Edit according to your needs
#
# add -DMKL if using the Intel Mathematical Kernel Library
# Add -DADD_BLAS_ONE_UNDERSCORE if your blas/lapack library names contain 
# two underscores at the end
# Define FFTW library names with one underscore less than they have in
# the library (one underscore is added by the compiler)
#
CPPFLAGS = -I$(OSHOME)/include/ -DPC -DMKL -DFFTW  \
           -D"FFTWND_F77_ONE=fftwnd_f77_one" \
           -D"FFTW3D_F77_CREATE_PLAN=fftw3d_f77_create_plan" \
           -D"FFTW_F77=fftw_f77" \
           -D"FFTW_F77_CREATE_PLAN=fftw_f77_create_plan"

# Fortran compiler:
#
F90 = ifc
#
# fortran options:
# -Vaxlib         enables the use of portability libraries (getarg
#                 and maybe other library calls)
# -W0             disable warnings
# -O3             more aggressive optimization
# -tpp5           Pentium    optimization
# -tpp6           Pentium Pro, 2, 3  optimization
# -tpp7           Pentium 4  optimization
#
FFLAGS =-Vaxlib -O2 -tpp6

F90FLAGS= $(FFLAGS) -fpp $(CPPFLAGS)
#
# This is needed to tell the compiler where modules are
# use this for version < 7
# MODULEFLAG= -cl,./intel.pcl
# use this for version = 7
#MODULEFLAG= -nomodule -I$(OSHOME)/Modules -I$(OSHOME)/PW -I$(OSHOME)/PH
#MODULEFLAG= -nomodule  -I$(OSHOME)/Modules -I$(OSHOME)/PW -I$(OSHOME)/PH
MODULEFLAG= -cl,./intel.pcl

#
# Loader:
#
# The following is for Intel MKL libraries v. 5.1 on Pentium-4
# (remember -DMKL in CPPFLAGS !)
# For MKL v. 5.2, add "-lguide"
# Use libmkl_p3 for Pentium-3, libmkl_p4.a for Pentium-4 machines 
# (MKL will likely not work for other CPUs like Athlon)
#

#LIBS= -lfftw /opt/intel/mkl/lib/32/libmkl_lapack.a \
#      /opt/intel/mkl/lib/32/libmkl_p4.a -lpthread

LIBS=  -lmkl_p3 -lmkl_lapack -lmkl_p3 -lguide -lpthread
#
# The following is for Atlas optimized blas/lapack libraries
# You may not actually need -lcblas . See the manual for details
# on how to fix I/O incompatibility problems with ifc
#
# LIBS = -lfftw -L$(HOME)/Linux_ATHLON256/ -llapack -lf77blas -lcblas -latlas
#
LD=$(F90)
LFLAGS = -Vaxlib $(LIBS)

#
# ar:
#
AR = ar
ARFLAGS = ruv


More information about the Pw_forum mailing list