etmc / tmLQCD

tmLQCD is a freely available software suite providing a set of tools to be used in lattice QCD simulations. This is mainly a HMC implementation (including PHMC and RHMC) for Wilson, Wilson Clover and Wilson twisted mass fermions and inverter for different versions of the Dirac operator. The code is fully parallelised and ships with optimisations for various modern architectures, such as commodity PC clusters and the Blue Gene family.
http://www.itkp.uni-bonn.de/~urbach/software.html
GNU General Public License v3.0
32 stars 47 forks source link

no_eigenvalues already defined extern in the related header #488

Closed sunpho84 closed 2 years ago

sunpho84 commented 3 years ago

Fix this

/usr/bin/ld: ./lib/libsolver.a(eigenvalues.o):/home/francesco/QCD/SORGENTI/tmLQCD/build_quda/solver/../../solver/eigenvalues.c:61: multiple definition of `no_eigenvalues'; ./lib/libhmc.a(read_input.o):/home/francesco/QCD/SORGENTI/tmLQCD/build_quda/../read_input.l:222: first defined here
kostrzewa commented 3 years ago

Argh, this is super nasty. Variables with this name are used (and modified) in various places throughout the codebase and I don't think that the various instances of this variable are supposed to mean the same thing...

kostrzewa commented 3 years ago

It's also used as global input AND output ... soooo nasty. :vomiting_face:

sunpho84 commented 3 years ago

Very good... so my naive fix is simply avoiding the error but not changing the behaviour, as I guess the compiler was somehow melding the two instances as if one was defined with extern linkage.

Is it somehow clear how to proceed?