Skip to content

Commit

Permalink
Merge branch 'release/0.17.0'
Browse files Browse the repository at this point in the history
* release/0.17.0: (29 commits)
  Update changelog
  Version 0.17.0
  apply clang-format
  Fix CGAL includes
  Compatibility with transi version 0.4.4
  Nabla holds reference counted FunctionSpace
  Access to vertical coordinates in Fortran
  Fix failing test atlas_fctest_trans
  Make OpenMP a private dependency, client software has to link with OpenMP directly
  Fix memory leak
  Make pkgconfig generation configurable
  Use target_link_libraries() with PUBLIC/PRIVATE keyword
  ECKIT-381 Remove eckit ScopedPtr includes
  ECKIT-381: fix compilation
  Revert ECKIT-382 [8554eb9] as atlas doesn't use eckit's Tokenizer any longer
  ATLAS-226 Install Fortran modules in <prefix>/module/atlas
  ATLAS-225 Spectral functionspace in a distributed environment
  Fix memory leaks with reusing StructuredColumns caches
  Fix valgrind warning in EqualRegionsPartitioner.cc
  Unit tests recognise ATLAS_LOG_FILE enironment variable
  ...
  • Loading branch information
wdeconinck committed Apr 2, 2019
2 parents 306039c + 4c78e73 commit a30b99d
Show file tree
Hide file tree
Showing 84 changed files with 2,550 additions and 628 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,23 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]

## [0.16.0] - 2018-02-14
## [0.17.0] - 2019-04-02
### Changed
- OpenMP is now private dependency
- Dependencies are now added in a modern CMake3 way
- Fortran modules are installed in <install-prefix>/module/atlas

### Added
- Spectral functionspace better used in distributed context
- Nabla now holds shared_ptr to Method
- Fortran access to vertical coordinates from StructuredColumns

### Fixed
- Compilation with PGI/19.1 (regression)
- Add missing halo_exchange for Fortran rank-4 arrays
- Memory leaks with StructuredColumns

## [0.16.0] - 2019-02-14
### Changed
- Interpolation makes use of OpenMP
- Cleanup of header includes
Expand Down Expand Up @@ -80,6 +96,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
## 0.13.0 - 2018-02-16

[Unreleased]: https://github.com/ecmwf/atlas/compare/master...develop
[0.17.0]: https://github.com/ecmwf/atlas/compare/0.16.0...0.17.0
[0.16.0]: https://github.com/ecmwf/atlas/compare/0.15.2...0.16.0
[0.15.2]: https://github.com/ecmwf/atlas/compare/0.15.1...0.15.2
[0.15.1]: https://github.com/ecmwf/atlas/compare/0.15.0...0.15.1
Expand Down
162 changes: 109 additions & 53 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ ecbuild_find_python()

ecbuild_add_option( FEATURE FORTRAN
DESCRIPTION "Provide Fortran bindings"
REQUIRED_PACKAGES "PROJECT fckit VERSION 0.6" )
REQUIRED_PACKAGES "PROJECT fckit VERSION 0.6.2" )

if( ATLAS_HAVE_FORTRAN )

if( FCKIT_HAVE_ECKIT )

ecbuild_enable_fortran( REQUIRED MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module )
ecbuild_enable_fortran( REQUIRED MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/module )
set( Fortran Fortran )

if( ENABLE_TESTS )
Expand Down Expand Up @@ -86,17 +86,29 @@ if( NOT ECKIT_HAVE_MPI )
ecbuild_warn("ecKit has been compiled without MPI. This causes Atlas to not be able to run parallel jobs.")
endif()


### OMP ...

ecbuild_add_option( FEATURE OMP
DESCRIPTION "Support for OpenMP threaded parallelism"
REQUIRED_PACKAGES "OMP COMPONENTS CXX ${Fortran}" )

