Skip to content

Commit

Permalink
Merge branch 'agsalin/update-to-cime5.3.1' (PR #1490)
Browse files Browse the repository at this point in the history
Update to cime5.3-alpha10

Pulling in another 2 weeks of CIME changes into ACME.
CIME hash 15297cd from May 2.

Required bug fixes for:

    Changing error to warning for using "-id" with single dash
    acme templates missing "arg ="
    Restore pio1 Cmake path pointing to pio2/cmake
    Update to gcc5.3.0 to avoid internal compiler error

Still had 2 fails of acme_developer on penn machine, but look to be
weird gcc issues -- var tracking overflow. Same tests passed on
redsky, so expecting it will pass on ACME machines.

[BFB]

* agsalin/update-to-cime5.3.1: (219 commits)
  Add fix to bug in docn that was in this cime version
  Fix upstream merge resolution mistake
  Bug fix: Handle failures to get mem usage from baselines
  Make single-dash before multichar arg a warning
  Fix acme template change for new parser
  Update Sandia worksations to gcc5.3.0
  Comment out invalid_args check
  Revert change in pio1 to point into pio2/cmake
  Fix single submit
  Add tests
  Do not override walltime unless test
  Update ChangeLog
  nag compiler needs a width
  Add checks to verify the create_newcase directory was created as expected
  removed unpack commented region
  fix typo in parse_args
  Bug fixes
  Minor pylint fix
  fix pylint issues
  rename function
  ...
  • Loading branch information
jgfouca committed May 18, 2017
2 parents 009f358 + b05bf42 commit 6509197
Show file tree
Hide file tree
Showing 261 changed files with 12,723 additions and 6,374 deletions.
32 changes: 28 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ cmake_minimum_required(VERSION 2.8)
include(ExternalProject)
set(CIME_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")

list(APPEND CMAKE_MODULE_PATH ${CIME_CMAKE_MODULE_DIRECTORY})
include(CIME_initial_setup)

project(cime_tests Fortran C)

# We rely on pio for cmake utilities like findnetcdf.cmake, so that we don't
# need to duplicate this cmake code
list(APPEND CMAKE_MODULE_PATH "${CIME_ROOT}/src/externals/pio2/cmake")

list(APPEND CMAKE_MODULE_PATH ${CIME_CMAKE_MODULE_DIRECTORY})
include(CIME_utils)
find_package(NetCDF COMPONENTS C Fortran)
include_directories(${NetCDF_C_INCLUDE_DIRS} ${NetCDF_Fortran_INCLUDE_DIRS})
Expand All @@ -21,14 +23,21 @@ include_directories(${NetCDF_C_INCLUDE_DIRS} ${NetCDF_Fortran_INCLUDE_DIRS})
# ------------------------------------------------------------------------
set(MCT_ROOT "${CIME_ROOT}/src/externals/mct")

if (USE_MPI_SERIAL)
set(ENABLE_MPI_SERIAL "--enable-mpiserial")
else()
set(ENABLE_MPI_SERIAL "")
endif()

ExternalProject_add(mct_project
PREFIX ${CMAKE_CURRENT_BINARY_DIR}
SOURCE_DIR ${MCT_ROOT}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/mct
CONFIGURE_COMMAND ${MCT_ROOT}/configure --enable-debugging --prefix=${CMAKE_CURRENT_BINARY_DIR} CFLAGS=${CFLAGS} FCFLAGS=${FFLAGS} SRCDIR=${MCT_ROOT} DEBUG="-g"
BUILD_COMMAND $(MAKE)
CONFIGURE_COMMAND ${MCT_ROOT}/configure ${ENABLE_MPI_SERIAL} --enable-debugging --prefix=${CMAKE_CURRENT_BINARY_DIR} CC=${CMAKE_C_COMPILER} FC=${CMAKE_Fortran_COMPILER} CFLAGS=${CFLAGS} FCFLAGS=${FFLAGS} SRCDIR=${MCT_ROOT} DEBUG="-g"
BUILD_COMMAND $(MAKE) SRCDIR=${MCT_ROOT}
# Leave things in <BINARY_DIR> rather than "installing", because we have
# no need to move things around inside of the CMake binary directory.
# no need to move things around inside of the CMake binary directory. Also,
# mpi-serial doesn't install properly in the out-of-source build
INSTALL_COMMAND :
)
# This copy_makefiles step is needed because mct currently doesn't support an
Expand All @@ -43,12 +52,27 @@ ExternalProject_add_step(mct_project copy_makefiles
COMMAND mkdir -p mpeu
COMMAND cp -p <SOURCE_DIR>/mpeu/Makefile mpeu/
)
if (USE_MPI_SERIAL)
ExternalProject_add_step(mct_project copy_mpi_serial_files
DEPENDEES configure
DEPENDERS build
WORKING_DIRECTORY <BINARY_DIR>
COMMAND mkdir -p mpi-serial
COMMAND cp -p <SOURCE_DIR>/mpi-serial/Makefile mpi-serial/
COMMAND cp <SOURCE_DIR>/mpi-serial/mpif.h mpi-serial/
COMMAND cp <SOURCE_DIR>/mpi-serial/mpi.h mpi-serial/
)
endif()

# Tell cmake to look for libraries & mod files here, because this is where we built libraries
include_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mct)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpeu)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mct)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpeu)
if (USE_MPI_SERIAL)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpi-serial)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpi-serial)
endif()

# ------------------------------------------------------------------------
# Done MCT build
Expand Down
Loading

0 comments on commit 6509197

Please sign in to comment.