Skip to content

Commit

Permalink
Merge branch 'ndk/machinefiles/homme-cori-cmake' (PR #1230)
Browse files Browse the repository at this point in the history
Changes to allow for the HOMME test to pass for cori-haswell and cori-knl.

Add "module load zlib" and use this library.
Add custom srun flags temporarily
Remove old corip1 config file

[BFB]
  • Loading branch information
ndkeen committed Jan 20, 2017
2 parents b7929bf + 93c5397 commit a5b870b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 41 deletions.
2 changes: 2 additions & 0 deletions cime/cime_config/acme/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
<command name="load">cmake/3.3.2</command>
<command name="load">pmi/5.0.10-1.0000.11050.0.0.ari</command>
<command name="load">papi/5.4.3.2</command>
<command name="load">zlib</command>
<!--command name="load">cray-petsc/3.7.0.0</command-->
</modules>
</module_system>
Expand Down Expand Up @@ -422,6 +423,7 @@
<command name="load">cmake/3.3.2</command>
<command name="load">pmi/5.0.10-1.0000.11050.0.0.ari</command>
<command name="load">papi/5.4.3.2</command>
<command name="load">zlib</command>
<!--command name="load">cray-petsc/3.7.0.0</command-->
</modules>
</module_system>
Expand Down
37 changes: 29 additions & 8 deletions components/homme/cmake/machineFiles/cori-haswell.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,39 @@ SET (CMAKE_C_COMPILER cc CACHE FILEPATH "")
SET (CMAKE_CXX_COMPILER CC CACHE FILEPATH "")

SET (NETCDF_DIR $ENV{NETCDF_DIR} CACHE FILEPATH "")
#example with module cray-netcdf-hdf5parallel/4.3.3.1:
# NETCDF_DIR=/opt/cray/netcdf-hdf5parallel/4.3.3.1/INTEL/14.0

#ndk SET (PNETCDF_DIR $ENV{PARALLEL_NETCDF_DIR} CACHE FILEPATH "")
# this env var is not set with module cray-netcdf-hdf5parallel/4.3.3.1

SET (HDF5_DIR $ENV{HDF5_DIR} CACHE FILEPATH "")
#example with module cray-hdf5-parallel/1.8.14:
# HDF5_DIR=/opt/cray/hdf5-parallel/1.8.14/INTEL/14.0

#ZLIB_DIR=/global/common/cori/software/zlib/1.2.8/hsw/intel
SET (ZLIB_DIR $ENV{ZLIB_DIR} CACHE FILEPATH "")
SET (ZLIB_LIBRARY ${ZLIB_DIR}/lib/libz.a CACHE FILEPATH "")
#MESSAGE(STATUS " cori-haswell.cmake ENV(ZLIB_DIR)=$ENV{ZLIB_DIR}")
#MESSAGE(STATUS " cori-haswell.cmake ZLIB_DIR=${ZLIB_DIR}")
#MESSAGE(STATUS " cori-haswell.cmake ZLIB_LIBRARY=${ZLIB_LIBRARY}")

EXECUTE_PROCESS(COMMAND which nf-config
RESULT_VARIABLE NFCONFIG_PATH_RESULT
OUTPUT_VARIABLE NFCONFIG_PATH_OUTPUT
ERROR_VARIABLE NFCONFIG_PATH_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(COMMAND ${NFCONFIG_PATH_OUTPUT} --flibs
RESULT_VARIABLE NFCONFIG_RESULT
OUTPUT_VARIABLE NFCONFIG_OUTPUT
ERROR_VARIABLE NFCONFIG_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF (${NFCONFIG_ERROR})
MESSAGE(WARNING "${NETCDF_DIR}/bin/nf-config --flibs produced an error. Default linking will be used.")
ELSE ()
SET (ADD_LINKER_FLAGS " ${NFCONFIG_OUTPUT} " CACHE STRING "")
ENDIF ()
#MESSAGE(STATUS " cori-haswell.cmake NFCONFIG_OUTPUT=${NFCONFIG_OUTPUT}")

SET (CMAKE_SYSTEM_NAME Catamount CACHE FILEPATH "")

SET (USE_QUEUING FALSE CACHE BOOL "")

SET (USE_MPIEXEC "srun" CACHE STRING "")

# temporary fix:
SET (USE_MPI_OPTIONS "-c 2 --cpu_bind=cores" CACHE STRING "")
38 changes: 30 additions & 8 deletions components/homme/cmake/machineFiles/cori-knl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,40 @@ SET (CMAKE_C_COMPILER cc CACHE FILEPATH "")
SET (CMAKE_CXX_COMPILER CC CACHE FILEPATH "")

SET (NETCDF_DIR $ENV{NETCDF_DIR} CACHE FILEPATH "")
#example with module cray-netcdf-hdf5parallel/4.3.3.1:
# NETCDF_DIR=/opt/cray/netcdf-hdf5parallel/4.3.3.1/INTEL/14.0

#ndk SET (PNETCDF_DIR $ENV{PARALLEL_NETCDF_DIR} CACHE FILEPATH "")
# this env var is not set with module cray-netcdf-hdf5parallel/4.3.3.1

SET (HDF5_DIR $ENV{HDF5_DIR} CACHE FILEPATH "")
#example with module cray-hdf5-parallel/1.8.14:
# HDF5_DIR=/opt/cray/hdf5-parallel/1.8.14/INTEL/14.0

#ZLIB_DIR=/global/common/cori/software/zlib/1.2.8/hsw/intel
SET (ZLIB_DIR $ENV{ZLIB_DIR} CACHE FILEPATH "")
SET (ZLIB_LIBRARY ${ZLIB_DIR}/lib/libz.a CACHE FILEPATH "")
#MESSAGE(STATUS " cori-knl.cmake ENV(ZLIB_DIR)=$ENV{ZLIB_DIR}")
#MESSAGE(STATUS " cori-knl.cmake ZLIB_DIR=${ZLIB_DIR}")
#MESSAGE(STATUS " cori-knl.cmake ZLIB_LIBRARY=${ZLIB_LIBRARY}")

EXECUTE_PROCESS(COMMAND which nf-config
RESULT_VARIABLE NFCONFIG_PATH_RESULT
OUTPUT_VARIABLE NFCONFIG_PATH_OUTPUT
ERROR_VARIABLE NFCONFIG_PATH_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(COMMAND ${NFCONFIG_PATH_OUTPUT} --flibs
RESULT_VARIABLE NFCONFIG_RESULT
OUTPUT_VARIABLE NFCONFIG_OUTPUT
ERROR_VARIABLE NFCONFIG_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF (${NFCONFIG_ERROR})
MESSAGE(WARNING "${NETCDF_DIR}/bin/nf-config --flibs produced an error. Default linking will be used.")
ELSE ()
SET (ADD_LINKER_FLAGS " ${NFCONFIG_OUTPUT} " CACHE STRING "")
ENDIF ()
#MESSAGE(STATUS " cori-knl.cmake NFCONFIG_OUTPUT=${NFCONFIG_OUTPUT}")

SET (CMAKE_SYSTEM_NAME Catamount CACHE FILEPATH "")

SET (USE_QUEUING FALSE CACHE BOOL "")

SET (USE_MPIEXEC "srun" CACHE STRING "")

# temporary fix:
SET (USE_MPI_OPTIONS "-c 4 --cpu_bind=cores" CACHE STRING "")

25 changes: 0 additions & 25 deletions components/homme/cmake/machineFiles/corip1.cmake

This file was deleted.

0 comments on commit a5b870b

Please sign in to comment.