Skip to content

Commit

Permalink
Merge branch 'release/0.21.0'
Browse files Browse the repository at this point in the history
* release/0.21.0: (145 commits)
  Version 0.21.0
  ATLAS-300 Fix plugin install
  ATLAS-301 Support for ORCA grid patches at pole using quads
  ATLAS-300 Atlas plugin support
  Grid::footprint() API (unimplemented)
  Compatibility with eckit < 1.12
  Fix minor memory issue in test
  Increase timeout for atlas_test_fvm_nabla_validation
  travis: 300s timeout for tests
  Assertions
  Increase timeout for test
  Improve performance for debug builds with new ATLAS_ALWAYS_INLINE macro
  travis: Remove addons for osx
  travis: ATLAS_TRACE=1
  Fix clang-tidy warnings
  Use Serial partitioner in StructuredMeshGenerator if possible.
  travis: 60s timeout for tests
  Fix warnings
  Remove unused subroutine atlas_write_to_fortran_unit
  ATLAS-299 (Github #42) Factor 2 speedup in BandsDistribution by using int32_t for its arithmetics if we are sure no overflow will occur. This helps L40000x20000 with 'regular_bands' partitioner
  ...
  • Loading branch information
wdeconinck committed Jun 23, 2020
2 parents 9fe11e8 + 5f98d11 commit b7728bb
Show file tree
Hide file tree
Showing 308 changed files with 14,515 additions and 1,816 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ CMakeLists.txt.user*
doc/html
doc/latex
*.sublime-workspace
*.swp
.nfs*
build/*
install/*
env.sh
*.DS_Store
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,8 @@ matrix:
- CXX_COMPILER='clang++' C_COMPILER='clang' Fortran_COMPILER='gfortran'
- MPI=openmpi
- ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG"
- ATLAS_CTEST_OPTIONS="-E atlas_test_stencil_parallel_mpi16"
osx_image: xcode10.1
addons:
homebrew:
packages:
- openmpi
- cgal
- fftw

- os: osx
env:
Expand Down Expand Up @@ -232,7 +227,7 @@ script:
#################################################################
# Test Atlas
#################################################################
- ctest
- ATLAS_TRACE=1 ATLAS_DEBUG=1 ctest --output-on-failure --timeout 300 ${ATLAS_CTEST_OPTIONS}

after_success:

Expand All @@ -250,5 +245,5 @@ after_success:
after_failure:

- cd ${ATLAS_BUILD_DIR}
- ctest -VV --rerun-failed
- ATLAS_TRACE=1 ctest -VV --rerun-failed --timeout 60 ${ATLAS_CTEST_OPTIONS}
- cat ecbuild.log
41 changes: 38 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,45 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]

## [0.20.2] - 2019-04-27
## [0.21.0] - 2020-06-23
### Fixed
- Fixed Rotation order of applying the rotation angle
- Fix nabla computation of surface vector fields
- Fix registration and destruction issues of halo-exchange caches
- Workaround Clang compiler problem with OpenMP tasking, using introspection
- Fix bug in conversion of negative degrees to microdegrees
- Fix problem in distribution of work amongst OpenMP threads in StructuredColumns::setup
- Fix problem with StructuredColumns creation for grids defined with domains with negative West
- Fix computation of Grid::lonlatBoundingBox for arbitrary projections crossing the dateline.

### Changed
- Snap LinearSpacing values to start and endpoint to allow exact comparisons
- Improved performance and memory requirement of cropping of large StructuredGrids
- Regional grids by default now have a positive y-numbering (previously negative).

### Added
- PolygonLocator based on functionspace partition polygons.
- KDTree class which abstracts eckit concrete implementations, including Fortran interface
- Geometry class with factory mechanism to configure which spheroid to use, including Fortran interface
- StrcutredGrid function for i,j to index and inverse
- Fortran interface to create StructuredColumns with custom distribution
- Fortran interface to grid spec
- Fortran interface to Projection
- Adjoint of HaloExchange
- Plugin mechanism to load plugins at runtime.
- Fortran constructors for atlas_RegionalGrid
- Fortran constructors for projected reduced Gaussian grids
- Add copy constructor and assignment operator for atlas::vector
- Mercator projection support for scaling, and operation on ellipsoid.
- Grid Distribution can now also be created as a function, e.g. for Serial or Bands



## [0.20.2] - 2020-04-27
### Fixed
- Avoid 100ds of compilation warnings introduced in version 0.20.0

## [0.20.1] - 2019-04-08
## [0.20.1] - 2020-04-08
### Fixed
- Make feature BOUNDSCHECKING work again. It was not turned on for DEBUG builds
- Workaround clang OpenMP bug
Expand All @@ -20,7 +54,7 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
### Added
- atlas-grids tool can now be used to compute approximate North-South grid resolution

## [0.20.0] - 2019-03-06
## [0.20.0] - 2020-03-06
### Fixed
- Pole edges hould not be created for global regular grids with points at poles
- Update compatibility with more recent GridTools
Expand Down Expand Up @@ -189,6 +223,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.21.0]: https://github.com/ecmwf/atlas/compare/0.20.2...0.21.0
[0.20.2]: https://github.com/ecmwf/atlas/compare/0.20.1...0.20.2
[0.20.1]: https://github.com/ecmwf/atlas/compare/0.20.0...0.20.1
[0.20.0]: https://github.com/ecmwf/atlas/compare/0.20.0...0.19.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20.2
0.21.0
28 changes: 28 additions & 0 deletions atlas-import.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,31 @@ elseif( atlas_FIND_REQUIRED_FORTRAN )
endif()

set( @PROJECT_NAME@_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE STRING "" )


function( atlas_create_plugin name )

set( options )
set( single_value_args VERSION )
set( multi_value_args LIBRARY )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} )

set( _plugin_file share/atlas/plugins/${name}.yml )

if( NOT DEFINED _PAR_VERSION )
set( _version ${${PROJECT_NAME}_VERSION} )
else()
set( _version ${_PAR_VERSION} )
endif()
if( NOT DEFINED _PAR_LIBRARY )
set( _library "${name}" )
else()
set( _library "${_PAR_LIBRARY}" )
endif()
file( WRITE ${CMAKE_BINARY_DIR}/${_plugin_file} "name: ${name}\n" )
file( APPEND ${CMAKE_BINARY_DIR}/${_plugin_file} "version: ${_version}\n" )
file( APPEND ${CMAKE_BINARY_DIR}/${_plugin_file} "library: ${_library}" )
install( FILES ${CMAKE_BINARY_DIR}/${_plugin_file} DESTINATION share/atlas/plugins )

endfunction()

32 changes: 0 additions & 32 deletions cmake/FindLatex.cmake

This file was deleted.

6 changes: 3 additions & 3 deletions cmake/features/DOCS.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
################################################################################
# documentation
if( ENABLE_DOCS )
find_package(Latex)
if( ENABLE_DOCS )
find_package(LATEX COMPONENTS PDFLATEX BIBTEX OPTIONAL_COMPONENTS MAKEINDEX HTLATEX)
endif()
ecbuild_add_option( FEATURE DOCS
DESCRIPTION "Atlas documentation"
DEFAULT OFF
CONDITION Latex_FOUND )
CONDITION LATEX_FOUND )
35 changes: 35 additions & 0 deletions cmake/features/OMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,38 @@ endif()
if( TARGET OpenMP::OpenMP_Fortran )
set( OMP_Fortran OpenMP::OpenMP_Fortran )
endif()

if( HAVE_OMP_CXX )

if( NOT CMAKE_CXX_COMPILER_ID MATCHES Clang )
set( ATLAS_OMP_TASK_UNTIED_SUPPORTED 1 )
endif()

if( NOT DEFINED ATLAS_OMP_TASK_UNTIED_SUPPORTED )
try_run( execute_result compile_result
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/cmake/features/OMP/test_omp_untied.cc
LINK_LIBRARIES ${OMP_CXX}
COMPILE_OUTPUT_VARIABLE compile_output
RUN_OUTPUT_VARIABLE execute_output )

ecbuild_debug("Compiling and running ${PROJECT_SOURCE_DIR}/cmake/features/OMP/test_omp_untied.cc")
ecbuild_debug_var( compile_result )
ecbuild_debug_var( compile_output )
ecbuild_debug_var( execute_result )
ecbuild_debug_var( execute_output )

if( compile_result )
if( execute_result MATCHES 0 )
set( ATLAS_OMP_TASK_UNTIED_SUPPORTED 1 )
else()
ecbuild_info(" Compiler failed to run program with omp pragma with 'untied if' construct."
"Workaround will be enabled.")
set( ATLAS_OMP_TASK_UNTIED_SUPPORTED 0 )
endif()
else()
set( ATLAS_OMP_TASK_UNTIED_SUPPORTED 0 )
endif()
endif()

endif()
51 changes: 51 additions & 0 deletions cmake/features/OMP/test_omp_untied.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* (C) Copyright 2013 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergovernmental organisation
* nor does it submit to any jurisdiction.
*/


// This test mirrors functionality from src/atlas/parallel/omp/sort.h
// It appears that on some installations / compilers the "untied if" in the
// openmp pragma compiles but leads to runtime errors. This executable is
// added to allow compiler introspection for this feature.

#include <algorithm>
#include <vector>
#include <omp.h>

template <typename RandomAccessIterator>
void merge_sort_recursive( const RandomAccessIterator& iterator, size_t begin, size_t end ) {
auto size = end - begin;
if ( size >= 2 ) { // should be much larger in real case (e.g. 256)
auto mid = begin + size / 2;
{
#pragma omp task shared( iterator ) untied if ( size >= ( 1 << 15 ) )
merge_sort_recursive( iterator, begin, mid );
#pragma omp task shared( iterator ) untied if ( size >= ( 1 << 15 ) )
merge_sort_recursive( iterator, mid, end );
#pragma omp taskwait
}
std::inplace_merge( iterator + begin, iterator + mid, iterator + end );
}
else {
std::sort( iterator + begin, iterator + end );
}
}

template <typename RandomAccessIterator>
void omp_sort( RandomAccessIterator first, RandomAccessIterator last ) {
#pragma omp parallel
#pragma omp single
merge_sort_recursive( first, 0, std::distance( first, last ) );
}

int main() {
auto integers = std::vector<int>(8);
omp_sort( integers.begin(), integers.end() );
return 0;
}
32 changes: 17 additions & 15 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ add_custom_target(atlas_doc_pdf)
add_dependencies (atlas_doc_pdf
atlas-user-guide-pdf )

add_custom_target(atlas_doc_html)
add_dependencies (atlas_doc_html
atlas-user-guide-html )
if( LATEX_HTLATEX_FOUND )
add_custom_target(atlas_doc_html)
add_dependencies (atlas_doc_html
atlas-user-guide-html )
endif()

add_custom_target(atlas_doc)
add_dependencies (atlas_doc
Expand All @@ -63,27 +65,27 @@ if( NOT DEFINED ATLAS_DOC_VERSION )
endif()

if( NOT DEFINED ATLAS_DOXYGEN_GENERATOR )
set( ATLAS_DOXYGEN_GENERATOR "m.css")
set( ATLAS_DOXYGEN_GENERATOR "stock")
endif()

if( ATLAS_DOXYGEN_GENERATOR STREQUAL "m.css" )
if( NOT DEFINED ATLAS_DOXYGEN_EXECUTABLE )
set( ATLAS_DOXYGEN_EXECUTABLE doxygen.py )
endif()
set( ATLAS_DOXYFILE Doxyfile-mcss )
set( ATLAS_DOXYGEN_EXECUTABLE doxygen.py )
else()
if( NOT DEFINED ATLAS_DOXYGEN_EXECUTABLE )
if( DOXYGEN_EXECUTABLE )
set( ATLAS_DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE} )
else()
set( ATLAS_DOXYGEN_EXECUTABLE doxygen )
endif()
endif()
set( ATLAS_DOXYFILE Doxyfile-stock )
endif()

if( NOT DEFINED ATLAS_DOXYGEN_EXECUTABLE )
find_package(Doxygen COMPONENTS dot)
if( DOXYGEN_FOUND )
set( ATLAS_DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE} )
else()
set( ATLAS_DOXYGEN_EXECUTABLE doxygen )
endif()
endif()