if( HAVE_OMP )
ecbuild_enable_omp()
if( "${CMAKE_VERSION}" VERSION_LESS "3.11" )
if( ENABLE_OMP )
ecbuild_warn( "OpenMP only supported with CMake 3.11 onwards" )
endif()
else()
ecbuild_enable_ompstubs()
find_package( OpenMP COMPONENTS CXX ${Fortran} )
endif()
ecbuild_add_option( FEATURE OMP
DESCRIPTION "support for OpenMP shared memory parallelism"
CONDITION OpenMP_Fortran_FOUND OR OpenMP_CXX_FOUND )
ecbuild_add_option( FEATURE OMP_Fortran
DESCRIPTION "support for Fortran OpenMP shared memory parallelism"
CONDITION HAVE_OMP AND OpenMP_Fortran_FOUND )

ecbuild_add_option( FEATURE OMP_CXX
DESCRIPTION "support for CXX OpenMP shared memory parallelism"
CONDITION HAVE_OMP AND OpenMP_CXX_FOUND )
if( TARGET OpenMP::OpenMP_CXX )
set( OMP_CXX OpenMP::OpenMP_CXX )
endif()
if( TARGET OpenMP::OpenMP_Fortran )
set( OMP_Fortran OpenMP::OpenMP_Fortran )
endif()

### FFTW ...
Expand All @@ -109,7 +121,7 @@ ecbuild_add_option( FEATURE FFTW

ecbuild_add_option( FEATURE TRANS
DESCRIPTION "Support for spectral transforms"
REQUIRED_PACKAGES "PROJECT transi VERSION 0.4.1 QUIET" )
REQUIRED_PACKAGES "PROJECT transi VERSION 0.4.4 QUIET" )

### tesselation ...

Expand Down Expand Up @@ -226,59 +238,47 @@ ecbuild_add_option( FEATURE SANDBOX
DEFAULT OFF
DESCRIPTION "Build the sandbox stuff" )

################################################################################
# export package info

set( ATLAS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src )

list( APPEND ATLAS_LIBRARIES atlas )

if( ATLAS_HAVE_FORTRAN )
list( APPEND ATLAS_INCLUDE_DIRS ${CMAKE_Fortran_MODULE_DIRECTORY} )
set( ATLAS_LIBRARIES atlas_f ${ATLAS_LIBRARIES} )
endif()

get_directory_property( ATLAS_DEFINITIONS COMPILE_DEFINITIONS )

foreach( _tpl ${ATLAS_TPLS} )
string( TOUPPER ${_tpl} TPL )
list( APPEND ATLAS_EXTRA_DEFINITIONS ${${TPL}_DEFINITIONS} ${${TPL}_TPL_DEFINITIONS} )
list( APPEND ATLAS_EXTRA_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS} ${${TPL}_TPL_INCLUDE_DIRS} )
list( APPEND ATLAS_EXTRA_LIBRARIES ${${TPL}_LIBRARIES} ${${TPL}_TPL_LIBRARIES} )
endforeach()

ecbuild_debug_var( ATLAS_EXTRA_INCLUDE_DIRS )
ecbuild_debug_var( ATLAS_EXTRA_LIBRARIES )


################################################################################
# sources

include_directories( ${ATLAS_INCLUDE_DIRS} ${ATLAS_EXTRA_INCLUDE_DIRS} )
set( MIR_NEEDS_TRANSI TRUE CACHE BOOL "Deprecated" INTERNAL )

include(CompileFlags)
add_subdirectory( src )

################################################################################
# export package info

if( TARGET atlas_f )
list( APPEND ATLAS_LIBRARIES atlas_f )
endif()
list( APPEND ATLAS_LIBRARIES atlas )

################################################################################
# pkg-config

ecbuild_add_option( FEATURE PKGCONFIG DESCRIPTION "Atlas pkgconfig" )
set( ATLAS_URL "https://software.ecmwf.int/wiki/display/ATLAS" )
set( ATLAS_DESCRIPTION "Atlas framework for parallel mesh datastructures" )

ecbuild_pkgconfig()

ecbuild_pkgconfig(
NAME atlas-c++
LANGUAGES CXX
LIBRARIES atlas
)

