cp2k-2.5.0: linking fes
Michael Banck
mba... at gmx.net
Fri Feb 28 16:22:52 UTC 2014
Hi,
I tried to build cp2k-2.5.0 on Linux/gfortran, but when it tried to link
fes, there were lots of undefined references:
gfortran -g -Wall -O2 -ffast-math -funroll-loops -ftree-vectorize
-ffree-form -ffree-line-length-none -D__GFORTRAN -D__FFTSG -D__FFTW3
-D__LIBINT -D__LIBXC2 -D__parallel -D__BLACS -D__SCALAPACK
-D__COMPILE_ARCH="\"Linux-x86_64-gfortran\"" -D__COMPILE_DATE="\"Fri Feb
28 10:37:16 UTC 2014\"" -D__COMPILE_HOST="\"hartree\""
-D__COMPILE_REVISION="\"svn:13632\"" -o
/«PKGBUILDDIR»/makefiles/../exe/Linux-x86_64-gfortran/fes.popt graph.o
machine.o memory_utilities.o periodic_table.o string_utilities.o
f77_blas.o f77_blas_extra.o f77_blas_generic.o f77_blas_netlib.o
f77_blas_poison.o kinds.o graph_methods.o graph_utils.o mathconstants.o
glob_matching.o termination.o cp_para_types.o message_passing.o
c_mpi_calls.o timings.o cuda_profiling.o dict.o dict_i4tuple_callstat.o
timings_base_type.o dict_str_i4.o list.o list_callstackentry.o
list_routinestat.o list_timerenv.o timings_types.o cp_log_handling.o
cp2k_info.o input_constants.o cp_files.o cp_iter_types.o
cp_error_handling.o physcon.o list_routinereport.o
graph.o: In function `graph':
/«PKGBUILDDIR»/makefiles/../src/metadyn_tools/graph.F:88: undefined
reference to `__machine_internal_MOD_m_iargc'
[...]
termination.o: In function `stop_program':
/«PKGBUILDDIR»/makefiles/../src/termination.F:384: undefined reference
to `__machine_internal_MOD_m_flush'
[...]
message_passing.o: In function `__message_passing_MOD_mp_abort':
/«PKGBUILDDIR»/makefiles/../src/message_passing.F:781: undefined
reference to `mpi_abort_'
I guess I'm doing something wrong with my (taken from cp2k-2.4.0, where
I had no issues) arch-file, which goes:
|CC = mpicc
|CPP =
|FC = mpif90
|LD = gfortran
|AR = ar -r
|DFLAGS = -D__GFORTRAN -D__FFTSG -D__FFTW3 $(FFTW3_ALIGN) -D__LIBINT
| -D__LIBXC2 -D__parallel -D__BLACS -D__SCALAPACK
|CPPFLAGS = -C -traditional $(DFLAGS)
|FCFLAGS = -g -Wall -O2 -ffast-math -funroll-loops -ftree-vectorize
| -ffree-form -ffree-line-length-none $(DFLAGS)
|LDFLAGS = $(FCFLAGS)
|LIBS = -llapack -lblas -lfftw3 -lint -lderiv -lxc -lmpi -lmpif90
| -lmpif77 $(LIB_BLACS) $(LIB_SCALAPACK)
|OBJECTS_ARCHITECTURE = machine_gfortran.o
(I'll get rid of OBJECTS_ARCHITECTURE now as it has been removed, but I
don't think that could be the culprit?)
Indeed, fes gets linked without $(LIB_ALL) and $(LIBS) (line 397 in
makefiles/Makefile), is this supposed to work? Or is nobody building
fes?
I'm using the attached patch, it might be ok to apply anyway, even if I
made a silly mistake elsewhere.
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile_linking.patch
Type: text/x-diff
Size: 577 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20140228/be399642/attachment.patch>
More information about the CP2K-user
mailing list