From fc67b1cbf334ae414f9104afae68187bcc4a9f4b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 25 Apr 2024 07:11:07 -0600 Subject: [PATCH] fix build using nvhpc on derecho --- machines/cmake_macros/derecho.cmake | 4 ++++ machines/cmake_macros/nvhpc_derecho.cmake | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/machines/cmake_macros/derecho.cmake b/machines/cmake_macros/derecho.cmake index 9b20dea6..0dd51b4a 100644 --- a/machines/cmake_macros/derecho.cmake +++ b/machines/cmake_macros/derecho.cmake @@ -5,6 +5,10 @@ set(MPI_SERIAL_PATH "$ENV{NCAR_ROOT_MPI_SERIAL}") set(NETCDF_PATH "$ENV{NETCDF}") set(PIO_FILESYSTEM_HINTS "lustre") set(PNETCDF_PATH "$ENV{PNETCDF}") +if(DEFINED ENV{PIO}) + set(PIO_LIBDIR "$ENV{PIO}/lib") + set(PIO_INCDIR "$ENV{PIO}/include") +endif() # If we want to use cray-libsci instead of mkl uncomment this line as well as the module in config_machines.xml string(REPLACE "-mkl=cluster" "" SLIBS "${SLIBS}") string(APPEND CPPDEFS " -DHAVE_GETTID") diff --git a/machines/cmake_macros/nvhpc_derecho.cmake b/machines/cmake_macros/nvhpc_derecho.cmake index ab1d0d57..f0b3cd87 100644 --- a/machines/cmake_macros/nvhpc_derecho.cmake +++ b/machines/cmake_macros/nvhpc_derecho.cmake @@ -2,6 +2,6 @@ if (COMP_NAME STREQUAL mpi-serial) string(APPEND CFLAGS " -std=c89 ") endif() if (NOT DEBUG) - string(APPEND FFLAGS " -target=zen3") + string(APPEND FFLAGS " -tp=zen3") endif() message("GPU_TYPE is ${GPU_TYPE} GPU_OFFLOAD is ${GPU_OFFLOAD}")