From 8dea2fbab479a2c75d54c9b0b1e04021a1da7d21 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 9 Jun 2022 11:01:56 -0600 Subject: [PATCH] Fix some things with Ascent (#631) --- CMakeLists.txt | 1 + amr-wind/utilities/console_io.cpp | 1 + cmake/set_amrex_options.cmake | 11 ++--------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db8db360f2..d41bd47386 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,6 +158,7 @@ endif() if(AMR_WIND_ENABLE_ASCENT) set(CMAKE_PREFIX_PATH ${ASCENT_DIR} ${CMAKE_PREFIX_PATH}) find_package(Ascent REQUIRED) + find_package(OpenMP REQUIRED) if(AMR_WIND_ENABLE_MPI) target_link_libraries(${amr_wind_lib_name} PUBLIC ascent::ascent_mpi) else() diff --git a/amr-wind/utilities/console_io.cpp b/amr-wind/utilities/console_io.cpp index 4363c95371..3c37b76def 100644 --- a/amr-wind/utilities/console_io.cpp +++ b/amr-wind/utilities/console_io.cpp @@ -18,6 +18,7 @@ #endif #ifdef AMR_WIND_USE_ASCENT #include "ascent_config.h" +#include #endif namespace amrex { diff --git a/cmake/set_amrex_options.cmake b/cmake/set_amrex_options.cmake index 339c388cc5..2d2f924eec 100644 --- a/cmake/set_amrex_options.cmake +++ b/cmake/set_amrex_options.cmake @@ -4,11 +4,11 @@ set(AMReX_SPACEDIM 3) set(AMReX_AMRDATA OFF) set(AMReX_AMRLEVEL OFF) set(AMReX_ASSERTIONS OFF) -set(AMReX_ASCENT OFF) +set(AMReX_ASCENT ${AMR_WIND_ENABLE_ASCENT}) set(AMReX_BACKTRACE OFF) set(AMReX_BASE_PROFILE OFF) set(AMReX_COMM_PROFILE OFF) -set(AMReX_CONDUIT OFF) +set(AMReX_CONDUIT ${AMR_WIND_ENABLE_ASCENT}) set(AMReX_PRECISION DOUBLE) set(AMReX_EB OFF) set(AMReX_FORTRAN OFF) @@ -39,10 +39,3 @@ elseif(AMR_WIND_ENABLE_DPCPP) else() set(AMReX_GPU_BACKEND NONE CACHE STRING "AMReX GPU type" FORCE) endif() - -if (AMR_WIND_ENABLE_ASCENT) - set(AMReX_ASCENT ON) - set(AMReX_CONDUIT ON) -else() - set(AMReX_CONDUIT OFF) -endif()