Trunk version Linux x86/64 compilation problem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Siesta |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Dear Developer:
Thank you for offering the open-source code Siesta. I download your trunk branch (746 revisions). However, although I compiled the code successfully as a serial version, the compilation with MPI does not work, reporting the following errors at the last step (linking obj files into the executables):
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
fsockets.o: In function `__f90sockets_
fsockets.
collect2: error: ld returned 1 exit status
I wonder if you could help me to identify the problem? I am using intelmpi (g++/gfortran) and my arch.make file is as follows:
.SUFFIXES:
.SUFFIXES: .f .F .o .c .a .f90 .F90
SIESTA_ARCH = x86-64
CC = g++
FPP = $(FC) -E -P
FC = mpif90
FC_SERIAL = gfortran
FFLAGS = -O2 -fPIC
AR = ar
RANLIB = ranlib
# the following line was added by Zhiping
DUMMY_FOX = --enable-dummy
SYS = nag
SP_KIND = 4
DP_KIND = 8
KINDS = $(SP_KIND) $(DP_KIND)
LDFLAGS =
#COMP_LIBS = libsiestaLAPACK.a libsiestaBLAS.a
FPPFLAGS = $(DEFS_PREFIX)-DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT #
LIBS = -lmkl_scalapack
# SIESTA needs an F90 interface to MPI
MPI_INTERFACE = libmpi_f90.a
MPI_INCLUDE = .
# Dependency rules ---------
FFLAGS_DEBUG = -g -O1 # your appropriate flags here...
# The atom.f code is very vulnerable. Particularly the Intel compiler
# will make an erroneous compilation of atom.f with high optimization
# levels.
atom.o: atom.F
$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
.c.o:
$(CC) -c $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $<
.F.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
.F90.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_
.f.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f) $<
.f90.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90) $<
Thank you very much!
Best,
Zhiping
You are using the C++ compiler ('g++') instead of 'gcc' (C compiler). This causes some
extra name mangling in 'sockets.o' that confuses the linking stage.