Skip to content

Commit

Permalink
Merge 'origin/jayeshkrishna/homme/add_pnetcdf_for_standalone_bfbtests…
Browse files Browse the repository at this point in the history
…' (PR #6561)

Adding support for the PnetCDF library in HOMME for the
BFB tests on Anvil and Chrysalis.

Also see related PR #6552

[BFB]
  • Loading branch information
oksanaguba committed Aug 26, 2024
2 parents 5944263 + 455ac56 commit a6a6c23
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-bfb.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-bfb.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 a6a6c23

Please sign in to comment.