Skip to content

Commit

Permalink
Merge branch 'release/0.26.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Aug 23, 2021
2 parents 3c74add + 4cd92bd commit 3ae6184
Show file tree
Hide file tree
Showing 76 changed files with 4,900 additions and 113 deletions.
14 changes: 9 additions & 5 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ Thanks for contributions from
- Andreas Mueller
- Baudouin Raoult
- Florian Rathgeber
- Marek Wlasak
- Oliver Lomax
- Daniel Holdaway
- Daan Degrauwe
- Gianmarco Mengaldo
- Philippe Marguinaud
- Gianmarco Mengaldo
- James Hawkes
- Mats Hamrud
- Christian Kuehnlein
- Benjamin Menetrier
- Rahul Mahajan
- Olivier Iffrig
- Christian Kuehnlein
- Iain Russell
- Benjamin Menetrier
- Domokos Sármány
- Yannick Trémolet
- Steven Vahl
- Mark J. Olah
- Michael Lange
- Marek Wlasak
- Peter Bispham
- Slavko Brdar
- Yannick Trémolet
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]

## [0.26.0] - 2021-08-23
### Added
- Support for Cubed sphere grids and preliminary support for cubes sphere mesh generation.

### Fixed
- Compilation with ALTAS_BITS_LOCAL=64
- Too aggressive optimisation with GNU 11
- Compatibility with CMake 3.20 and NVHPC compilers


## [0.25.0] - 2021-05-18
### Added
- New concept Redistribution to redistribute field on same grid but with different partitioner
Expand Down Expand Up @@ -295,6 +305,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.26.0]: https://github.com/ecmwf/atlas/compare/0.26.0...0.25.0
[0.25.0]: https://github.com/ecmwf/atlas/compare/0.24.1...0.25.0
[0.24.1]: https://github.com/ecmwf/atlas/compare/0.24.0...0.24.1
[0.24.0]: https://github.com/ecmwf/atlas/compare/0.23.0...0.24.0
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ set( ATLAS_BITS_LOCAL 32 CACHE STRING "bits used to define a local index (atlas
################################################################################
# Required packages

ecbuild_find_package( NAME eckit VERSION 1.16 REQUIRED )
if( ATLAS_BITS_LOCAL MATCHES 64 )
ecbuild_find_package( NAME eckit VERSION 1.17.1 REQUIRED )
else()
ecbuild_find_package( NAME eckit VERSION 1.16 REQUIRED )
endif()

ecbuild_debug( " eckit_FEATURES : [${eckit_FEATURES}]" )

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.25.0
0.26.0
1 change: 1 addition & 0 deletions bamboo/CLANG-flags.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set( ENABLE_TRANS ON CACHE BOOL "Enable TRANS" )
set( ENABLE_BOUNDSCHECKING ON CACHE BOOL "Enable bounds checking")
set( ENABLE_TESSELATION OFF CACHE BOOL "Disable CGAL" ) # cgal is old in leap42
set( ENABLE_OMP_CXX OFF CACHE BOOL "Disable OpenMP for C++" ) # because of problems with clang OpenMP
6 changes: 3 additions & 3 deletions cmake/features/ACC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set( ATLAS_ACC_CAPABLE FALSE )
if( HAVE_CUDA )
if( CMAKE_Fortran_COMPILER_ID MATCHES "PGI" )
if( CMAKE_Fortran_COMPILER_ID MATCHES "PGI|NVHPC" )
set( ATLAS_ACC_CAPABLE TRUE )
endif()
endif()
Expand All @@ -12,10 +12,10 @@ ecbuild_add_option( FEATURE ACC
CONDITION ATLAS_ACC_CAPABLE )

if( atlas_HAVE_ACC )
if( CMAKE_Fortran_COMPILER_ID MATCHES "PGI" )
if( CMAKE_Fortran_COMPILER_ID MATCHES "PGI|NVHPC" )
set( ACC_Fortran_FLAGS -acc -ta=tesla,nordc )
set( ACC_C_FLAGS ${ACC_Fortran_FLAGS} )
find_program( ACC_C_COMPILER NAMES pgcc HINTS ${PGI_DIR} ENV PGI_DIR PATH_SUFFIXES bin )
find_program( ACC_C_COMPILER NAMES pgcc HINTS ${PGI_DIR} ${NVPHC_DIR} ENV PGI_DIR NVHPC_DIR PATH_SUFFIXES bin )
if( NOT ACC_C_COMPILER )
ecbuild_error( "Could not find OpenACC capable C compiler" )
endif()
Expand Down
7 changes: 4 additions & 3 deletions cmake/features/OMP/test_omp_untied.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

#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)
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 ) )
Expand All @@ -41,11 +42,11 @@ 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 ) );
merge_sort_recursive( first, 0, std::distance( first, last ) );
}