if( ATLAS_HAVE_FORTRAN )
ecbuild_pkgconfig(
NAME atlas-fortran
LANGUAGES Fortran
LIBRARIES atlas_f
NO_PRIVATE_INCLUDE_DIRS
)
if( ATLAS_HAVE_PKGCONFIG )
ecbuild_pkgconfig()

ecbuild_pkgconfig(
NAME atlas-c++
LANGUAGES CXX
LIBRARIES atlas
)

if( ATLAS_HAVE_FORTRAN )
ecbuild_pkgconfig(
NAME atlas-fortran
LANGUAGES Fortran
LIBRARIES atlas_f
NO_PRIVATE_INCLUDE_DIRS
)
endif()
endif()

################################################################################
Expand All @@ -304,7 +304,63 @@ ecbuild_add_resources(
)

if( ATLAS_HAVE_FORTRAN AND ECBUILD_INSTALL_FORTRAN_MODULES )
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR} DESTINATION ${INSTALL_INCLUDE_DIR} )
install( DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}
DESTINATION module/atlas
COMPONENT modules )
endif()

macro( filter_tpl _tpl )
string( TOUPPER ${_tpl} _TPL )
unset( ${_tpl}_INCLUDE_DIRS )
unset( ${_TPL}_INCLUDE_DIRS )
unset( ${_tpl}_INCLUDE_DIR )
unset( ${_TPL}_INCLUDE_DIR )
unset( ${_tpl}_LIBRARIES )
unset( ${_TPL}_LIBRARIES )
unset( ${_tpl}_LIBRARY )
unset( ${_TPL}_LIBRARY )
if( ${_tpl}_INCLUDE_DIRS )
unset( ${_tpl}_INCLUDE_DIRS CACHE )
endif()
if( ${_TPL}_INCLUDE_DIRS )
unset( ${_TPL}_INCLUDE_DIRS CACHE )
endif()
if( ${_tpl}_INCLUDE_DIR )
unset( ${_tpl}_INCLUDE_DIR CACHE )
endif()
if( ${_TPL}_INCLUDE_DIR )
unset( ${_TPL}_INCLUDE_DIR CACHE )
endif()
if( ${_tpl}_LIBRARIES )
unset( ${_tpl}_LIBRARIES CACHE )
endif()
if( ${_TPL}_LIBRARIES )
unset( ${_TPL}_LIBRARIES CACHE )
endif()
if( ${_tpl}_LIBRARY )
unset( ${_tpl}_LIBRARY CACHE )
endif()
if( ${_TPL}_LIBRARY )
unset( ${_TPL}_LIBRARY CACHE )
endif()
endmacro()
filter_tpl( fckit )
filter_tpl( CGAL )
filter_tpl( FFTW )
filter_tpl( Eigen3 )
if( (NOT MIR_NEEDS_TRANSI) OR NOT( TRANSI_VERSION VERSION_LESS 0.6 ) )
filter_tpl( transi )
endif()
get_target_property( eckit_intf_incl_dirs eckit INTERFACE_INCLUDE_DIRECTORIES )
set( eckit_can_be_filtered FALSE )
foreach( eckit_intf_incl_dir ${eckit_intf_incl_dirs} )
string(FIND ${eckit_intf_incl_dir} "eckit" _found )
if( NOT( _found EQUAL "-1" ) )
set( eckit_can_be_filtered TRUE )
endif()
endforeach()
if( eckit_can_be_filtered )
filter_tpl(eckit)
endif()

ecbuild_install_project( NAME Atlas )
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Optional dependencies:
- gridtools-storage --- For GPU interoperability
- transi --- For enabling IFS spherical harmonics transforms ( not open-source )
- CGAL --- For enabling Delaunay triangulation of unstructured grids
- Eigen3 -- For certain linear algebra operations
- FFTW -- For enabling inverse spherical harmonics transforms (TransLocal)

