Skip to content

Commit

Permalink
Merge pull request #544 from LBL-EESA/develop
Browse files Browse the repository at this point in the history
4.0.0 release
  • Loading branch information
burlen authored Jan 27, 2021
2 parents ba9cf18 + 2edad43 commit 2430670
Show file tree
Hide file tree
Showing 306 changed files with 31,290 additions and 6,797 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Please fill the following sections in as completely as possible. Please include all CMake output under `Additional information` when reporting build issues.

**Description of the issue**
...

**Platform**
| Field | Value |
| ------------: | :------------------ |
| HPC Center: | |
| System name: | |
| OS name/ver: | |
| Compiler ver: | |
| CMake ver: | |


**Steps to Reproduce**
...

**Additional information**
...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.sw[a-z]
*.patch
_build
*.pt
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

sphinx:
configuration: doc/rtd/conf.py

python:
version: 3.7
install:
- requirements: doc/rtd/requirements.txt
25 changes: 18 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,32 @@ os:
- linux
- osx

osx_image:
- xcode12.2

env:
global:
- BUILD_TYPE=Debug
- TECA_DIR=/travis_teca_dir
- TECA_PYTHON_VERSION=3
- TECA_DATA_REVISION=49
matrix:
- DOCKER_IMAGE=ubuntu IMAGE_VERSION=18.04 IMAGE_NAME=ubuntu_18_04
- DOCKER_IMAGE=fedora IMAGE_VERSION=28 IMAGE_NAME=fedora_28
- TECA_DATA_REVISION=101
jobs:
- DOCKER_IMAGE=ubuntu IMAGE_VERSION=20.04 IMAGE_NAME=ubuntu_20_04 REQUIRE_NETCDF_MPI=TRUE
- DOCKER_IMAGE=ubuntu IMAGE_VERSION=20.04 IMAGE_NAME=ubuntu_20_04 REQUIRE_NETCDF_MPI=FALSE
- DOCKER_IMAGE=fedora IMAGE_VERSION=32 IMAGE_NAME=fedora_32 REQUIRE_NETCDF_MPI=TRUE
- DOCKER_IMAGE=fedora IMAGE_VERSION=32 IMAGE_NAME=fedora_32 REQUIRE_NETCDF_MPI=FALSE
- NO_DOCKER=TRUE

matrix:
jobs:
exclude:
- os: osx
env: DOCKER_IMAGE=ubuntu IMAGE_VERSION=18.04 IMAGE_NAME=ubuntu_18_04
env: DOCKER_IMAGE=ubuntu IMAGE_VERSION=20.04 IMAGE_NAME=ubuntu_20_04 REQUIRE_NETCDF_MPI=TRUE
- os: osx
env: DOCKER_IMAGE=ubuntu IMAGE_VERSION=20.04 IMAGE_NAME=ubuntu_20_04 REQUIRE_NETCDF_MPI=FALSE
- os: osx
env: DOCKER_IMAGE=fedora IMAGE_VERSION=32 IMAGE_NAME=fedora_32 REQUIRE_NETCDF_MPI=TRUE
- os: osx
env: DOCKER_IMAGE=fedora IMAGE_VERSION=28 IMAGE_NAME=fedora_28
env: DOCKER_IMAGE=fedora IMAGE_VERSION=32 IMAGE_NAME=fedora_32 REQUIRE_NETCDF_MPI=FALSE
- os: linux
env: NO_DOCKER=TRUE

