From c411a79da7d7d2ab6f3c1224feeb964ff9707d46 Mon Sep 17 00:00:00 2001 From: Jayesh Krishna Date: Thu, 15 Aug 2024 17:42:37 -0500 Subject: [PATCH 1/2] Adding support for PnetCDF in HOMME on Chrysalis Adding support for the PnetCDF library in HOMME on Chrysalis. This configuration files are used for standalone HOMME builds on Chrysalis --- components/homme/cmake/machineFiles/chrysalis.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/homme/cmake/machineFiles/chrysalis.cmake b/components/homme/cmake/machineFiles/chrysalis.cmake index a336809f6d33..68ff76ec8082 100644 --- a/components/homme/cmake/machineFiles/chrysalis.cmake +++ b/components/homme/cmake/machineFiles/chrysalis.cmake @@ -20,7 +20,13 @@ SET (USE_MPI_OPTIONS "-K --cpu_bind=cores" CACHE STRING "") # Set kokkos arch, to get correct avx flags SET (Kokkos_ARCH_ZEN2 ON CACHE BOOL "") -SET (WITH_PNETCDF FALSE CACHE FILEPATH "") +EXECUTE_PROCESS(COMMAND pnetcdf-config --prefix + RESULT_VARIABLE PNCCONFIG_RESULT + OUTPUT_VARIABLE PNCCONFIG_OUTPUT + ERROR_VARIABLE PNCCONFIG_ERROR + OUTPUT_STRIP_TRAILING_WHITESPACE +) +SET (PnetCDF_PATH "${PNCCONFIG_OUTPUT}" CACHE STRING "") EXECUTE_PROCESS(COMMAND nf-config --prefix RESULT_VARIABLE NFCONFIG_RESULT From df53433349c56a895a32d6064eab952dd47ced24 Mon Sep 17 00:00:00 2001 From: Jayesh Krishna Date: Thu, 15 Aug 2024 19:05:12 -0500 Subject: [PATCH 2/2] Adding support for PnetCDF in HOMME on Anvil Adding support for the PnetCDF library in HOMME on Anvil. This configuration files are used for standalone HOMME builds on Anvil --- components/homme/cmake/machineFiles/anvil.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/homme/cmake/machineFiles/anvil.cmake b/components/homme/cmake/machineFiles/anvil.cmake index 325a9caa280f..2abee260b44c 100644 --- a/components/homme/cmake/machineFiles/anvil.cmake +++ b/components/homme/cmake/machineFiles/anvil.cmake @@ -20,7 +20,14 @@ ENDIF() # Set kokkos arch, to get correct avx flags SET (Kokkos_ARCH_BDW ON CACHE BOOL "") -SET (WITH_PNETCDF FALSE CACHE FILEPATH "") +EXECUTE_PROCESS(COMMAND pnetcdf-config --prefix + RESULT_VARIABLE PNCCONFIG_RESULT + OUTPUT_VARIABLE PNCCONFIG_OUTPUT + ERROR_VARIABLE PNCCONFIG_ERROR + OUTPUT_STRIP_TRAILING_WHITESPACE +) +SET (PnetCDF_PATH "${PNCCONFIG_OUTPUT}" CACHE STRING "") + # # anvil module system doesn't set environment variables, but will put # nc-config in our path. anvil seperates C and Fortran libraries,