geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
217 stars 232 forks source link

Cannot compile main on cluster #5880

Open anne-glerum opened 3 weeks ago

anne-glerum commented 3 weeks ago

At the moment, I cannot compile current main on my cluster against deal.II 9.5.2. A commit from before the hack (af08b99857c0a9c18f7134ffbae5c43cfcfa861b) does compile.

I found out while trying to install #4370, which also doesn't compile on the cluster, but does on my laptop against deal.II 9.5.0.

Do I need update something?

Error message:

In file included from /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/CMakeFiles/aspect-release.dir/Unity/unity_25.cxx:8:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:33:18: error: expected initializer before ‘<’ token
   33 |       Composition<dim>::initialize_one_particle_property(const Point<dim> &position,
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:42:18: error: expected initializer before ‘<’ token
   42 |       Composition<dim>::update_particle_property(const unsigned int data_position,
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:56:18: error: expected initializer before ‘<’ token
   56 |       Composition<dim>::need_update() const
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:63:18: error: expected initializer before ‘<’ token
   63 |       Composition<dim>::get_needed_update_flags () const
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:70:18: error: expected initializer before ‘<’ token
   70 |       Composition<dim>::get_property_information() const
      |                  ^
In file included from /home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/interpolator/harmonic_average.cc:22,
                 from /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/CMakeFiles/aspect-release.dir/Unity/unity_25.cxx:3:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘Composition’ is not a class template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:773:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  773 |   template class classname<2>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: explicit instantiation of non-template type ‘aspect::Particle::Property::Composition’
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:773:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  773 |   template class classname<2>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘Composition’ is not a class template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:774:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  774 |   template class classname<3>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: explicit instantiation of non-template type ‘aspect::Particle::Property::Composition’
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:774:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  774 |   template class classname<3>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘aspect::Particle::Property::Composition’ is not a template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:777:88: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  777 |     aspect::internal::Plugins::RegisterHelper<aspect::Particle::Property::Interface<2>,classname<2>> \
      |                                                                                        ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘aspect::Particle::Property::Composition’ is not a template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:780:88: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  780 |     aspect::internal::Plugins::RegisterHelper<aspect::Particle::Property::Interface<3>,classname<3>> \
      |                                                                                        ^~~~~~~~~
In file included from /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/CMakeFiles/aspect-release.dir/cmake_pch.hxx:6,
                 from <command-line>:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h: In instantiation of ‘aspect::internal::Plugins::RegisterHelper<InterfaceClass, ModelClass>::RegisterHelper(void (*)(const string&, const string&, void (*)(dealii::ParameterHandler&), std::unique_ptr<_Tp> (*)()), const char*, const char*) [with InterfaceClass = aspect::Particle::Property::Interface<2>; ModelClass = aspect::Particle::Property::Composition; std::string = std::__cxx11::basic_string<char>]’:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:7:   required from here
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h:233:30: error: incomplete type ‘aspect::Particle::Property::Composition’ used in nested name specifier
  233 |                              &ModelClass::declare_parameters,
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h: In instantiation of ‘aspect::internal::Plugins::RegisterHelper<InterfaceClass, ModelClass>::RegisterHelper(void (*)(const string&, const string&, void (*)(dealii::ParameterHandler&), std::unique_ptr<_Tp> (*)()), const char*, const char*) [with InterfaceClass = aspect::Particle::Property::Interface<3>; ModelClass = aspect::Particle::Property::Composition; std::string = std::__cxx11::basic_string<char>]’:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:7:   required from here
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h:233:30: error: incomplete type ‘aspect::Particle::Property::Composition’ used in nested name specifier
make[2]: *** [CMakeFiles/aspect-release.dir/Unity/unity_25.cxx.o] Error 1
make[1]: *** [CMakeFiles/aspect-release.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 45%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_27.cxx.o
[ 46%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_26.cxx.o
[ 47%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_25.cxx.o
In file included from /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/CMakeFiles/aspect.dir/Unity/unity_25.cxx:8:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:33:18: error: expected initializer before ‘<’ token
   33 |       Composition<dim>::initialize_one_particle_property(const Point<dim> &position,
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:42:18: error: expected initializer before ‘<’ token
   42 |       Composition<dim>::update_particle_property(const unsigned int data_position,
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:56:18: error: expected initializer before ‘<’ token
   56 |       Composition<dim>::need_update() const
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:63:18: error: expected initializer before ‘<’ token
   63 |       Composition<dim>::get_needed_update_flags () const
      |                  ^
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:70:18: error: expected initializer before ‘<’ token
   70 |       Composition<dim>::get_property_information() const
      |                  ^
In file included from /home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/interpolator/harmonic_average.cc:22,
                 from /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/CMakeFiles/aspect.dir/Unity/unity_25.cxx:3:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘Composition’ is not a class template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:773:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  773 |   template class classname<2>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: explicit instantiation of non-template type ‘aspect::Particle::Property::Composition’
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:773:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  773 |   template class classname<2>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘Composition’ is not a class template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:774:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  774 |   template class classname<3>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: explicit instantiation of non-template type ‘aspect::Particle::Property::Composition’
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:774:18: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  774 |   template class classname<3>; \
      |                  ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘aspect::Particle::Property::Composition’ is not a template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:777:88: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  777 |     aspect::internal::Plugins::RegisterHelper<aspect::Particle::Property::Interface<2>,classname<2>> \
      |                                                                                        ^~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:41: error: ‘aspect::Particle::Property::Composition’ is not a template
  102 |       ASPECT_REGISTER_PARTICLE_PROPERTY(Composition,
      |                                         ^~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/particle/property/interface.h:780:88: note: in definition of macro ‘ASPECT_REGISTER_PARTICLE_PROPERTY’
  780 |     aspect::internal::Plugins::RegisterHelper<aspect::Particle::Property::Interface<3>,classname<3>> \
      |                                                                                        ^~~~~~~~~
In file included from /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/CMakeFiles/aspect.dir/cmake_pch.hxx:6,
                 from <command-line>:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h: In instantiation of ‘aspect::internal::Plugins::RegisterHelper<InterfaceClass, ModelClass>::RegisterHelper(void (*)(const string&, const string&, void (*)(dealii::ParameterHandler&), std::unique_ptr<_Tp> (*)()), const char*, const char*) [with InterfaceClass = aspect::Particle::Property::Interface<2>; ModelClass = aspect::Particle::Property::Composition; std::string = std::__cxx11::basic_string<char>]’:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:7:   required from here
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h:233:30: error: incomplete type ‘aspect::Particle::Property::Composition’ used in nested name specifier
  233 |                              &ModelClass::declare_parameters,
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h: In instantiation of ‘aspect::internal::Plugins::RegisterHelper<InterfaceClass, ModelClass>::RegisterHelper(void (*)(const string&, const string&, void (*)(dealii::ParameterHandler&), std::unique_ptr<_Tp> (*)()), const char*, const char*) [with InterfaceClass = aspect::Particle::Property::Interface<3>; ModelClass = aspect::Particle::Property::Composition; std::string = std::__cxx11::basic_string<char>]’:
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/source/particle/property/composition.cc:102:7:   required from here
/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include/aspect/plugins.h:233:30: error: incomplete type ‘aspect::Particle::Property::Composition’ used in nested name specifier
[ 48%] Building CXX object CMakeFiles/aspect.dir/Unity/unity_24.cxx.o
make[2]: *** [CMakeFiles/aspect.dir/Unity/unity_25.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/aspect.dir/all] Error 2
make: *** [all] Error 2

deal.II candi.cfg:

DEAL_II_CONFOPTS="-DDEAL_II_FORCE_BUNDLED_MUPARSER=ON"
NATIVE_OPTIMIZATIONS=ON
USE_64_BIT_INDICES=OFF
USE_DEAL_II_CMAKE_MPI_COMPILER=ON
PYTHON_INTERPRETER=python3
PACKAGES="load:dealii-prepare"
PACKAGES="${PACKAGES} once:opencascade"
PACKAGES="${PACKAGES} once:parmetis"
PACKAGES="${PACKAGES} once:sundials"
PACKAGES="${PACKAGES} once:hdf5"
PACKAGES="${PACKAGES} once:p4est"
PACKAGES="${PACKAGES} once:trilinos"
PACKAGES="${PACKAGES} once:petsc"
PACKAGES="${PACKAGES} once:slepc"
PACKAGES="${PACKAGES} once:symengine"
PACKAGES="${PACKAGES} dealii"
PACKAGES="load:dealii-prepare once:cmake once:astyle once:hdf5 once:netcdf once:sundials once:p4est once:trilinos dealii"
DEAL_II_VERSION=v9.5.2
TRILINOS_WITH_COMPLEX=OFF
MKL=OFF
DEVELOPER_MODE=OFF

detailed.log of main commit that does compile:

###
#
#  ASPECT configuration:
#        ASPECT_VERSION:            2.6.0-pre
#        GIT REVISION:              af08b9985 ()
#        CMAKE_BUILD_TYPE:          DebugRelease
#
#        DEAL_II_DIR:               /home/projects/bbp00039/dealii/dealii_v9.5.2/candi_built/deal.II-v9.5.2/lib/cmake/deal.II
#        DEAL_II VERSION:           9.5.2
#        ASPECT_USE_FP_EXCEPTIONS:  ON
#        ASPECT_RUN_ALL_TESTS:      OFF
#        ASPECT_USE_SHARED_LIBS:    ON
#        ASPECT_HAVE_LINK_H:        ON
#        ASPECT_WITH_LIBDAP:        OFF
#        ASPECT_WITH_NETCDF:        OFF
#        ASPECT_WITH_WORLD_BUILDER: ON /home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/contrib/world_builder
#        ASPECT_PRECOMPILE_HEADERS: ON
#        ASPECT_UNITY_BUILD:        ON
#
#        CMAKE_INSTALL_PREFIX:      /usr/local
#        CMAKE_SOURCE_DIR:          /home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect
#        CMAKE_BINARY_DIR:          /home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean
#        CMAKE_CXX_COMPILER:        GNU 9.2.0 on platform Linux x86_64
#                                   /sw/compiler/gcc/9.2.0/skl/bin/c++
#        PARAMETER_GUI_EXECUTABLE:  PARAMETER_GUI_EXECUTABLE-NOTFOUND
#
#        LINKAGE:                   DYNAMIC
#
#        aspect target properties:
#          COMPILE_OPTIONS:         $<$<COMPILE_LANGUAGE:CXX>:-pedantic;-Wall;-Wextra;-Wmissing-braces;-Woverloaded-virtual;-Wpointer-arith;-Wsign-compare;-Wsuggest-override;-Wswitch;-Wsynth;-Wwrite-strings;-Wno-placement-new;-Wno-deprecated-declarations;-Wno-literal-suffix;-Wno-psabi;-Wno-class-memaccess;-Wno-parentheses;-Wno-unused-local-typedefs;-fopenmp-simd;-pthread;-march=native;-O0;-ggdb;-Wa,--compress-debug-sections;-fdiagnostics-color=always>
#          COMPILE_DEFINITIONS:     
#          COMPILE_FLAGS:           
#          LINK_LIBRARIES:          dealii::dealii_debug;/usr/lib64/libz.so;dl
#          INCLUDE_DIRECTORIES:     /home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/include;/home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/include;/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/contrib/catch;/home/bbpanneg/software/aspect/aspect_fix_stresses_elasticity_on_main_14072023_clean/aspect/contrib/world_builder/include;/home/bbpanneg/software/aspect/build__fix_stresses_elasticity_dealii_9.5.2_12062024_clean/include;/usr/include
#        DEAL_II options:
#          _WITH_CXX14:             ON
#          _WITH_CXX17:             FALSE
#          _MPI_VERSION:            3.1
#          _WITH_64BIT_INDICES:     OFF
#
###
anne-glerum commented 3 weeks ago

I started a git bisect, 8526b05dd185d78610569cd6d2a151a3d45b91b8 is still bad, cf4250978c19cbaf2ab8d592e93fdaa3d61adf91 good.

gassmoeller commented 3 weeks ago

Could you try switching off the unity build -DASPECT_UNITY_BUILD=OFF? It may be that a certain file got shifted into a different unity build file.

anne-glerum commented 2 weeks ago

With -DASPECT_UNITY_BUILD=OFF the build indeed succeeds, but I don't understand why a build in a fresh (new, empty) build directory with -DASPECT_UNITY_BUILD=ON does not work.