foreach( doxyfile Doxyfile-default Doxyfile-custom Doxyfile-mcss Doxyfile-stock )
execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink
execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/${doxyfile}
${CMAKE_CURRENT_BINARY_DIR}/${doxyfile} )
endforeach()
Expand Down
8 changes: 6 additions & 2 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ check :
size : 2000
lonlat(first) : [-10.4643,40.1877]
lonlat(last) : [24.6228,57.1968]
uid : 16663e1f4f3deb724712dd2698008915
bounding_box(n,w,s,e) : [58.7776,-16.6238,40.1867,24.6238]
uid : 0ee521e7f37c21d50b2f66655f178b65
bounding_box(n,w,s,e) : [58.7766,-16.6228,40.1877,24.6228]
xmin : -1225000.00
ymin : -975000.00
proj : "+proj=laea +lat_0=50 +lon_0=4 +R=6371229.0"

6 changes: 4 additions & 2 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ check :
size : 950000
lonlat(first) : [-35.034,66.9821]
lonlat(last) : [41.2436,23.8962]
bounding_box(n,w,s,e) : [72.647, -35.035, 23.895, 74.144]
uid : 2ef4f1bb005cf8e24ecc9464f8b7e089
bounding_box(n,w,s,e) : [72.6459, -35.034, 23.8962, 74.1431]
uid : 92fd7b766b66cce3829ce1b0af3bac15
xmin : 2510375.79
ymin : 748404.45
proj : "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +R=6371229.0"

