Compile with gfortran parallel

Marce mar... at gmail.com
Fri Feb 4 12:53:45 UTC 2011


Hi all,

now I have tried to compile cp2k in CentOS 5.5 with Gfortran 4.4 and
OpenMPI 1.4.2 (OpenMPI has been compiled with gfortran 4.4 too).
I tried several methods to compile this package:

· ScalaPack Installer 0.96: With this package, I can compile BLAS,
BLACS, ScalaPack and Lapack in their last versions. It was all fine,
and it created the libs.

· CentOS repos: I have installed the same packages, and after that, I
linked them in the arch Makefile.

I used this arch file: Linux.x86_64-gfortran.popt (modified from
spot):


CC       = cc
CPP      =

FC       = mpif90
LD       = mpif90

AR       = ar -r

CPPFLAGS =

DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__parallel -D__BLACS -
D__SCALAPACK
FCFLAGS  = -O2 -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form $(DFLAGS)
LDFLAGS  = $(FCFLAGS)
#LIBS     = -L$(HOME)/SCALAPACK/lib/libscalapack.a \
#          -L$(HOME)/SCALAPACK/lib/libreflapack.a \
#           -L$(HOME)/SCALAPACK/lib/librefblas.a \
#           -L$(HOME)/SCALAPACK/lib/blacs.a \
#           -L$(HOME)/SCALAPACK/lib/blacsC.a \
#           -L$(HOME)/SCALAPACK/lib/blacsF77.a \
#           -lfftw3
LIBS    = -L/usr/lib64/libblas.a \
          -L/usr/lib64/liblapack.a \
          -L/usr/lib64/libmpiblacs.a \
          -L/usr/lib64/libmpiblacsCinit.a \
          -L/usr/lib64/libmpiblacsF77init.a \
          -L/usr/lib64/libscalapack.a \
          -L/usr/lib64/libfftw3.a

OBJECTS_ARCHITECTURE = machine_gfortran.o

(As you can see, I don't use at the same time both configurations..).

After that, when I compile, I get the following problem:

(..)

library_tests.F:(.text+0x3293): undefined reference to `dgemm_'
library_tests.F:(.text+0x3313): undefined reference to `dgemm_'
library_tests.F:(.text+0x338c): undefined reference to `dgemm_'
library_tests.F:(.text+0x33f8): undefined reference to `dgemm_'
library_tests.F:(.text+0x34fd): undefined reference to `dgemm_'
/home/aplicaciones/SOURCES/cp2k/makefiles/../lib/Linux-x86-64-gfortran/
popt/libcp2k_lib.a(library_tests.o):library_tests.F:(.text+0x357d):
more undefined references to `dgemm_' follow
/home/aplicaciones/SOURCES/cp2k/makefiles/../lib/Linux-x86-64-gfortran/
popt/libcp2k_lib.a(mathlib.o): In function `__mathlib_MOD_diamat_all':
mathlib.F:(.text+0x304a): undefined reference to `dsyevd_'
mathlib.F:(.text+0x325f): undefined reference to `dsyev_'
mathlib.F:(.text+0x33be): undefined reference to `ilaenv_'
/home/aplicaciones/SOURCES/cp2k/makefiles/../lib/Linux-x86-64-gfortran/
popt/libcp2k_lib.a(mathlib.o): In function `__mathlib_MOD_invmat':
mathlib.F:(.text+0x3b6e): undefined reference to `dgetrf_'
mathlib.F:(.text+0x3d3b): undefined reference to `dgetri_'
/home/aplicaciones/SOURCES/cp2k/makefiles/../lib/Linux-x86-64-gfortran/
popt/libcp2k_lib.a(mathlib.o): In function
`__mathlib_MOD_invert_matrix_d':
mathlib.F:(.text+0x6da9): undefined reference to `dgetrf_'
mathlib.F:(.text+0x6e9c): undefined reference to `dlange_'
mathlib.F:(.text+0x6f20): undefined reference to `dgecon_'
mathlib.F:(.text+0x7301): undefined reference to `dgetrs_'
mathlib.F:(.text+0x7532): undefined reference to `dgerfs_'
/home/aplicaciones/SOURCES/cp2k/makefiles/../lib/Linux-x86-64-gfortran/
popt/libcp2k_lib.a(mathlib.o): In function
`__mathlib_MOD_invert_matrix_z':
mathlib.F:(.text+0x84ef): undefined reference to `zgetrf_'
mathlib.F:(.text+0x85e0): undefined reference to `zlange_'
mathlib.F:(.text+0x8664): undefined reference to `zgecon_'
mathlib.F:(.text+0x8a45): undefined reference to `zgetrs_'
mathlib.F:(.text+0x8c72): undefined reference to `zgerfs_'
 (...)

I can see that there are some problem with undefined_references.. Do
you know how I can solve this? Is there any special configuration? Has
anybody compiled CP2K with this configuration?

Thanks for all..

Regards


More information about the CP2K-user mailing list