[CP2K:2564] Compiling with gfortran + MKL: Error

Juerg Hutter hut... at pci.uzh.ch
Thu Feb 18 10:20:31 UTC 2010


Hi

most likely you are using an older version of gfortran (gcc 4.1?).
You can either upgrade to gcc 4.4 or use the
__HAS_NO_ISO_C_BINDING flag.

regards

Juerg

----------------------------------------------------------
Juerg Hutter                   Phone : ++41 44 635 4491
Physical Chemistry Institute   FAX   : ++41 44 635 6838
University of Zurich           E-mail: hut... at pci.uzh.ch
Winterthurerstrasse 190
CH-8057 Zurich, Switzerland
----------------------------------------------------------


On Wed, 17 Feb 2010, Eric Shamay wrote:

> 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
>
> -- 
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To post to this group, send email to cp... at googlegroups.com.
> To unsubscribe from this group, send email to cp2k+uns... at googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cp2k?hl=en.
>
>



More information about the CP2K-user mailing list