int main() {
auto integers = std::vector<int>(8);
auto integers = std::vector<int>( 8 );
omp_sort( integers.begin(), integers.end() );
return 0;
}
14 changes: 14 additions & 0 deletions doc/example-grids/cubedsphere_equiangular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Test for the cubed-sphere grid that uses the equiangular formulation and projection.
# See following paper and references therein for a desciption of the grid.
# Putman, W. M., and S.-J. Lin 2007 Finite-volume transport on various cubed-sphere grids.
# J. Comput. Phys., 227, 55–78

type : "cubedsphere_equiangular"
N : 12

check :
size : 866
lonlat(first) : [315, -35.2644]
lonlat(last) : [45.0000, -42.6612]
uid : 8aa0b472107ce06c53b5c760886b9fb1
bounding_box(n,w,s,e) : [90,0,-90,360]
16 changes: 16 additions & 0 deletions doc/example-grids/cubedsphere_equidistant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Test for the Cubed-Sphere grid that uses the standard equiangular formulation and projection.
# For decription and references see:
# Lin, S.-J. 2004 A “vertically Lagrangian” finite-volume dynamical core for global models.
# Mon. Wea. Rev., 132, 2293–2307.
# Lin, S.-J., and R. B. Rood 1996 Multidimensional flux-form semi-Lagrangian transport schemes.
# Mon. Wea. Rev., 124, 2046–2070.

type : "cubedsphere_equidistant"
N : 12

check :
size : 866
lonlat(first) : [315, -35.2644]
lonlat(last) : [45.0000,-40.3155]
uid : 682db241b2f45498663d78d795ceb64d
bounding_box(n,w,s,e) : [90,0,-90,360]
6 changes: 5 additions & 1 deletion src/apps/atlas-grids.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct AtlasGrids : public atlas::AtlasTool {
" Browse catalogue of grids\n"
"\n"
" GRID: unique identifier for grid \n"
" Example values: N80, F40, O24, L32\n";
" Example values: N80, F40, O24, L32, CS-ED-12\n";
}