Installation
------------
Expand Down Expand Up @@ -83,6 +85,8 @@ TRANSI_PATH # Path to transi prefix
# For finding CGAL
BOOST_ROOT # Path to Boost prefix
CGAL_DIR # Path to directory containing CGALConfig.cmake
Eigen3_DIR # Path to directory containing Eigen3Config.cmake
FFTW_PATH # Path to FFTW prefix
```

Now proceed with installation as follows
Expand Down
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

set ( ${PROJECT_NAME}_VERSION_STR "0.16.0" )
set ( ${PROJECT_NAME}_VERSION_STR "0.17.0" )

2 changes: 2 additions & 0 deletions bamboo/MACOSX-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export PATH=$HOME/Applications/CMake.app/Contents/bin:$PATH

4 changes: 2 additions & 2 deletions doc/user-guide/core-functionalities/fields/fields-on-grid.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "atlas/array.h"
#include "atlas/field/Field.h"
#include "atlas/grid/Grid.h"
#include "atlas/grid.h"
#include "atlas/library/Library.h"
#include "atlas/runtime/Log.h"

Expand All @@ -9,7 +9,7 @@ using atlas::Log;
using atlas::array::make_datatype;
using atlas::array::make_shape;
using atlas::array::make_view;
using atlas::grid::StructuredGrid;
using atlas::StructuredGrid;

int main( int argc, char* argv[] ) {
atlas::Library::instance().initialise( argc, argv );
Expand Down
12 changes: 6 additions & 6 deletions doc/user-guide/core-functionalities/functionspace/NodeColumns.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "atlas/functionspace/NodeColumns.h"
#include "atlas/array/ArrayView.h"
#include "atlas/field/Field.h"
#include "atlas/grid/Grid.h"
#include "atlas/field.h"
#include "atlas/grid.h"
#include "atlas/library/Library.h"
#include "atlas/mesh/Mesh.h"
#include "atlas/mesh/Nodes.h"
#include "atlas/mesh.h"
#include "atlas/meshgenerator.h"
#include "atlas/output/Gmsh.h"
#include "atlas/runtime/Log.h"
Expand All @@ -15,7 +14,8 @@ using atlas::array::make_shape;
using atlas::array::make_view;
using atlas::functionspace::NodeColumns;
using atlas::gidx_t;
using atlas::grid::StructuredGrid;
using atlas::idx_t;
using atlas::StructuredGrid;
using atlas::output::Gmsh;

int main( int argc, char* argv[] ) {
Expand Down Expand Up @@ -109,7 +109,7 @@ int main( int argc, char* argv[] ) {
/* .... */

// Operations
size_t N;
idx_t N;
gidx_t gidx_min, gidx_max;
double min, max, sum, mean, stddev;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "atlas/grid/Grid.h"
#include "atlas/grid.h"
#include "atlas/library/Library.h"
#include "atlas/runtime/Log.h"

using atlas::Log;
using atlas::grid::StructuredGrid;
using atlas::StructuredGrid;

int main( int argc, char* argv[] ) {
atlas::Library::instance().initialise( argc, argv );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "atlas/grid.h"
#include "atlas/mesh.h"
#include "atlas/library/Library.h"
#include "atlas/meshgenerator.h"
#include "atlas/output/Gmsh.h"
#include "atlas/runtime/Log.h"
#include "atlas/util/Point.h"

using namespace atlas;
using atlas::grid::UnstructuredGrid;
using atlas::UnstructuredGrid;
using atlas::output::Gmsh;
using atlas::util::Config;

Expand Down
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

if( CGAL_FOUND )
set( CGAL_FOUND 1 )
if( ATLAS_HAVE_OMP_CXX )
set( ATLAS_HAVE_OMP_CXX 1 )
else()
set( CGAL_FOUND 0 )
set( ATLAS_HAVE_OMP_CXX 0 )
endif()

if( ATLAS_HAVE_OMP )
set( ATLAS_HAVE_OMP 1 )
if( ATLAS_HAVE_OMP_Fortran )
set( ATLAS_HAVE_OMP_Fortran 1 )
else()
set( ATLAS_HAVE_OMP 0 )
set( ATLAS_HAVE_OMP_Fortran 0 )
endif()

if( ATLAS_HAVE_TESSELATION )
Expand Down
Loading

0 comments on commit a30b99d

Please sign in to comment.