Skip to content

Commit

Permalink
SQUASH AGAINST: WIP: Run of script remove_kokkos_subpackages_r.sh (tr…
Browse files Browse the repository at this point in the history
…ilinos#11545)

TODO: Change this to remove_kokkos_subpackages_from_trilinos_packages.sh
  • Loading branch information
bartlettroscoe committed Apr 19, 2023
1 parent 2575bbe commit 7d94d3b
Show file tree
Hide file tree
Showing 83 changed files with 158 additions and 158 deletions.
4 changes: 2 additions & 2 deletions packages/muelu/test/maxwell/ReitzingerPFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ int main(int argc, char* argv[])
{
Teuchos::GlobalMPISession mpiSession(&argc, &argv);

#ifdef HAVE_MUELU_KOKKOSCORE
#ifdef HAVE_MUELU_KOKKOS
Kokkos::initialize(argc , argv);
#endif

Expand Down Expand Up @@ -774,7 +774,7 @@ int main(int argc, char* argv[])
}
TEUCHOS_STANDARD_CATCH_STATEMENTS(verbose, std::cerr, success);

#ifdef HAVE_MUELU_KOKKOSCORE
#ifdef HAVE_MUELU_KOKKOS
Kokkos::finalize();
#endif

Expand Down
2 changes: 1 addition & 1 deletion packages/phalanx/build_scripts/build_phalanx_amt_gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cmake \
-D Phalanx_ENABLE_KOKKOS_AMT:BOOL=ON \
-D Phalanx_EXPLICIT_TEMPLATE_INSTANTIATION=ON \
-D Phalanx_ALLOW_MULTIPLE_EVALUATORS_FOR_SAME_FIELD:BOOL=OFF \
-D HAVE_INTREPID_KOKKOSCORE:BOOL=ON \
-D HAVE_INTREPID_KOKKOS:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH="/home/rppawlo/install/gnu4.8.2/mpich" \
-D TPL_ENABLE_HWLOC:BOOL=ON \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cmake \
-D Phalanx_ENABLE_KOKKOS_AMT:BOOL=ON \
-D Phalanx_EXPLICIT_TEMPLATE_INSTANTIATION=ON \
-D Phalanx_ALLOW_MULTIPLE_EVALUATORS_FOR_SAME_FIELD:BOOL=OFF \
-D HAVE_INTREPID_KOKKOSCORE:BOOL=ON \
-D HAVE_INTREPID_KOKKOS:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH="$ROGER_MPICH_BASE_PATH" \
-D MPI_EXEC_POST_NUMPROCS_FLAGS="-bind-to;core;-map-by;core" \
Expand Down
2 changes: 1 addition & 1 deletion packages/phalanx/build_scripts/build_phalanx_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cmake \
-D Phalanx_ENABLE_EXAMPLES:BOOL=ON \
-D Phalanx_EXPLICIT_TEMPLATE_INSTANTIATION=ON \
-D Phalanx_ALLOW_MULTIPLE_EVALUATORS_FOR_SAME_FIELD:BOOL=OFF \
-D HAVE_INTREPID_KOKKOSCORE:BOOL=ON \
-D HAVE_INTREPID_KOKKOS:BOOL=ON \
-D TPL_ENABLE_CUDA=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH="$SEMS_OPENMPI_ROOT" \
Expand Down
2 changes: 1 addition & 1 deletion packages/phalanx/build_scripts/build_phalanx_gcc_gge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cmake \
-D Phalanx_EXPLICIT_TEMPLATE_INSTANTIATION=ON \
-D Phalanx_ALLOW_MULTIPLE_EVALUATORS_FOR_SAME_FIELD:BOOL=OFF \
-D Phalanx_ENABLE_KOKKOS_AMT:BOOL=ON \
-D HAVE_INTREPID_KOKKOSCORE:BOOL=ON \
-D HAVE_INTREPID_KOKKOS:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D MPI_BASE_DIR:PATH="$ROGER_MPICH_BASE_PATH" \
-D TPL_ENABLE_BLAS:BOOL=ON \
Expand Down
4 changes: 2 additions & 2 deletions packages/phalanx/src/deprecated/Phalanx_MDField_Def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#ifdef PHX_ENABLE_INTREPID2_DYN_RANK_VIEW_REFACTOR
// no more intrepid dependencies!
#else
#include "Intrepid2_config.h" // for HAVE_INTREPID_KOKKOSCORE define
#include "Intrepid2_config.h" // for HAVE_INTREPID_KOKKOS define
#include "Intrepid2_KokkosRank.hpp"
#endif // PHX_ENABLE_INTREPID2_DYN_RANK_VIEW_REFACTOR
#endif //Phalanx_ENABLE_Intrepid2
Expand Down Expand Up @@ -1169,7 +1169,7 @@ std::ostream& PHX::operator<<(std::ostream& os,
// no more intrepid dependencies!
#else

#include "Intrepid2_config.h" // for HAVE_INTREPID_KOKKOSCORE define
#include "Intrepid2_config.h" // for HAVE_INTREPID_KOKKOS define
#include "Intrepid2_KokkosRank.hpp"
namespace Intrepid2 {
template<typename DataT,
Expand Down
4 changes: 2 additions & 2 deletions packages/sacado/cmake/Sacado_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#cmakedefine HAVE_SACADO_TEUCHOSNUMERICS

/* Define if want to build with kokkos-core enabled */
#cmakedefine HAVE_SACADO_KOKKOSCORE
#cmakedefine HAVE_SACADO_KOKKOS

/* Define if want to build with kokkos-containers enabled */
#cmakedefine HAVE_SACADO_KOKKOSCONTAINERS
#cmakedefine HAVE_SACADO_KOKKOS

/* Define if want to build with TeuchosKokkosComm subpackage enabled */
#cmakedefine HAVE_SACADO_TEUCHOSKOKKOSCOMM
Expand Down
4 changes: 2 additions & 2 deletions packages/sacado/example/view_factory_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ my_func(const View1& v1, const View2& v2)
return vtmp;
}

#if defined(HAVE_SACADO_KOKKOSCONTAINERS)
#if defined(HAVE_SACADO_KOKKOS)
// An example function that takes two dynamic-rank views of various ranks and
// scalar types and produces a third allocated using the ViewFactory
template <class View1, class View2>
Expand Down Expand Up @@ -156,7 +156,7 @@ int main(int argc, char* argv[]) {

}

#if defined(HAVE_SACADO_KOKKOSCONTAINERS)
#if defined(HAVE_SACADO_KOKKOS)
// Now use the dynamic-rank view
{

Expand Down
6 changes: 3 additions & 3 deletions packages/sacado/src/KokkosExp_View_Fad.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define KOKKOS_EXPERIMENTAL_VIEW_SACADO_FAD_HPP

#include "Sacado_ConfigDefs.h"
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)

// Only include forward declarations so any overloads appear before they
// might be used inside Kokkos
Expand Down Expand Up @@ -1955,7 +1955,7 @@ struct ViewMapping
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------

#if defined(HAVE_SACADO_KOKKOSCORE) && \
#if defined(HAVE_SACADO_KOKKOS) && \
defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && \
defined(HAVE_SACADO_VIEW_SPEC) && \
! defined(SACADO_DISABLE_FAD_VIEW_SPEC)
Expand Down Expand Up @@ -2117,7 +2117,7 @@ broadcast

#endif // defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)

#endif // defined(HAVE_SACADO_KOKKOSCORE)
#endif // defined(HAVE_SACADO_KOKKOS)

#include "KokkosExp_View_Fad_Contiguous.hpp"

Expand Down
4 changes: 2 additions & 2 deletions packages/sacado/src/KokkosExp_View_Fad_Contiguous.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define KOKKOS_EXPERIMENTAL_VIEW_SACADO_FAD_CONTIGUOUS_HPP

#include "Sacado_ConfigDefs.h"
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)

#include "Kokkos_LayoutContiguous.hpp"

Expand Down Expand Up @@ -1796,6 +1796,6 @@ class ViewMapping<

#endif // defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)

#endif // defined(HAVE_SACADO_KOKKOSCORE)
#endif // defined(HAVE_SACADO_KOKKOS)

#endif /* #ifndef KOKKOS_EXPERIMENTAL_VIEW_SACADO_FAD_HPP */
4 changes: 2 additions & 2 deletions packages/sacado/src/Kokkos_DynRankView_Fad.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// This file is setup to always work even when KokkosContainers (which contains
// Kokkos::DynRankView) isn't enabled.

#if defined(HAVE_SACADO_KOKKOSCONTAINERS)
#if defined(HAVE_SACADO_KOKKOS)

// We are hooking into Kokkos Core internals here
// Need to define this macro since we include non-public headers
Expand Down Expand Up @@ -1315,7 +1315,7 @@ KOKKOS_FUNCTION auto as_view_of_rank_n(

#endif //defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)

#endif // defined(HAVE_SACADO_KOKKOSCONTAINERS)
#endif // defined(HAVE_SACADO_KOKKOS)

#include "Kokkos_DynRankView_Fad_Contiguous.hpp"

Expand Down
4 changes: 2 additions & 2 deletions packages/sacado/src/Kokkos_DynRankView_Fad_Contiguous.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// This file is setup to always work even when KokkosContainers (which contains
// Kokkos::DynRankView) isn't enabled.

#if defined(HAVE_SACADO_KOKKOSCONTAINERS)
#if defined(HAVE_SACADO_KOKKOS)

#include "Kokkos_DynRankView.hpp"

Expand Down Expand Up @@ -832,6 +832,6 @@ class ViewMapping< DstTraits , SrcTraits ,

#endif //defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)

#endif // defined(HAVE_SACADO_KOKKOSCONTAINERS)
#endif // defined(HAVE_SACADO_KOKKOS)

#endif /* #ifndef KOKKOS_DYN_RANK_VIEW_SACADO_FAD_HPP */
4 changes: 2 additions & 2 deletions packages/sacado/src/Kokkos_View_Fad_Fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define KOKKOS_VIEW_FAD_FWD_HPP

#include "Sacado_ConfigDefs.h"
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)

// We are hooking into Kokkos Core internals here
// Need to define this macro since we include non-public headers
Expand Down Expand Up @@ -227,6 +227,6 @@ as_view_of_rank_n(View<T, Args...>);

#endif // defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)

#endif // defined(HAVE_SACADO_KOKKOSCORE)
#endif // defined(HAVE_SACADO_KOKKOS)

#endif /* #ifndef KOKKOS_VIEW_FAD_FWD_HPP */
2 changes: 1 addition & 1 deletion packages/sacado/src/Sacado_CacheFad_DFadTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ namespace Teuchos {
#endif

// KokkosComm
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)
#if defined(HAVE_SACADO_KOKKOS) && defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)
#include "KokkosExp_View_Fad.hpp"
#endif

Expand Down
2 changes: 1 addition & 1 deletion packages/sacado/src/Sacado_CacheFad_SFadTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace Teuchos {
#endif

// KokkosComm
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)
#if defined(HAVE_SACADO_KOKKOS) && defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)
#include "KokkosExp_View_Fad.hpp"
#endif

Expand Down
2 changes: 1 addition & 1 deletion packages/sacado/src/Sacado_CacheFad_SLFadTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ namespace Teuchos {
#endif

// KokkosComm
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)
#if defined(HAVE_SACADO_KOKKOS) && defined(HAVE_SACADO_TEUCHOSKOKKOSCOMM) && defined(HAVE_SACADO_VIEW_SPEC) && !defined(SACADO_DISABLE_FAD_VIEW_SPEC)
#include "KokkosExp_View_Fad.hpp"
#endif

Expand Down
2 changes: 1 addition & 1 deletion packages/sacado/src/Sacado_ConfigDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps

/* Kokkos macros */

#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
#include "Kokkos_Macros.hpp"

#ifndef SACADO_FUNCTION
Expand Down
2 changes: 1 addition & 1 deletion packages/sacado/src/Sacado_DisableKokkosCuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "Sacado_ConfigDefs.h"

// Redefine KOKKOS_*_FUNCTION macros to not include __device__
#if defined(HAVE_SACADO_KOKKOSCORE) && ( defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) )
#if defined(HAVE_SACADO_KOKKOS) && ( defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) )
// TODO double check me
#if 1
#undef SACADO_FUNCTION
Expand Down
4 changes: 2 additions & 2 deletions packages/sacado/src/Sacado_DynamicArrayTraits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@

#include "Sacado_DynamicArrayTraits.hpp"

#if 0 && defined(HAVE_SACADO_KOKKOSCORE) && defined(KOKKOS_ENABLE_OPENMP)
#if 0 && defined(HAVE_SACADO_KOKKOS) && defined(KOKKOS_ENABLE_OPENMP)
namespace Sacado {
namespace Impl {
const Kokkos::MemoryPool<Kokkos::OpenMP>* global_sacado_openmp_memory_pool = 0;
}
}
#endif

#if defined(HAVE_SACADO_KOKKOSCORE) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__)
#if defined(HAVE_SACADO_KOKKOS) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__)
namespace Sacado {
namespace Impl {
const Kokkos::MemoryPool<Kokkos::Cuda>* global_sacado_cuda_memory_pool_host = 0;
Expand Down
32 changes: 16 additions & 16 deletions packages/sacado/src/Sacado_DynamicArrayTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <stdint.h>

#include "Sacado_Traits.hpp"
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
#include "Kokkos_Core.hpp"
#endif

Expand All @@ -52,7 +52,7 @@ namespace Sacado {
template <typename ExecSpace>
void destroyGlobalMemoryPool(const ExecSpace& space) {}

#if 0 && defined(HAVE_SACADO_KOKKOSCORE) && defined(KOKKOS_ENABLE_OPENMP)
#if 0 && defined(HAVE_SACADO_KOKKOS) && defined(KOKKOS_ENABLE_OPENMP)
namespace Impl {
extern const Kokkos::MemoryPool<Kokkos::OpenMP>* global_sacado_openmp_memory_pool;
}
Expand Down Expand Up @@ -80,7 +80,7 @@ namespace Sacado {
}
#endif

#if defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__)
#if defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(KOKKOS_ENABLE_CUDA) && defined(__CUDACC__)

namespace Impl {

Expand Down Expand Up @@ -188,7 +188,7 @@ namespace Sacado {
T* m = 0;
if (sz > 0)
KOKKOS_IMPL_CUDA_SAFE_CALL( cudaMallocManaged( (void**) &m, sz*sizeof(T), cudaMemAttachGlobal ) );
#elif defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(__CUDA_ARCH__)
#elif defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(__CUDA_ARCH__)
// This code assumes all threads enter ds_alloc, even those with sz == 0
T* m = 0;
const int total_sz = warpReduce(sz);
Expand All @@ -200,7 +200,7 @@ namespace Sacado {
}
m = warpBcast(m,0);
m += warpScan(sz);
#elif 0 && defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && defined(KOKKOS_ENABLE_OPENMP)
#elif 0 && defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && defined(KOKKOS_ENABLE_OPENMP)
T* m = 0;
if (sz > 0) {
if (global_sacado_openmp_memory_pool != 0) {
Expand All @@ -215,7 +215,7 @@ namespace Sacado {
T* m = 0;
if (sz > 0) {
m = static_cast<T* >(operator new(sz*sizeof(T)));
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
if (m == 0)
Kokkos::abort("Allocation failed.");
#endif
Expand All @@ -230,13 +230,13 @@ namespace Sacado {
#if defined( CUDA_VERSION ) && ( 6000 <= CUDA_VERSION ) && defined(KOKKOS_ENABLE_CUDA_UVM) && !defined( __CUDA_ARCH__ )
if (sz > 0)
KOKKOS_IMPL_CUDA_SAFE_CALL( cudaFree(m) );
#elif defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(__CUDA_ARCH__)
#elif defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && !defined(SACADO_DISABLE_CUDA_IN_KOKKOS) && defined(__CUDA_ARCH__)
const int total_sz = warpReduce(sz);
const int lane = warpLane();
if (total_sz > 0 && lane == 0) {
global_sacado_cuda_memory_pool_on_device->deallocate((void*) m, total_sz*sizeof(T));
}
#elif 0 && defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && defined(KOKKOS_ENABLE_OPENMP)
#elif 0 && defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL) && defined(KOKKOS_ENABLE_OPENMP)
if (sz > 0) {
if (global_sacado_openmp_memory_pool != 0)
global_sacado_openmp_memory_pool->deallocate((void*) m, sz*sizeof(T));
Expand Down Expand Up @@ -365,13 +365,13 @@ namespace Sacado {
//const int lane = warpLane();
const int lane = threadIdx.x;
if (sz > 0 && lane == 0) {
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
#if defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
m = static_cast<T*>(global_sacado_cuda_memory_pool_on_device->allocate(sz*sizeof(T)));
if (m == 0)
Kokkos::abort("Allocation failed. Kokkos memory pool is out of memory");
#else
m = static_cast<T* >(operator new(sz*sizeof(T)));
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
if (m == 0)
Kokkos::abort("Allocation failed.");
#endif
Expand All @@ -382,7 +382,7 @@ namespace Sacado {
else {
if (sz > 0) {
m = static_cast<T* >(operator new(sz*sizeof(T)));
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
if (m == 0)
Kokkos::abort("Allocation failed.");
#endif
Expand All @@ -399,7 +399,7 @@ namespace Sacado {
// const int lane = warpLane();
const int lane = threadIdx.x;
if (sz > 0 && lane == 0) {
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
#if defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
global_sacado_cuda_memory_pool_on_device->deallocate((void*) m, sz*sizeof(T));
#else
operator delete((void*) m);
Expand Down Expand Up @@ -518,13 +518,13 @@ namespace Sacado {
const int total_sz = warpReduce(sz, blockDim.x);
const int lane = threadIdx.x;
if (total_sz > 0 && lane == 0) {
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
#if defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
m = static_cast<T*>(global_sacado_cuda_memory_pool_on_device->allocate(total_sz*sizeof(T)));
if (m == 0)
Kokkos::abort("Allocation failed. Kokkos memory pool is out of memory");
#else
m = static_cast<T* >(operator new(total_sz*sizeof(T)));
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
if (m == 0)
Kokkos::abort("Allocation failed.");
#endif
Expand All @@ -536,7 +536,7 @@ namespace Sacado {
else {
if (sz > 0) {
m = static_cast<T* >(operator new(sz*sizeof(T)));
#if defined(HAVE_SACADO_KOKKOSCORE)
#if defined(HAVE_SACADO_KOKKOS)
if (m == 0)
Kokkos::abort("Allocation failed.");
#endif
Expand All @@ -555,7 +555,7 @@ namespace Sacado {
const int total_sz = warpReduce(sz, blockDim.x);
const int lane = threadIdx.x;
if (total_sz > 0 && lane == 0) {
#if defined(HAVE_SACADO_KOKKOSCORE) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
#if defined(HAVE_SACADO_KOKKOS) && defined(SACADO_KOKKOS_USE_MEMORY_POOL)
global_sacado_cuda_memory_pool_on_device->deallocate((void*) m, total_sz*sizeof(T));
#else
operator delete((void*) m);
Expand Down
Loading

0 comments on commit 7d94d3b

Please sign in to comment.