aportelli / Hadrons

Grid-based workflow management system for lattice field theory simulations
GNU General Public License v2.0
23 stars 32 forks source link

Problems installing Hadrons on AMD GPUs #106

Closed vmos1 closed 1 year ago

vmos1 commented 1 year ago

I'm trying to install Hadrons over a Grid build on the Crusher AMD machine on ORNL.

Installing Grid with lime, I've tested to make sure Grid code works well. With Grid installed here at , and the grid prefix dir (with lime, mpfr) in /grid_prefix ,  I'm building Hadrons in the following way, using the instructions in:  https://aportelli.github.io/Hadrons-doc/#/install  

source setup_env.sh
git clone git@github.com:aportelli/Hadrons.git
cd Hadrons
./bootstrap.sh
mkdir build
cd build
 
../configure --prefix=<grid_dir>/grid_prefix  --with-grid=<grid_dir>/grid_prefix
 
make -j 14

At this stage, the code fails with a linker error:

ld.lld: error: undefined symbol: Grid::Hadrons::MContraction::TBaryonGamma3pt<Grid::WilsonImpl<Grid::Grid_simd<thrust::complex<double>, Grid::GpuVector<4, Grid::GpuComplex<HIP_vector_type<double, 2u> > > >, Grid::FundamentalRep<3>, Grid::CoeffReal> >::parseGammaLRString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::pair<std::pair<Grid::Gamma::Algebra, Grid::Gamma::Algebra>, std::pair<Grid::Gamma::Algebra, Grid::Gamma::Algebra> >, std::allocator<std::pair<std::pair<Grid::Gamma::Algebra, Grid::Gamma::Algebra>, std::pair<Grid::Gamma::Algebra, Grid::Gamma::Algebra> > > >&)
>>> referenced by Application.cpp
>>>               Application.o:(vtable for Grid::Hadrons::MContraction::BaryonGamma3pt) in archive ../Hadrons/libHadrons.a
 
ld.lld: error: undefined symbol: typeinfo for Grid::Hadrons::MContraction::TBaryonGamma3pt<Grid::WilsonImpl<Grid::Grid_simd<thrust::complex<double>, Grid::GpuVector<4, Grid::GpuComplex<HIP_vector_type<double, 2u> > > >, Grid::FundamentalRep<3>, Grid::CoeffReal> >
>>> referenced by Application.cpp
>>>               Application.o:(typeinfo for Grid::Hadrons::MContraction::BaryonGamma3pt) in archive ../Hadrons/libHadrons.a
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:423: HadronsXmlRun] Error 1
make[2]: *** Waiting for unfinished jobs....
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)

  I've tested for both N_c = 3 and 4, and both give the same errors.   To make sure the configure is correct, I tried the tests in the folder Hadrons/build/tests I can successfully do the tests for :

  1. Test_diskvector
  2. Test_field_io
  3. Test_database
  4. Test_em_field

However, Test_free_prop fails with a similar linker error.

aportelli commented 1 year ago

Potentially fixed in 33014a6, please reopen if it is not the case.

vmos1 commented 1 year ago

Re-tested and see slightly different errors: `ld.lld: error: undefined symbol: Grid::Hadrons::MContraction::TBaryon<Grid::WilsonImpl<Grid::Grid_simd<thrust::complex, Grid::GpuVector<4, Grid::GpuComplex<HIP_vector_type<double, 2u> > > >, Grid::FundamentalRep<4>, Grid::CoeffReal> >::TBaryon(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)

referenced by Baryon.hpp:116 (../../Hadrons/Modules/MContraction/Baryon.hpp:116) Application.o:(Grid::Hadrons::MContraction::MContractionBaryonModuleRegistrar::MContractionBaryonModuleRegistrar()::'lambda'(std::cxx11::basic_string<char, std::char_traits, std::allocator >)::operator()(std::cxx11::basic_string<char, std::char_traits, std::allocator >) const) in archive ../Hadrons/libHadrons.a

ld.lld: error: undefined symbol: Grid::Hadrons::MContraction::TBaryon<Grid::WilsonImpl<Grid::Grid_simd<thrust::complex, Grid::GpuVector<4, Grid::GpuComplex<HIP_vector_type<double, 2u> > > >, Grid::FundamentalRep<4>, Grid::CoeffReal> >::~TBaryon()

referenced by Application.cpp Application.o:(vtable for Grid::Hadrons::MContraction::Baryon) in archive ../Hadrons/libHadrons.a

` .... op_hadron_build.txt