Grid
Grid copied to clipboard
Failure to compile with GCC 9.3.0 (memory issues)
I've recently tried to compile Grid on a desktop in the most simple, stripped-down way I could figure:
../configure --enable-precision=double --enable-comms=none
With the only libraries being GMP & MPFR, and using the default GEN SIMD mode as I didn't pass an argument.
Using GCC version 9.3.0, when it gets to the file qcd/action/fermion/instantiation/GparityWilsonImplD/CayleyFermion5DInstantiationGparityWilsonImplD.o
the compile fails; memory use shoots up from 6GB to >16GB over the span of half an hour. I was unable to complete compilation before it killed my VM.
I've talked to a current user who seemed to be aware that GCC is not reliable and Clang is a better option, but just thought I'd document it here for anyone else struggling.
yeah ... I heard >=9 was being bad.
See issue 100 ... it's a bit of a GCC graveyard.
You might make a comment there.
Exactly the same issue with 10.3.1. What is the general recommendation? Simply stay away from gcc >=9? Or it's a goal to make gcc >= 9 work and I should open a new ticket for 10.3.1?
And yes, I've read #100 and #264, not sure how to proceed though.
I'm trying to compile the current 'master' by the way.
Hi Daniel,
I can compile the current develop
branch on my laptop using gcc 9.4.0 and
../configure --enable-comms=none --enable-simd=AVX2 --prefix $prefix CXX=g++ MPICXX=g++ LDFLAGS=-L$prefix/lib/ CXXFLAGS="-I$prefix/include/
.
I don't know about the master
branch but i think the general recommendation is to use develop
which is more up to date.
If the problem persists and in case you are not interested in Gparity you could try configuring Grid with the option --enable-gparity=no
. This should skip the file CayleyFermion5DInstantiationGparityWilsonImplD
which was mentioned above.
With the 'develop' branch I run into the same issue (still with gcc 10.3.1), but I need to correct myself, the error is not exactly as stated by the OP, the problem is not with GParity related files, but rather Grid/qcd/action/fermion/instantiation/WilsonImplD/CayleyFermion5DInstantiationWilsonImplD.cc
After ../configure --enable-comms=none
I get
CXX qcd/action/fermion/instantiation/WilsonImplD/CayleyFermion5DInstantiationWilsonImplD.o
In file included from /home/fetch/lattice/grid/Grid/simd/Simd.h:226,
from /home/fetch/lattice/grid/Grid/GridCore.h:51,
from /home/fetch/lattice/grid/Grid/qcd/action/fermion/FermionCore.h:31,
from ../../Grid/qcd/action/fermion/instantiation/WilsonImplD/CayleyFermion5DInstantiationWilsonImplD.cc:31:
/home/fetch/lattice/grid/Grid/simd/Grid_vector_types.h: In function ‘Out Grid::binary(Input1, Input2, Operation) [with Out = Grid::Optimization::vec<double>; Input1 = Grid::Optimization::vec<double>; Input2 = Grid::Optimization::vec<double>; Operation = Grid::Optimization::MultComplex]’:
/home/fetch/lattice/grid/Grid/simd/Grid_vector_types.h:254:24: note: the ABI for passing parameters with 64-byte alignment has changed in GCC 4.6
254 | Out accelerator_inline binary(Input1 src_1, Input2 src_2, Operation op) {
| ^~~~~~
With ../configure --enable-comms=none --enable-simd=AVX2
I get no errors or warnings but the compiler hangs at
CXX qcd/action/fermion/instantiation/WilsonImplD/CayleyFermion5DInstantiationWilsonImplD.o
Is there any useful debug info and/or version info I could send to help narrow this down?