Skip to content

Commit

Permalink
Fixing errors in unit tests on apple
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Mar 20, 2024
1 parent 475515e commit 902964f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/apex/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,10 @@ inline unsigned int my_hardware_concurrency()
{
#if defined(_MSC_VER)
return std::thread::hardware_concurrency();
#else
/*
#elif defined(__APPLE__)
unsigned int cores = std::thread::hardware_concurrency();
return cores ? cores : sysconf(_SC_NPROCESSORS_ONLN);
*/
#else
static std::vector<uint32_t>
cores{parseDiscreteValues(getCpusAllowed("/proc/self/status"))};
return cores.size();
Expand Down
2 changes: 1 addition & 1 deletion src/examples/PeriodicPlugin/policy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void foo(int i) {

int main (int argc, char *argv[]) {

int iters = 100;
int iters = 50;
int nthreads = 4;

if (argc == 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/unit_tests/Kokkos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ foreach(example_program ${example_programs})
set(sources ${example_program}.cpp)
source_group("Source Files" FILES ${sources})
add_executable("${example_program}_kokkos" ${sources})
target_link_libraries ("${example_program}_kokkos" apex kokkos ${LIBS})
target_link_libraries ("${example_program}_kokkos" apex ${Kokkos_LIBRARY} ${LIBS})
if (OPENMP_FOUND)
set_target_properties("${example_program}_kokkos" PROPERTIES COMPILE_FLAGS ${OpenMP_CXX_FLAGS})
endif (OPENMP_FOUND)
Expand Down

0 comments on commit 902964f

Please sign in to comment.