Exawind / nalu-wind

Solver for wind farm simulations targeting exascale computational platforms
https://nalu-wind.readthedocs.io
Other
122 stars 83 forks source link

NGP_ThrowErrorMsg for naluwind building process #1242

Closed mathbird closed 1 month ago

mathbird commented 5 months ago

Hi,

I am trying to build naluwind, but met the following issues. any ideas why?

D.

ExaWind/nalu-wind_0311_2024/src/ConstantAuxFunction.C:23:3: error: use of undeclared identifier 'ThrowRequire'
   23 |   ThrowRequire(endPos_ <= values_.size());
      |   ^
In file included from ExaWind/nalu-wind_0311_2024/src/SupplementalAlgorithm.C:10:
In file included from ExaWind/nalu-wind_0311_2024/include/SupplementalAlgorithm.h:13:
ExaWind/nalu-wind_0311_2024/include/master_element/MasterElement.h:61:5: error: use of undeclared identifier 'NGP_ThrowErrorMsg'
   61 |     NGP_ThrowErrorMsg("MasterElement::grad_op not implemented for element");
      |     ^
ExaWind/nalu-wind_0311_2024/include/master_element/MasterElement.h:69:5: error: use of undeclared identifier 'NGP_ThrowErrorMsg'
   69 |     NGP_ThrowErrorMsg("MasterElement::grad_op not implemented for element");
      |     ^
ExaWind/nalu-wind_0311_2024/include/master_element/MasterElement.h:77:5: error: use of undeclared identifier 'NGP_ThrowErrorMsg'
   77 |     NGP_ThrowErrorMsg(
      |     ^
psakievich commented 5 months ago

Yes. We need to update nalu-wind to be compatible with the current versions on trilinos.

psakievich commented 5 months ago

@alanw0 do you think we could make an redirect function for this to preserve compatibility?

mathbird commented 5 months ago

which version of trilinos could work with current version of nalu-wind?

alanw0 commented 5 months ago

Yes. We need to update nalu-wind to be compatible with the current versions on trilinos.

I thought there was someplace where we specified which version of trilinos works with each release/version of nalu-wind.

alanw0 commented 5 months ago

@alanw0 do you think we could make an redirect function for this to preserve compatibility?

Hmm, I don't know, possibly. The Throw* and NGP_Throw* symbols in stk are macros, and there is a family of them (ThrowRequire vs ThrowAssert, etc). These ones were deprecated a while back, all you need to do to update to the new version is prepend each of those calls with STK_. If you made a redirect function, you still need to know when to activate that, depending on whether the trilinos version is newer or older.

psakievich commented 5 months ago

I thought there was someplace where we specified which version of trilinos works with each release/version of nalu-wind.

We do it in spack mostly, but we haven't made a push to update yet. Still stuck on a lot of infrastructure catch up post ECP final push :(

mathbird commented 5 months ago

would you tell me which Trillinos branch or commit match the current naluwind?

psakievich commented 5 months ago

@mathbird 13.4.0 or 13.4.1. We've been pinned to the following commit for a while. 8b3e2e1db4c7e07db13225c73057230c4814706f

Hopefully we can update soon and get back to tracking develop

mathbird commented 5 months ago

I tried that trilinos commit, but naluwind failed as follow. any idea how to fix it?

In file included from /home/dguo/tests/ExaWind/nalu-wind_0321_2024/src/AssembleScalarEigenEdgeSolverAlgorithm.C:11:
In file included from /home/dguo/tests/ExaWind/nalu-wind_0321_2024/include/AssembleScalarEigenEdgeSolverAlgorithm.h:13:
In file included from /home/dguo/tests/ExaWind/nalu-wind_0321_2024/include/SolverAlgorithm.h:14:
In file included from /home/dguo/tests/ExaWind/nalu-wind_0321_2024/include/KokkosInterface.h:17:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_Core.hpp:57:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/KokkosCore_Config_DeclareBackend.hpp:47:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/decl/Kokkos_Declare_SERIAL.hpp:49:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_Serial.hpp:68:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_TaskScheduler.hpp:66:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_MemoryPool.hpp:58:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_Parallel.hpp:63:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_View.hpp:523:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/impl/Kokkos_ViewMapping.hpp:60:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/impl/Kokkos_Atomic_View.hpp:48:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_Atomic.hpp:78:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/Kokkos_Atomics_Desul_Wrapper.hpp:17:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics.hpp:12:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/Atomic_Ref.hpp:17:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/Generic.hpp:18:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/Compare_Exchange.hpp:34:
In file included from /home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/Compare_Exchange_SYCL.hpp:13:
/home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/SYCLConversions.hpp:30:69: error: no member named 'memory_order' in namespace 'sycl::ext::oneapi'
   30 |                                              sycl_sync_and_atomics::memory_order,
      |                                              ~~~~~~~~~~~~~~~~~~~~~~~^
/home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/SYCLConversions.hpp:34:69: error: no member named 'memory_scope' in namespace 'sycl::ext::oneapi'
   34 |                                              sycl_sync_and_atomics::memory_scope,
      |                                              ~~~~~~~~~~~~~~~~~~~~~~~^
/home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/SYCLConversions.hpp:41:20: error: no template named 'sycl_memory_order'
   41 |   static constexpr sycl_memory_order<extended_namespace> value =
      |                    ^
/home/dguo/tests/ExaWind/Trilinos_0321_2024/install_03-21-2024/include/desul/atomics/SYCLConversions.hpp:42:7: error: no template named 'sycl_memory_order'
   42 |       sycl_memory_order<extended_namespace>::seq_cst;
      |       ^
jrood-nrel commented 5 months ago

You need to use and older OneAPI compiler. The latest one causes these errors.

jrood-nrel commented 5 months ago

Try oneapi/release/2023.10.15.001

jrood-nrel commented 1 month ago

I think these should be resolved. Reopen this if necessary.