Skip to content

Commit

Permalink
Merge 'origin/jayeshkrishna/homme/add_pnetcdf_for_standalone' (PR #6552)
Browse files Browse the repository at this point in the history
Adding support for PnetCDF for HOMME standalone builds on
Anvil and Chrysalis

[BFB]
  • Loading branch information
oksanaguba committed Aug 22, 2024
2 parents 37583bd + df53433 commit c6ac698
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion components/homme/cmake/machineFiles/anvil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion components/homme/cmake/machineFiles/chrysalis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6ac698

Please sign in to comment.