Skip to content

Commit

Permalink
fixes for compilation on macOS and trilinos15
Browse files Browse the repository at this point in the history
  • Loading branch information
LutzGross committed Jan 4, 2024
1 parent 3be3f44 commit c7569fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions scons/templates/homebrew_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#mpi_libs = ['mpi_cxx', 'mpi', 'open-rte', 'open-pal']
import glob
GCC=[ os.path.join(HOMEBREW_PREFIX, 'bin', 'g++-13') ]
cxx_extra = "-Wno-error=maybe-uninitialized"

assert len(GCC) > 0, "unable to find gcc compiler in "+ os.path.join(HOMEBREW_PREFIX, 'bin')
cxx = GCC[0]
Expand Down
6 changes: 4 additions & 2 deletions site_scons/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,12 @@ def checkForTrilinos(env):
minor=int(str(trilinos_version)[2:4])
tmp=int(str(trilinos_version)[4:6])
env['trilinos_version'] = str(major)+"."+str(minor)+"."+str(tmp)
if major >= 14:
if major == 14 and minor <2 :
env.Append(CPPDEFINES = ['ESYS_TRILINOS_14'])
if major >= 14 and minor >=2:
elif major == 14 and minor >=2:
env.Append(CPPDEFINES = ['ESYS_TRILINOS_14_2'])
else:
env.Append(CPPDEFINES = ['ESYS_TRILINOS_15'])

if os.path.isfile(os.path.join(trilinos_inc_path,'Tpetra_BlockCrsMatrix.hpp')):
print("Checking for %s... %s" % ('Tpetra_BlockCrsMatrix.hpp', "yes") )
Expand Down
14 changes: 7 additions & 7 deletions trilinoswrap/src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ typedef escript::DataTypes::index_t GO;
typedef escript::DataTypes::index_t LO;
#endif
/// Kokkos Node type
#ifdef ESYS_TRILINOS_14_2
#ifdef ESYS_TRILINOS_14
#ifdef _OPENMP
typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode NT;
typedef Kokkos::Compat::KokkosOpenMPWrapperNode NT;
#elif ESYS_HAVE_CUDA
typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode NT;
typedef Kokkos::Compat::KokkosCudaWrapperNode NT;
#else
typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode NT;
typedef Kokkos::Compat::KokkosSerialWrapperNode NT;
#endif
#else
#ifdef _OPENMP
typedef Kokkos::Compat::KokkosOpenMPWrapperNode NT;
typedef Tpetra::KokkosCompat::KokkosOpenMPWrapperNode NT;
#elif ESYS_HAVE_CUDA
typedef Kokkos::Compat::KokkosCudaWrapperNode NT;
typedef Tpetra::KokkosCompat::KokkosCudaWrapperNode NT;
#else
typedef Kokkos::Compat::KokkosSerialWrapperNode NT;
typedef Tpetra::KokkosCompat::KokkosSerialWrapperNode NT;
#endif
#endif

Expand Down

0 comments on commit c7569fe

Please sign in to comment.