AtlasGrids( int argc, char** argv ) : AtlasTool( argc, argv ) {
Expand Down Expand Up @@ -193,6 +193,10 @@ int AtlasGrids::execute( const Args& args ) {
if ( auto gaussian = GaussianGrid( grid ) ) {
Log::info() << " Gaussian N number: " << gaussian.N() << std::endl;
}
if ( auto cubedsphere = CubedSphereGrid( grid ) ) {
Log::info() << " Cubedsphere faces: " << cubedsphere.N() << "x" << cubedsphere.N()
<< "x6" << std::endl;
}
Log::info() << " number of points: " << grid.size() << std::endl;

Log::info() << " memory footprint of grid: " << eckit::Bytes( grid.footprint() ) << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions src/apps/atlas-meshgen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Meshgen2Gmsh : public AtlasTool {
std::string longDescription() override {
return " The 'GRID' argument can be either the name of a named grid, orthe path to a"
" YAML configuration file that describes the grid.\n"
"Example values for grid names are: N80, F40, O24, L64x33. See the program "
"Example values for grid names are: N80, F40, O24, L64x33, CS-ED-12. See the program "
"'atlas-grids' for a list of named grids.\n"
"\n"
" The optional 'OUTPUT' argument contains the path to the output file. "
Expand Down Expand Up @@ -141,7 +141,7 @@ Meshgen2Gmsh::Meshgen2Gmsh( int argc, char** argv ) : AtlasTool( argc, argv ) {
"case serial" ) );
add_option( new SimpleOption<bool>( "ghost", "Output ghost elements" ) );
add_option( new SimpleOption<std::string>(
"generator", "Mesh generator [structured,regular,delaunay] (default = structured)" ) );
"generator", "Mesh generator [structured,regular,delaunay,cubedsphere] (default = structured)" ) );
add_option( new SimpleOption<std::string>(
"partitioner", "Mesh partitioner [equal_regions,checkerboard,equal_bands,regular_bands" ) );

Expand Down
26 changes: 23 additions & 3 deletions src/atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ option/TransOptions.cc
projection.h
projection/Projection.cc
projection/Projection.h
projection/detail/CubedSphereEquiAnglProjection.cc
projection/detail/CubedSphereEquiAnglProjection.h
projection/detail/CubedSphereEquiDistProjection.cc
projection/detail/CubedSphereEquiDistProjection.h
projection/detail/CubedSphereProjectionBase.cc
projection/detail/CubedSphereProjectionBase.h
projection/detail/LambertAzimuthalEqualAreaProjection.cc
projection/detail/LambertAzimuthalEqualAreaProjection.h
projection/detail/LambertConformalConicProjection.cc
Expand All @@ -84,6 +90,7 @@ projection/detail/ProjectionFactory.cc
projection/detail/ProjectionFactory.h
projection/detail/ProjectionImpl.cc
projection/detail/ProjectionImpl.h
projection/detail/ProjectionUtilities.h
projection/detail/SchmidtProjection.cc
projection/detail/SchmidtProjection.h

Expand All @@ -104,6 +111,8 @@ domain/detail/DomainFactory.h
domain/detail/DomainFactory.cc

grid.h
grid/CubedSphereGrid.cc
grid/CubedSphereGrid.h
grid/Grid.cc
grid/Grid.h
grid/SpecRegistry.cc
Expand All @@ -128,7 +137,11 @@ grid/StencilComputer.h
grid/StencilComputer.cc
grid/StructuredPartitionPolygon.h
grid/StructuredPartitionPolygon.cc
grid/Tiles.h
grid/Tiles.cc

grid/detail/grid/CubedSphere.cc
grid/detail/grid/CubedSphere.h
grid/detail/grid/GridBuilder.h
grid/detail/grid/GridBuilder.cc
grid/detail/grid/GridFactory.h
Expand Down Expand Up @@ -160,11 +173,18 @@ grid/detail/distribution/BandsDistribution.h
grid/detail/distribution/SerialDistribution.cc
grid/detail/distribution/SerialDistribution.h

grid/detail/tiles/Tiles.cc
grid/detail/tiles/Tiles.h
grid/detail/tiles/TilesFactory.h
grid/detail/tiles/TilesFactory.cc
grid/detail/tiles/FV3Tiles.cc
grid/detail/tiles/FV3Tiles.h
grid/detail/tiles/LFRicTiles.cc
grid/detail/tiles/LFRicTiles.h

grid/detail/vertical/VerticalInterface.h
grid/detail/vertical/VerticalInterface.cc


grid/detail/partitioner/BandsPartitioner.cc
grid/detail/partitioner/BandsPartitioner.h
grid/detail/partitioner/CheckerboardPartitioner.cc
Expand Down Expand Up @@ -192,8 +212,6 @@ grid/detail/partitioner/RegularBandsPartitioner.h
grid/detail/partitioner/SerialPartitioner.cc
grid/detail/partitioner/SerialPartitioner.h



grid/detail/spacing/Spacing.cc
grid/detail/spacing/Spacing.h
grid/detail/spacing/SpacingFactory.cc
Expand Down Expand Up @@ -343,6 +361,8 @@ mesh/actions/ReorderReverseCuthillMckee.cc
meshgenerator.h
meshgenerator/MeshGenerator.cc
meshgenerator/MeshGenerator.h
meshgenerator/detail/CubedSphereMeshGenerator.h
meshgenerator/detail/CubedSphereMeshGenerator.cc
meshgenerator/detail/DelaunayMeshGenerator.h
meshgenerator/detail/DelaunayMeshGenerator.cc
meshgenerator/detail/StructuredMeshGenerator.h
Expand Down
2 changes: 2 additions & 0 deletions src/atlas/array/ArrayShape.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class ArrayShape : public std::vector<idx_t> {
ArrayShape( idx_t data[], size_t size ) : Base( data, data + size ) {}
template <typename idx_t, std::size_t N>
ArrayShape( const std::array<idx_t, N>& list ) : Base( list.begin(), list.end() ) {}
template <typename idx_t>
ArrayShape( const std::vector<idx_t>& list ) : Base( list.begin(), list.end() ) {}
};

namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion src/atlas/array/DataType.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class DataType {
template <typename DATATYPE>
static std::string str( const DATATYPE );

static long str_to_kind( const std::string& );
static kind_t str_to_kind( const std::string& );
static std::string kind_to_str( kind_t );
static bool kind_valid( kind_t );

Expand Down
Loading

0 comments on commit 3ae6184

Please sign in to comment.