4 changes: 2 additions & 2 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ check :
size : 950000
lonlat(first) : [-35.034,66.9821]
lonlat(last) : [41.2436,23.8962]
bounding_box(n,w,s,e) : [72.647, -35.035, 23.895, 74.144]
uid : cc74ce2b099e3ae15f2f9f9caf52ddda
bounding_box(n,w,s,e) : [72.6459, -35.034, 23.8962, 74.1431]
uid : 7e489e060265f549856481f44d001c69
xmin : 2510375.79
ymin : 748404.45
4 changes: 2 additions & 2 deletions doc/example-grids/regional_lambert_azimuthal_equal_area_4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ check :
size : 950000
lonlat(first) : [-35.034,66.9821]
lonlat(last) : [41.1397,23.9423]
bounding_box(n,w,s,e) : [72.6426, -35.035, 23.9413, 73.9386]
uid : bd42a9d7bbf089251667a4cc553a664c
bounding_box(n,w,s,e) : [72.6416, -35.034, 23.9423, 73.9376]
uid : dba9a7e48d9a5274ece3aea98335b6f0
xmin : 2502497.60
ymin : 752495.56
6 changes: 3 additions & 3 deletions doc/example-grids/regional_lambert_conformal_conic_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ lonlat(centre) : [4,50]
projection :
type : "lambert_conformal_conic"
longitude0 : 4
latitude1 : 50
latitude0 : 50

y_numbering : +1

check :
size : 2000
lonlat(first) : [-10.3173,40.22]
lonlat(last) : [24.4368,57.2335]
uid : 2e01d66aa6df870b0ad346da4e80c4ff
bounding_box(n,w,s,e) : [58.7333,-16.4378,40.219,24.4378]
uid : 0914f1a75b5c5226e2b09ceed834a822
bounding_box(n,w,s,e) : [58.7320,-16.4368,40.2200,24.4368]
xmin : -1225000.00
ymin : -975000.00
Loading

0 comments on commit b7728bb

Please sign in to comment.