Expand All @@ -48,6 +57,7 @@ install:
docker exec teca_${DOCKER_IMAGE}_${IMAGE_VERSION} /bin/bash -c
"export TECA_PYTHON_VERSION=${TECA_PYTHON_VERSION} &&
export TECA_DATA_REVISION=${TECA_DATA_REVISION} &&
export REQUIRE_NETCDF_MPI=${REQUIRE_NETCDF_MPI} &&
${TECA_DIR}/test/travis_ci/install_${IMAGE_NAME}.sh";
fi
Expand All @@ -64,5 +74,6 @@ script:
export BUILD_TYPE=${BUILD_TYPE} &&
export DOCKER_IMAGE=${DOCKER_IMAGE} &&
export IMAGE_VERSION=${IMAGE_VERSION} &&
export REQUIRE_NETCDF_MPI=${REQUIRE_NETCDF_MPI} &&
${TECA_DIR}/test/travis_ci/ctest_linux.sh";
fi
28 changes: 14 additions & 14 deletions CMake/FindMPI4Py.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
# Check if mpi4py is installed and configure c-api includes
#
# This module defines
# MPI4PY_FOUND, set TRUE if mpi4py and c-api are available
# MPI4PY_INCLUDE_DIR, where to find c-api headers
# MPI4PY_VERSION, mpi4py release version
# MPI4Py_FOUND, set TRUE if mpi4py and c-api are available
# MPI4Py_INCLUDE_DIR, where to find c-api headers
# MPI4Py_VERSION, mpi4py release version
set(_TMP_PY_OUTPUT)
set(_TMP_PY_RETURN)
exec_program("${PYTHON_EXECUTABLE}"
ARGS "-c 'import mpi4py; print(mpi4py.get_include())'"
OUTPUT_VARIABLE _TMP_PY_OUTPUT
RETURN_VALUE _TMP_PY_RETURN)
set(MPI4PY_INCLUDE_FOUND FALSE)
set(MPI4Py_INCLUDE_FOUND FALSE)
if(NOT _TMP_PY_RETURN AND EXISTS "${_TMP_PY_OUTPUT}")
set(MPI4PY_INCLUDE_FOUND TRUE)
set(MPI4Py_INCLUDE_FOUND TRUE)
else()
set(_TMP_PY_OUTPUT)
endif()
set(MPI4PY_INCLUDE_DIR "${_TMP_PY_OUTPUT}" CACHE PATH
set(MPI4Py_INCLUDE_DIR "${_TMP_PY_OUTPUT}" CACHE PATH
"mpi4py include directories")

set(_TMP_PY_OUTPUT)
Expand All @@ -28,22 +28,22 @@ exec_program("${PYTHON_EXECUTABLE}"
ARGS "-c 'import mpi4py; print(mpi4py.__version__)'"
OUTPUT_VARIABLE _TMP_PY_OUTPUT
RETURN_VALUE _TMP_PY_RETURN)
set(MPI4PY_VERSION_FOUND FALSE)
set(MPI4Py_VERSION_FOUND FALSE)
if(NOT _TMP_PY_RETURN)
set(MPI4PY_VERSION_FOUND TRUE)
set(MPI4Py_VERSION_FOUND TRUE)
else()
set(_TMP_PY_OUTPUT)
endif()
set(MPI4PY_VERSION "${_TMP_PY_OUTPUT}" CACHE STRING
set(MPI4Py_VERSION "${_TMP_PY_OUTPUT}" CACHE STRING
"mpi4py version string")

if (NOT ${QUIET})
message(STATUS "MPI4PY_INCLUDE_DIR=${MPI4PY_INCLUDE_DIR}")
message(STATUS "MPI4PY_VERSION=${MPI4PY_VERSION}")
message(STATUS "MPI4Py_INCLUDE_DIR=${MPI4Py_INCLUDE_DIR}")
message(STATUS "MPI4Py_VERSION=${MPI4Py_VERSION}")
endif()

mark_as_advanced(MPI4PY_INCLUDE_DIR MPI4PY_VERSION)
mark_as_advanced(MPI4Py_INCLUDE_DIR MPI4Py_VERSION)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MPI4PY DEFAULT_MSG
MPI4PY_INCLUDE_FOUND MPI4PY_VERSION_FOUND)
find_package_handle_standard_args(MPI4Py DEFAULT_MSG
MPI4Py_INCLUDE_FOUND MPI4Py_VERSION_FOUND)
25 changes: 25 additions & 0 deletions CMake/FindMatplotlib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#*****************************************************************************
# FindMatplotlib
#
# Check if matplotlib is installed and configure c-api includes
#
# This module defines
# Matplotlib_FOUND, set TRUE if matplotlib and c-api are available
# Matplotlib_VERSION, matplotlib release version

set(_TMP_PY_OUTPUT)
set(_TMP_PY_RETURN)
exec_program("${PYTHON_EXECUTABLE}"
ARGS "-c 'import matplotlib; print(matplotlib.__version__)'"
OUTPUT_VARIABLE _TMP_PY_OUTPUT
RETURN_VALUE _TMP_PY_RETURN)
set(Matplotlib_VERSION_FOUND FALSE)
if(NOT _TMP_PY_RETURN)
set(Matplotlib_VERSION_FOUND TRUE)
else()
set(_TMP_PY_OUTPUT)
endif()
set(Matplotlib_VERSION "${_TMP_PY_OUTPUT}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Matplotlib DEFAULT_MSG Matplotlib_VERSION_FOUND)
157 changes: 60 additions & 97 deletions CMake/FindNetCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,133 +32,96 @@
# target_link_libraries (uses_everthing ${NETCDF_LIBRARIES})
# target_link_libraries (only_uses_f90 ${NETCDF_F90_LIBRARIES})


#search starting from user editable cache var
if (NETCDF_INCLUDE_DIR AND NETCDF_LIBRARY)
# Already in cache, be silent
set (NETCDF_FIND_QUIETLY TRUE)
endif ()

# find the library
# first look where the user told us
if (NETCDF_DIR)
find_library (NETCDF_LIBRARY NAMES netcdf
PATHS "${NETCDF_DIR}/lib" "${NETCDF_DIR}/lib64"
NO_DEFAULT_PATH)
endif()

# next look in LD_LIBRARY_PATH for libraries
find_library (NETCDF_LIBRARY NAMES netcdf
PATHS ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)

# finally CMake can look
find_library (NETCDF_LIBRARY NAMES netcdf)

mark_as_advanced (NETCDF_LIBRARY)
set (NETCDF_C_LIBRARIES ${NETCDF_LIBRARY})

# find the header
# first look where the user told us
if (NETCDF_DIR)
find_path (NETCDF_INCLUDE_DIR netcdf.h
PATHS "${NETCDF_DIR}/include" NO_DEFAULT_PATH)
endif()

# then look relative to library dir
get_filename_component(NETCDF_LIBRARY_DIR
${NETCDF_LIBRARY} DIRECTORY)

find_path (NETCDF_INCLUDE_DIR netcdf.h
PATHS "${NETCDF_LIBRARY_DIR}/../include"
NO_DEFAULT_PATH)

# finally CMake can look
find_path (NETCDF_INCLUDE_DIR netcdf.h)

mark_as_advanced (NETCDF_INCLUDE_DIR)
set (NETCDF_C_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR})


#start finding requested language components
set (NetCDF_libs "")
set (NetCDF_includes "${NETCDF_INCLUDE_DIR}")

get_filename_component (NetCDF_lib_dirs "${NETCDF_LIBRARY}" PATH)
set (NETCDF_HAS_INTERFACES "YES") # will be set to NO if we're missing any interfaces

macro (NetCDF_check_interface lang header libs)
if (NETCDF_${lang})
# find the library
# find the library
# use package config, this works well on systems that make
# use of modules to manage installs not in the standard
# locations that cmake knows about
find_package(PkgConfig REQUIRED)
pkg_check_modules(NC_TMP netcdf QUIET)
if (NC_TMP_FOUND AND NC_TMP_LINK_LIBRARIES AND NC_TMP_LIBRARY_DIRS AND NC_TMP_INCLUDE_DIRS)
set(NETCDF_LIBRARY_DIR ${NC_TMP_LIBRARY_DIRS})
set(NETCDF_LIBRARY ${NC_TMP_LINK_LIBRARIES})
set(NETCDF_INCLUDE_DIR ${NC_TMP_INCLUDE_DIRS})
else()
# package config failed, use cmake
# first look where the user told us
if (NETCDF_DIR)
find_library (NETCDF_${lang}_LIBRARY NAMES netcdf
find_library(NETCDF_LIBRARY NAMES netcdf
PATHS "${NETCDF_DIR}/lib" "${NETCDF_DIR}/lib64"
NO_DEFAULT_PATH)
endif()

# next look in LD_LIBRARY_PATH for libraries
find_library (NETCDF_${lang}_LIBRARY NAMES netcdf
find_library(NETCDF_LIBRARY NAMES netcdf
PATHS ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)

# finally CMake can look
find_library (NETCDF_${lang}_LIBRARY NAMES netcdf)
find_library(NETCDF_LIBRARY NAMES netcdf)

message(STATUS ${NETCDF_LIBRARY})
endif()

# find the header
# if we can find the library it is found now
# record what we have
mark_as_advanced (NETCDF_LIBRARY)
set (NETCDF_C_LIBRARIES ${NETCDF_LIBRARY})

# find the header
# package config failed, use cmake
if (NOT NC_TMP_FOUND OR NOT NC_TMP_LINK_LIBRARIES OR NOT NC_TMP_LIBRARY_DIRS OR NOT NC_TMP_INCLUDE_DIRS)
# first look where the user told us
if (NETCDF_DIR)
find_path (NETCDF_${lang}_INCLUDE_DIR netcdf.h
find_path (NETCDF_INCLUDE_DIR netcdf.h
PATHS "${NETCDF_DIR}/include" NO_DEFAULT_PATH)
endif()

# then look relative to library dir
get_filename_component(NETCDF_${lang}_LIBRARY_DIR
${NETCDF_${lang}_LIBRARY} DIRECTORY CACHE)
get_filename_component(NETCDF_LIBRARY_DIR
${NETCDF_LIBRARY} DIRECTORY)

find_path (NETCDF_${lang}_INCLUDE_DIR netcdf.h
PATHS "${NETCDF_${lang}_LIBRARY_DIR}/../include"
find_path (NETCDF_INCLUDE_DIR netcdf.h
PATHS "${NETCDF_LIBRARY_DIR}/../include"
NO_DEFAULT_PATH)

# finally CMake can look
find_path (NETCDF_${lang}_INCLUDE_DIR netcdf.h)

#export to internal varS that rest of project can use directly
mark_as_advanced (NETCDF_${lang}_INCLUDE_DIR NETCDF_${lang}_LIBRARY)

set (NETCDF_${lang}_LIBRARIES ${NETCDF_${lang}_LIBRARY})
set (NETCDF_${lang}_INCLUDE_DIRS ${NETCDF_${lang}_INCLUDE_DIR})

if (NETCDF_${lang}_INCLUDE_DIR AND NETCDF_${lang}_LIBRARY)
list (APPEND NetCDF_libs ${NETCDF_${lang}_LIBRARY})
list (APPEND NetCDF_includes ${NETCDF_${lang}_INCLUDE_DIR})
else ()
set (NETCDF_HAS_INTERFACES "NO")
message (STATUS "Failed to find NetCDF interface for ${lang}")
endif ()
endif ()
endmacro (NetCDF_check_interface)

list (FIND NetCDF_FIND_COMPONENTS "CXX" _nextcomp)
if (_nextcomp GREATER -1)
set (NETCDF_CXX 1)
endif ()
list (FIND NetCDF_FIND_COMPONENTS "F77" _nextcomp)
if (_nextcomp GREATER -1)
set (NETCDF_F77 1)
endif ()
list (FIND NetCDF_FIND_COMPONENTS "F90" _nextcomp)
if (_nextcomp GREATER -1)
set (NETCDF_F90 1)
endif ()
NetCDF_check_interface (CXX netcdfcpp.h netcdf_c++)
NetCDF_check_interface (F77 netcdf.inc netcdff)
NetCDF_check_interface (F90 netcdf.mod netcdff)
# CMake can look
find_path(NETCDF_INCLUDE_DIR netcdf.h)
endif()

# look for header file that indicates MPI support
set(NETCDF_IS_PARALLEL FALSE)
find_file(NETCDF_PAR_INCLUDE_DIR netcdf_par.h
PATHS ${NETCDF_INCLUDE_DIR} NO_DEFAULT_PATH)
if (NETCDF_PAR_INCLUDE_DIR)
set(NETCDF_IS_PARALLEL TRUE)
endif()

# if we can find the headers they are found now
# record what we have
mark_as_advanced(NETCDF_INCLUDE_DIR)
mark_as_advanced(NETCDF_IS_PARALLEL)
mark_as_advanced(NETCDF_PAR_INCLUDE_DIR)
set(NETCDF_C_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR})

#start finding requested language components
set (NetCDF_libs "")
set (NetCDF_includes "${NETCDF_INCLUDE_DIR}")

get_filename_component (NetCDF_lib_dirs "${NETCDF_LIBRARY}" PATH)

#export accumulated results to internal varS that rest of project can depend on
list (APPEND NetCDF_libs "${NETCDF_C_LIBRARIES}")
set (NETCDF_LIBRARIES ${NetCDF_libs})
set (NETCDF_INCLUDE_DIRS ${NetCDF_includes})
list(APPEND NetCDF_libs "${NETCDF_C_LIBRARIES}")
set(NETCDF_LIBRARIES ${NetCDF_libs})
set(NETCDF_INCLUDE_DIRS ${NetCDF_includes})

# handle the QUIETLY and REQUIRED arguments and set NETCDF_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (NetCDF
DEFAULT_MSG NETCDF_LIBRARIES NETCDF_INCLUDE_DIRS NETCDF_HAS_INTERFACES)
DEFAULT_MSG NETCDF_LIBRARIES NETCDF_INCLUDE_DIRS)
Loading

0 comments on commit 2430670

Please sign in to comment.