From 1862077fae07ca5b9db020df8da1fc0957725c50 Mon Sep 17 00:00:00 2001 From: Gregor Daiss Date: Thu, 31 Aug 2023 12:46:52 -0500 Subject: [PATCH 1/2] Fix typos and SYCL build --- frontend/init_methods.cpp | 2 +- src/options_processing.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/init_methods.cpp b/frontend/init_methods.cpp index 67286147..30d7fb43 100644 --- a/frontend/init_methods.cpp +++ b/frontend/init_methods.cpp @@ -195,7 +195,7 @@ void init_executors(void) { } else { std::cerr << "Registering HPX SYCL polling..." << std::endl; hpx::sycl::experimental::detail::register_polling(hpx::resource::get_thread_pool(0)); - }/ + } std::cerr << "Registered HPX SYCL polling!" << std::endl; #endif diff --git a/src/options_processing.cpp b/src/options_processing.cpp index 582cd9eb..dff5e7e1 100644 --- a/src/options_processing.cpp +++ b/src/options_processing.cpp @@ -487,8 +487,8 @@ bool options::process_options(int argc, char *argv[]) { if (opts().executors_per_gpu < 1 && (opts().monopole_device_kernel_type != OFF || opts().multipole_device_kernel_type != OFF || opts().hydro_device_kernel_type != OFF)) { std::cerr << std::endl << "ERROR: "; - std::cerr << "You have chosen an GPU kernel, however, you did not specify --executor_per_gpu > 0" << std::endl - << " Choose a different kernel or add at least one or more executors via --executor_per_gpu=X" << std::endl; + std::cerr << "You have chosen an GPU kernel, however, you did not specify --executors_per_gpu > 0" << std::endl + << " Choose a different kernel or add at least one or more executors via --executors_per_gpu=X" << std::endl; abort(); } if (opts().max_kernels_fused < 1 && (opts().monopole_device_kernel_type != OFF || From ec4e2ee12841dc7d6d47d72d0eee34ce5e39d8f5 Mon Sep 17 00:00:00 2001 From: Gregor Daiss Date: Thu, 31 Aug 2023 13:27:28 -0500 Subject: [PATCH 2/2] Move output to stdout and print SYCL future type --- frontend/init_methods.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/frontend/init_methods.cpp b/frontend/init_methods.cpp index 30d7fb43..0154b1e7 100644 --- a/frontend/init_methods.cpp +++ b/frontend/init_methods.cpp @@ -179,35 +179,41 @@ void init_executors(void) { #if HPX_KOKKOS_CUDA_FUTURE_TYPE == 0 #if (defined(OCTOTIGER_HAVE_CUDA) || defined(OCTOTIGER_HAVE_HIP) || defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP)) if (opts().polling_threads>0) { - std::cerr << "Registering HPX CUDA polling on polling pool..." << std::endl; + std::cout << "Registering HPX CUDA polling on polling pool..." << std::endl; hpx::cuda::experimental::detail::register_polling(hpx::resource::get_thread_pool("polling")); } else { - std::cerr << "Registering HPX CUDA polling..." << std::endl; + std::cout << "Registering HPX CUDA polling..." << std::endl; hpx::cuda::experimental::detail::register_polling(hpx::resource::get_thread_pool(0)); } - std::cerr << "Registered HPX CUDA polling!" << std::endl; + std::cout << "Registered HPX CUDA polling!" << std::endl; #endif #endif #if defined(OCTOTIGER_HAVE_KOKKOS) && defined(KOKKOS_ENABLE_SYCL) if (opts().polling_threads>0) { - std::cerr << "Registering HPX SYCL polling on polling pool..." << std::endl; + std::cout << "Registering HPX SYCL polling on polling pool..." << std::endl; hpx::sycl::experimental::detail::register_polling(hpx::resource::get_thread_pool("polling")); } else { - std::cerr << "Registering HPX SYCL polling..." << std::endl; + std::cout << "Registering HPX SYCL polling..." << std::endl; hpx::sycl::experimental::detail::register_polling(hpx::resource::get_thread_pool(0)); } - std::cerr << "Registered HPX SYCL polling!" << std::endl; + std::cout << "Registered HPX SYCL polling!" << std::endl; +#if HPX_KOKKOS_SYCL_FUTURE_TYPE == 0 + std::cout << "Using HPX SYCL futures with polling!" << std::endl; +#endif +#if HPX_KOKKOS_SYCL_FUTURE_TYPE == 1 + std::cout << "Using HPX SYCL futures with host_tasks!" << std::endl; +#endif #endif #if defined(OCTOTIGER_HAVE_KOKKOS) - std::cerr << "Initializing Kokkos host executors..." << std::endl; + std::cout << "Initializing Kokkos host executors..." << std::endl; stream_pool::init_all_executor_pools>( 256, hpx::kokkos::execution_space_mode::independent); stream_pool::init_all_executor_pools>( 256, hpx::kokkos::execution_space_mode::independent); - std::cerr << "Initializing Kokkos device executors..." << std::endl; - std::cerr << "CPPuddle config: Using " << recycler::max_number_gpus << " devices!" << std::endl; - std::cerr << "CPPuddle config: Using " << recycler::number_instances << " internal pool instances!" + std::cout << "Initializing Kokkos device executors..." << std::endl; + std::cout << "CPPuddle config: Max number GPUs: " << recycler::max_number_gpus << " devices!" << std::endl; + std::cout << "CPPuddle config: Using " << recycler::number_instances << " internal buffer buckets!" << std::endl; #if defined(KOKKOS_ENABLE_CUDA) stream_pool::set_device_selector(mover); Kokkos::fence(); #if HPX_KOKKOS_CUDA_FUTURE_TYPE == 0 - std::cerr << "KOKKOS with polling futures enabled!" << std::endl; + std::cout << "KOKKOS with polling futures enabled!" << std::endl; #else - std::cerr << "KOKKOS with callback futures enabled!" << std::endl; + std::cout << "KOKKOS with callback futures enabled!" << std::endl; #endif #endif #endif