Compiling with gfortran + MKL: Error

Eric Shamay eric.... at gmail.com
Wed Feb 17 22:12:58 UTC 2010


Any ideas on solving the following code issues?

***********************************
Here is my configuration file for compiling the serial code using
gfortran:

CC       = gcc
CPP      =
FC       = gfortran
LD       = gfortran
AR       = ar -r
DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3
CPPFLAGS =

FFTW3 = /common/src/fftw-3.1.2/cl1-gfortran
FCFLAGS  = -O2 -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form  $(DFLAGS) -L$(MKLROOT)/lib/em64t
LIBS     = -lmkl_lapack -lmkl -lguide $(FFTW3)/lib/libfftw3.a -
lpthread

OBJECTS_ARCHITECTURE = machine_gfortran.o


I receive the following errors:
*****************************************
gfortran -c -O2 -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form -D__GFORTRAN -D__FFTSG -D__FFTW3 -L/opt/intel/
mkl/10.0.3.020/lib/em64t -D__COMPILE_ARCH="\"cl1\"" -
D__COMPILE_DATE="\"Wed Feb 17 14:14:35 PST 2010\"" -
D__COMPILE_HOST="\"cl1\"" -D__COMPILE_LASTCVS="\"/xc_pot_saop.F/1.44/
Wed Feb 17 22:01:53 2010//\"" /common/cp2k-2/cp2k/makefiles/../src/
machine_gfortran.F
/common/cp2k-2/cp2k/makefiles/../src/machine_gfortran.F:91.29:

       FUNCTION getpagesize() BIND(C,name="getpagesize") RESULT(RES)
                            1
Error: Unexpected junk after function declaration at (1)
/common/cp2k-2/cp2k/makefiles/../src/machine_gfortran.F:92.26:

         USE ISO_C_BINDING
                         1
Error: Unexpected USE statement in INTERFACE block at (1)
/common/cp2k-2/cp2k/makefiles/../src/machine_gfortran.F:93.17:

         INTEGER(C_INT) :: RES
                1
Error: Parameter 'c_int' at (1) has not been declared or is a
variable, which does not reduce to a constant expression
/common/cp2k-2/cp2k/makefiles/../src/machine_gfortran.F:94.10:

       END FUNCTION
         1
Error: Expecting END INTERFACE statement at (1)
/common/cp2k-2/cp2k/makefiles/../src/machine_gfortran.F:112.38:

         m_memory=m_memory*getpagesize()
                                     1
Error: Function 'getpagesize' at (1) has no IMPLICIT type
make[1]: *** [machine_gfortran.o] Error 1
make[1]: Leaving directory `/common/cp2k-2/cp2k/obj/cl1/sopt'
make: *** [build] Error 2

~Eric



More information about the CP2K-user mailing list