diff --git a/src/apex/apex_kokkos.cpp b/src/apex/apex_kokkos.cpp index 442fe6d0..b4639f7b 100644 --- a/src/apex/apex_kokkos.cpp +++ b/src/apex/apex_kokkos.cpp @@ -16,11 +16,13 @@ #include #include +/* static std::mutex memory_mtx; static std::unordered_map& memory_map() { static std::unordered_map themap; return themap; } +*/ static std::stack& timer_stack() { static APEX_NATIVE_TLS std::stack thestack; return thestack; @@ -159,13 +161,16 @@ extern "C" void kokkosp_pop_profile_region() { */ extern "C" void kokkosp_allocate_data(SpaceHandle_t handle, const char* name, void* ptr, uint64_t size) { + APEX_UNUSED(ptr); std::stringstream ss; ss << "Kokkos " << handle.name << " data, " << name; + /* std::string tmp{ss.str()}; auto p = apex::start(tmp); memory_mtx.lock(); memory_map().insert(std::pair(ptr, p)); memory_mtx.unlock(); + */ ss << ": Bytes"; std::string tmp2{ss.str()}; double bytes = (double)(size); @@ -181,12 +186,15 @@ extern "C" void kokkosp_deallocate_data(SpaceHandle handle, const char* name, void* ptr, uint64_t size) { APEX_UNUSED(handle); APEX_UNUSED(name); + APEX_UNUSED(ptr); APEX_UNUSED(size); + /* memory_mtx.lock(); auto p = memory_map()[ptr]; memory_map().erase(ptr); memory_mtx.unlock(); apex::stop(p); + */ } /* This function will be called whenever a Kokkos::deep_copy function is diff --git a/src/scripts/apex_exec b/src/scripts/apex_exec index 7e607e8f..01cc2a96 100755 --- a/src/scripts/apex_exec +++ b/src/scripts/apex_exec @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash LANG="C" export LANG @@ -45,11 +45,11 @@ fi if [ ! -x "$prog" ] ; then prog=`which $prog 2>/dev/null` fi - + if [ ! -x "$prog" ] ; then echo "apex_exec: $1: command not found" exit - fi + fi #fi if [ $apple = 1 ]; then @@ -64,7 +64,8 @@ fi echo "LD_AUDIT=$APEX_LD_AUDITOR" export LD_PRELOAD=$APEX_LD_PRELOAD fi - + export KOKKOS_PROFILE_LIBRARY=$BASEDIR/lib/libapex$SHLIBX + $@ retval=$? unset LD_PRELOAD