Skip to content

ADDA version 1.2 and higher fails to compile #284

@pulmonarycosignerkindness

Description

Describe the bug

I'm trying to compile ADDA v.1.4.0 (with make seq or make mpi, both give the same result), but I get errors saying,

/usr/bin/ld: GenerateB.o:(.bss+0xc8): multiple definition of 'InterTerm_real'; calculator.o:(.bss+0x3a8): first defined here
/usr/bin/ld: GenerateB.o:(.bss+0xb8): multiple definition of 'ReflTerm_real'; calculator.o:(.bss+0x398): first defined here

and so on, which makes the compiler exit with error 1. I have installed FFTW3, and MPICH, I have the fortran, C and C++ compilers, and have tried to manually set the paths, e.g. FFTW3_INC_PATH, but that doesn't work either.

I get the same error for all ADDA versions above 1.1. Version 1.1 succeeds in compiling without any errors.

To reproduce

  1. Unpack the latest archive of ADDA
  2. Enter the src folder and execute make, make seq or make mpi
  3. Wait for error
  4. See error

Expected behavior

The program should compile.

Output

gfortran -c -O3 -ffast-math -funroll-loops -w  ../fort/dtrhre.f
gfortran -c -O3 -ffast-math -funroll-loops -w  ../fort/propaesplibreintadda.f
Linking needs to be redone
echo -n "mpicc -w -lm -lfftw3 -lgfortran" > .ldopts
Building adda_mpi
mpicc -o adda_mpi ADDAmain.o CalculateE.o calculator.o chebyshev.o cmplx.o comm.o crosssec.o GenerateB.o interaction.o io.o iterative.o linalg.o make_particle.o memory.o mt19937ar.o param.o Romberg.o sinint.o somnec.o timing.o vars.o fft.o matvec.o d07hre.o d09hre.o d113re.o d132re.o dadhre.o dchhre.o dcuhre.o dfshre.o dinhre.o drlhre.o dtrhre.o propaesplibreintadda.o   -w -lm -lfftw3 -lgfortran
/usr/bin/ld: GenerateB.o:(.bss+0xc8): multiple definition of `InterTerm_real'; calculator.o:(.bss+0x3a8): first defined here
/usr/bin/ld: GenerateB.o:(.bss+0xb8): multiple definition of `ReflTerm_real'; calculator.o:(.bss+0x398): first defined here
/usr/bin/ld: GenerateB.o:(.bss+0xc0): multiple definition of `ReflTerm_int'; calculator.o:(.bss+0x3a0): first defined here
/usr/bin/ld: GenerateB.o:(.bss+0xd0): multiple definition of `InterTerm_int'; calculator.o:(.bss+0x3b0): first defined here
...
collect2: error: ld returned exit status 1
make[1]: *** [../common.mk:72: adda_mpi] Error 1

Technical information

  • ADDA version: 1.4.0
  • OS: Manjaro Linux
  • Compiler: gcc 10.2.0
  • For MPI version, used MPI implementation: 3.4.2
  • Versions of the libraries that may be related to the bug, such as FFTW3, clFFT, clBLAS: FFTW3 3.3.9.1, MPICH 3.4.2

Metadata

Metadata

Assignees

Labels

OS-LinuxRelated to all Linux/Unix systemscomp-ScriptsRelated to Makefiles, developer and testing scriptspri-MediumWorth assigning to a milestone

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions