GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
210 stars 84 forks source link

[Build] Compilation warnings and failures with GCC on Lassen #1183

Closed francoishamon closed 3 years ago

francoishamon commented 4 years ago

Describe the bug I am unable to compile GEOSX using GCC 8.3.1 on Lassen.

1) In Debug:

I first get the following warnings:

          detected during:                                                                                                                    
            instantiation of "std::enable_if_t<geosx::traits::CanStreamInto, void> geosx::xmlWrapper::StringToInputVariable(geosx::Array<T, NDIM, PERMUTATION> &, const geosx::string &) [with T=geosx::localIndex, NDIM=1, PERMUTATION=camp::make_idx_seq_t<1L>]"                         
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/xmlWrapper.hpp(214): here                                                         
            instantiation of "std::enable_if_t<geosx::xmlWrapper::canParseVariable, __nv_bool> geosx::xmlWrapper::ReadAttributeAsType(T &, const geosx::string &, const geosx::xmlWrapper::xmlNode &, __nv_bool) [with T=geosx::array1d<geosx::localIndex>]"                               
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Wrapper.hpp(769): here                                                            
            instantiation of "__nv_bool geosx::dataRepository::Wrapper<T>::processInputFile(const geosx::xmlWrapper::xmlNode &) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                                
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Wrapper.hpp(132): here                                                            
            instantiation of "geosx::dataRepository::Wrapper<T>::Wrapper(const std::string &, geosx::dataRepository::Group *, T *) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                             
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Group.hpp(1624): here                                                             
            instantiation of "geosx::dataRepository::Wrapper<T> *geosx::dataRepository::Group::registerWrapper(const std::string &, T *) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                       
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/mpiCommunications/NeighborData.hpp(42): here

then

/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/wrapperHelpers.hpp(408): warning: variable "totalNumDimensions" was declared but never referenced                                                                                                                              
          detected during:                                                                                                                    
            instantiation of "__nv_bool geosx::dataRepository::Wrapper<T>::loadFromConduit() [with T=geosx::array1d<geosx::localIndex>]"      
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Wrapper.hpp(132): here                                                            
            instantiation of "geosx::dataRepository::Wrapper<T>::Wrapper(const std::string &, geosx::dataRepository::Group *, T *) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                             
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Group.hpp(1624): here                                                             
            instantiation of "geosx::dataRepository::Wrapper<T> *geosx::dataRepository::Group::registerWrapper(const std::string &, T *) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                       
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/mpiCommunications/NeighborData.hpp(42): here

and

/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/wrapperHelpers.hpp(414): warning: variable "perm" was declared but never referenced                                                                                                                                            
          detected during:                                                                                                                    
            instantiation of "std::enable_if_t<geosx::bufferOps::can_memcpy, void> geosx::dataRepository::wrapperHelpers::pullDataFromConduitNode(geosx::Array<T, NDIM, PERMUTATION> &, const conduit::Node &) [with T=geosx::localIndex, NDIM=1, PERMUTATION=camp::make_idx_seq_t<1L>]"   
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Wrapper.hpp(855): here                                                            
            instantiation of "__nv_bool geosx::dataRepository::Wrapper<T>::loadFromConduit() [with T=geosx::array1d<geosx::localIndex>]"      
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Wrapper.hpp(132): here                                                            
            instantiation of "geosx::dataRepository::Wrapper<T>::Wrapper(const std::string &, geosx::dataRepository::Group *, T *) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                             
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/dataRepository/Group.hpp(1624): here                                                             
            instantiation of "geosx::dataRepository::Wrapper<T> *geosx::dataRepository::Group::registerWrapper(const std::string &, T *) [with T=geosx::array1d<geosx::localIndex>]"                                                                                                       
/g/g90/hamon1/geosx/GEOSX/src/coreComponents/mpiCommunications/NeighborData.hpp(42): here

Finally I get the following error:

/g/g90/hamon1/geosx/GEOSX/src/coreComponents/finiteElement/kernelInterface/KernelBase.hpp(294): error: calling a __host__ function("RAJA::reduce::detail::BaseReduceMax<double,  ::RAJA::detail::ReduceSeq> ::max const") from a __host__ __device__ function(" const") is not allowed     

16 errors detected in the compilation of "/var/tmp/hamon1/tmpxft_0000907e_00000000-6_PhaseFieldDamageFEM.cpp1.ii". 
  1. In Release:

I get a very long linking error that starts with:

../../../lib/libmesh.a(CellElementSubRegion.cpp.o): In function `geosx::CellElementSubRegion::CellElementSubRegion(std::string const&, geosx::dataRepository::Group*)':                                                                                                                    
tmpxft_0000f12c_00000000-5_CellElementSubRegion.cudafe1.cpp:(.text+0x5ce0): undefined reference to `geosx::dataRepository::WrapperBase::WrapperBase(std::string const&, geosx::dataRepository::Group*)'                                                                                    
tmpxft_0000f12c_00000000-5_CellElementSubRegion.cudafe1.cpp:(.text+0x634c): undefined reference to `geosx::dataRepository::WrapperBase::~WrapperBase()'                                                                                                                                    
../../../lib/libmesh.a(CellElementSubRegion.cpp.o): In function `geosx::CellElementSubRegion::CopyFromCellBlock(geosx::CellBlock*)':          
tmpxft_0000f12c_00000000-5_CellElementSubRegion.cudafe1.cpp:(.text+0x68a4): undefined reference to `geosx::ObjectManagerBase::ConstructGlobalToLocalMap()'                                                                                                                                 
../../../lib/libmesh.a(CellElementSubRegion.cpp.o): In function `geosx::CellElementSubRegion::ViewPackingExclusionList(LvArray::SortedArray<long, long, LvArray::ChaiBuffer>&) const':                                                                                                     
tmpxft_0000f12c_00000000-5_CellElementSubRegion.cudafe1.cpp:(.text+0x872c): undefined reference to `geosx::ObjectManagerBase::ViewPackingExclusionList(LvArray::SortedArray<long, long, LvArray::ChaiBuffer>&) const'                                                                      
../../../lib/libmesh.a(CellElementSubRegion.cpp.o):(.toc+0x10): undefined reference to `typeinfo for geosx::dataRepository::WrapperBase'      
../../../lib/libmesh.a(CellElementSubRegion.cpp.o): In function `geosx::dataRepository::Wrapper<LvArray::Array<R1TensorT<3>, 2, camp::int_seq<long, 0l, 1l>, long, LvArray::ChaiBuffer> >::~Wrapper()':

To Reproduce Steps to reproduce the behavior:

  1. Check develop
  2. On Lassen, python scripts/config-build.py -hc host-configs/LLNL/lassen-gcc@8.3.1.cmake -bt Debug
  3. lalloc 2
  4. make

Expected behavior It should compile.

Platform (please complete the following information):

Additional context Everything works well with clang.

corbett5 commented 3 years ago

I feel like you found some issues just a month or so ago too, thanks for using this build and posting the errors. My PR https://github.com/GEOSX/GEOSX/pull/1196 (which I should merge tomorrow) works. I didn't try develop but I also didn't make any significant changes so it might work too. It builds in both release and debug, passing unit tests in both. I think @bmhan12 is working on adding this build to our nightly tests, it won't solve our problems but hopefully we can catch them earlier.

It does not pass the integrated tests though (neither does clang https://github.com/GEOSX/GEOSX/issues/1201 but this fails more). From the release build:

FAIL RUN:
Hydrofracture_KGD_NodeBased_C3D6_01 KGD_ZeroToughness_01 KGD_ZeroToughness_06 KGD_ZeroViscosity_01 
KGD_ZeroViscosity_06 Sneddon_conforming01 Sneddon_conforming04 SurfaceGenerator_01 SurfaceGenerator_08 
DryFrac_StaticPenny_PrismElem_01 DryFrac_StaticPenny_PrismElem_08 DryFrac_ThreeNodesPinched_HorizontalFrac_01 
DryFrac_ThreeNodesPinched_SlantFrac_01 co2_flux_3d_01 Sneddon_01 PhaseFieldFracture_DamageOnly_01 
PhaseFieldFracture_DamageOnly_08 PhaseFieldFracture_DamageAndLoad_01 PhaseFieldFracture_DamageAndLoad_08 
PoroElastic_Terzaghi_01 FlowProppantTransport_2d_01 staircase_3d_01 beamBending_01 beamBending_08 beamBending_27 

 FAIL CHECK : 1
 (  Hydrofracture_KGD_NodeBased_C3D6_09
corbett5 commented 3 years ago

Wait, just kidding develop won't work in debug. There were some errors I got with clang too. But my branch works so this will remain closed.