Skip to content

Commit

Permalink
Merge branch 'release/0.35.0'
Browse files Browse the repository at this point in the history
* release/0.35.0: (73 commits)
  Update Changelog
  Add single precision support to fvm::Nabla
  Version 0.35.0
  Add Mesh::nb_partitions with deprecation warning
  Implement PointCloud::gather/scatter
  Fix NodeColumns::gather/scatter with mpi_comm for broadcast of metadata
  Fixup 4f9b29c , fixing bug in PointCloud constructor regarding global index computation with nb_parts==1
  Add test for mpi_comm with functionspace::BlockStructuredColumns
  Add mpi_comm to HealpixMeshgenerator
  Add mpi_comm to RegularMeshgenerator
  Use mpi_comm in functionspace::PointCloud
  Add Configuration to PointCloud
  Use mpi_comm in DelaunayMeshGenerator
  Make Partitioner(std::string) explicit
  Use mpi_comm in Redistribute
  Use mpi_comm in CubedSphere(Dual)MeshGenerator
  Add test of mpi_comm with partitioners
  Use mpi_comm in EqualRegionsPartitioner
  Test mpi_comm with Mesh(grid,partitioner)
  Mesh(grid,partitioner) constructor inspects partitioner for mpi_comm
  ...
  • Loading branch information
wdeconinck committed Oct 2, 2023
2 parents ea451cb + 5c04a18 commit 9b6fb72
Show file tree
Hide file tree
Showing 158 changed files with 5,003 additions and 1,607 deletions.
1 change: 1 addition & 0 deletions .github/ci-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies: |
ecmwf/ecbuild
ecmwf/eckit
ecmwf/fckit
dependency_branch: develop
parallelism_factor: 8
2 changes: 2 additions & 0 deletions .github/ci-hpc-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mpi_on:
dependencies:
- ecmwf/ecbuild@develop
- ecmwf/eckit@develop
- ecmwf/fckit@develop
parallel: 64
ntasks: 16

Expand All @@ -24,4 +25,5 @@ mpi_off:
dependencies:
- ecmwf/ecbuild@develop
- ecmwf/eckit@develop
- ecmwf/fckit@develop
parallel: 64
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ jobs:
${ATLAS_TOOLS}/install-fftw.sh --version 3.3.10 --prefix ${DEPS_DIR}/fftw
echo "FFTW_ROOT=${DEPS_DIR}/fftw" >> $GITHUB_ENV
- name: Install Qhull
shell: bash -eux {0}
run: |
${ATLAS_TOOLS}/install-qhull.sh --version 8.1-alpha3 --prefix ${DEPS_DIR}/qhull
echo "Qhull_ROOT=${DEPS_DIR}/qhull" >> $GITHUB_ENV
- name: Install LZ4
if: "!contains( matrix.compiler, 'nvhpc' )"
run: |
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: cd

on:
push:
tags:
- '**'

jobs:
deploy:
uses: ecmwf-actions/reusable-workflows/.github/workflows/create-package.yml@v2
secrets: inherit
28 changes: 0 additions & 28 deletions .github/workflows/reusable-ci-hpc.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/reusable-ci.yml

This file was deleted.

22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]

## [0.35.0] - 2023-02-10
### Added
- Add accessors for the GridBox class (MIR-632)
- Add FunctionSpace::partition() field
- Add configurable MPI communicator to data structures (#131)
- Add single precision support for fvm::Nabla
- Implement PointCloud parallel construction with halo_radius

### Fixed
- Fix StructuredMeshGenerator for Gaussian grids that don't start at 0 degrees (ATLAS-375)
- Remove functionspace::Spectral via Trans initialisation (fixes #153)
- Enable MeshBuilder to set up the Grid (#152)
- Fix use of cmake option ATLAS_ENABLE_TRANS as in a bundle

### Changed
- Cleanup long-standing temporary element types. API change but with deprecated old API
- Deprecated rename Mesh::nb_partitions -> Mesh::nb_parts
- Implement Delaunay triangulation using Qhull instead of CGAL but CGAL can still be enabled instead for now

## [0.34.0] - 2023-07-10
### Added
- Fieldset::metadata (#126)
Expand Down Expand Up @@ -464,7 +483,8 @@ Fix StructuredInterpolation2D with retry for failed stencils
## 0.13.0 - 2018-02-16

[Unreleased]: https://github.com/ecmwf/atlas/compare/master...develop
[0.33.0]: https://github.com/ecmwf/atlas/compare/0.33.0...0.34.0
[0.35.0]: https://github.com/ecmwf/atlas/compare/0.34.0...0.35.0
[0.34.0]: https://github.com/ecmwf/atlas/compare/0.33.0...0.34.0
[0.33.0]: https://github.com/ecmwf/atlas/compare/0.32.1...0.33.0
[0.32.1]: https://github.com/ecmwf/atlas/compare/0.32.0...0.32.1
[0.32.0]: https://github.com/ecmwf/atlas/compare/0.31.1...0.32.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.34.0
0.35.0
11 changes: 7 additions & 4 deletions cmake/features/ECTRANS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ if( atlas_HAVE_ATLAS_TRANS )

### trans ...

if( NOT DEFINED ATLAS_ENABLE_ECTRANS AND DEFINED ATLAS_ENABLE_TRANS )
ecbuild_warn("Atlas option ATLAS_ENABLE_TRANS is deprecated in favour of ATLAS_ENABLE_ECTRANS")
set( ATLAS_ENABLE_ECTRANS ${ATLAS_ENABLE_TRANS} )
endif()
if( NOT DEFINED ENABLE_ECTRANS AND DEFINED ENABLE_TRANS )
ecbuild_warn("Atlas option ENABLE_TRANS is deprecated in favour of ENABLE_ECTRANS")
set( ENABLE_ECTRANS ${ENABLE_TRANS} )
endif()
if( NOT DEFINED ATLAS_ENABLE_ECTRANS AND DEFINED ATLAS_ENABLE_TRANS )
ecbuild_warn("Atlas option ATLAS_ENABLE_TRANS is deprecated in favour of ATLAS_ENABLE_ECTRANS")
set( ATLAS_ENABLE_TRANS ${ENABLE_TRANS} )
if( DEFINED ATLAS_ENABLE_ECTRANS )
set( ENABLE_ECTRANS ${ATLAS_ENABLE_ECTRANS} )
endif()

set( atlas_HAVE_PACKAGE_ECTRANS 0 )
Expand All @@ -32,4 +35,4 @@ ecbuild_add_option( FEATURE ECTRANS
DESCRIPTION "Support for IFS spectral transforms"
CONDITION atlas_HAVE_ATLAS_FUNCTIONSPACE AND transi_FOUND )

endif()
endif()
28 changes: 22 additions & 6 deletions cmake/features/TESSELATION.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
if( atlas_HAVE_ATLAS_FUNCTIONSPACE )
### tesselation ...

set(Boost_USE_MULTITHREADED ON )

ecbuild_add_option( FEATURE TESSELATION
DESCRIPTION "Support for unstructured mesh generation"
CONDITION atlas_HAVE_ATLAS_FUNCTIONSPACE
REQUIRED_PACKAGES "Qhull" )
if(HAVE_TESSELATION)
set(QHULL_LIBRARIES Qhull::qhullcpp Qhull::qhull_r)
set(atlas_HAVE_QHULL 1)
else()
set(atlas_HAVE_QHULL 0)
endif()

### NOTE
#
# CGAL is deprecated as TESSELATION backend. Qhull is to be used instead.
# To use CGAL regardless, turn ON CGAL feature (-DENABLE_CGAL=ON)

set(Boost_USE_MULTITHREADED ON )
ecbuild_add_option( FEATURE CGAL
DEFAULT OFF
DESCRIPTION "Support for unstructured mesh generation"
CONDITION atlas_HAVE_ATLAS_FUNCTIONSPACE
REQUIRED_PACKAGES
"CGAL QUIET"
"CGAL"
"Boost VERSION 1.45.0 QUIET" )

if( HAVE_TESSELATION )
if( HAVE_CGAL )
list( APPEND CGAL_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} )
if ( TARGET CGAL::CGAL )
list( APPEND CGAL_LIBRARIES CGAL::CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${GMP_LIBRARIES} ${MPFR_LIBRARIES} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} )
Expand All @@ -27,8 +43,8 @@ if( HAVE_TESSELATION )
endif()
endif()

if( NOT HAVE_TESSELATION )
if( NOT HAVE_CGAL )
unset( CGAL_LIBRARIES )
unset( CGAL_INCLUDE_DIRS )
endif()
endif()
endif()
12 changes: 12 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ else()
set( atlas_HAVE_TESSELATION 0 )
endif()

if( atlas_HAVE_QHULL )
set( atlas_HAVE_QHULL 1 )
else()
set( atlas_HAVE_QHULL 0 )
endif()

if( atlas_HAVE_CGAL )
set( atlas_HAVE_CGAL 1 )
else()
set( atlas_HAVE_CGAL 0 )
endif()

if( atlas_HAVE_PROJ )
set( atlas_HAVE_PROJ 1 )
else()
Expand Down
9 changes: 9 additions & 0 deletions src/atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ mesh/Connectivity.cc
mesh/Connectivity.h
mesh/ElementType.cc
mesh/ElementType.h
mesh/elementtypes/Classification.h
mesh/elementtypes/Triangle.h
mesh/elementtypes/Quadrilateral.h
mesh/elementtypes/Pentagon.h
mesh/Elements.cc
mesh/Elements.h
mesh/Halo.cc
Expand Down Expand Up @@ -815,6 +819,10 @@ util/vector.h
util/mdspan.h
util/detail/mdspan/mdspan.hpp
util/VectorOfAbstract.h
util/QhullSphericalTriangulation.h
util/QhullSphericalTriangulation.cc
util/CGALSphericalTriangulation.h
util/CGALSphericalTriangulation.cc
util/detail/Cache.h
util/detail/KDTree.h
util/function/MDPI_functions.h
Expand Down Expand Up @@ -928,6 +936,7 @@ ecbuild_add_library( TARGET atlas
${CGAL_LIBRARIES}
${FFTW_LIBRARIES}
${PROJ_LIBRARIES}
${QHULL_LIBRARIES}

PUBLIC_LIBS
eckit
Expand Down
14 changes: 10 additions & 4 deletions src/atlas/functionspace/CellColumns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ class CellColumnsHaloExchangeCache : public util::Cache<std::string, parallel::H

static value_type* create(const Mesh& mesh) {
value_type* value = new value_type();
value->setup(array::make_view<int, 1>(mesh.cells().partition()).data(),
value->setup(mesh.mpi_comm(),
array::make_view<int, 1>(mesh.cells().partition()).data(),
array::make_view<idx_t, 1>(mesh.cells().remote_index()).data(), REMOTE_IDX_BASE,
mesh.cells().size());
return value;
Expand Down Expand Up @@ -129,7 +130,8 @@ class CellColumnsGatherScatterCache : public util::Cache<std::string, parallel::

static value_type* create(const Mesh& mesh) {
value_type* value = new value_type();
value->setup(array::make_view<int, 1>(mesh.cells().partition()).data(),
value->setup(mesh.mpi_comm(),
array::make_view<int, 1>(mesh.cells().partition()).data(),
array::make_view<idx_t, 1>(mesh.cells().remote_index()).data(), REMOTE_IDX_BASE,
array::make_view<gidx_t, 1>(mesh.cells().global_index()).data(), mesh.cells().size());
return value;
Expand Down Expand Up @@ -193,14 +195,14 @@ void CellColumns::set_field_metadata(const eckit::Configuration& config, Field&
}

idx_t CellColumns::config_size(const eckit::Configuration& config) const {
const idx_t rank = mpi::rank();
idx_t size = nb_cells();
bool global(false);
if (config.get("global", global)) {
if (global) {
idx_t owner(0);
config.get("owner", owner);
idx_t _nb_cells_global(nb_cells_global());
const idx_t rank = mpi::comm(mpi_comm()).rank();
size = (rank == owner ? _nb_cells_global : 0);
}
}
Expand Down Expand Up @@ -269,7 +271,7 @@ CellColumns::CellColumns(const Mesh& mesh, const eckit::Configuration& config):
return nb_cells;
};

mesh::actions::build_nodes_parallel_fields(mesh_.nodes());
mesh::actions::build_nodes_parallel_fields(mesh_);
mesh::actions::build_cells_parallel_fields(mesh_);
mesh::actions::build_periodic_boundaries(mesh_);

Expand Down Expand Up @@ -587,6 +589,10 @@ Field CellColumns::ghost() const {
return mesh_.cells().field("ghost");
}

Field CellColumns::partition() const {
return mesh_.cells().partition();
}

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/atlas/functionspace/CellColumns.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ class CellColumns : public functionspace::FunctionSpaceImpl {

Field ghost() const override;

Field partition() const override;

std::string mpi_comm() const override { return mesh_.mpi_comm(); }

private: // methods
idx_t config_size(const eckit::Configuration& config) const;
array::DataType config_datatype(const eckit::Configuration&) const;
Expand Down
14 changes: 10 additions & 4 deletions src/atlas/functionspace/EdgeColumns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class EdgeColumnsHaloExchangeCache : public util::Cache<std::string, parallel::H

static value_type* create(const Mesh& mesh) {
value_type* value = new value_type();
value->setup(array::make_view<int, 1>(mesh.edges().partition()).data(),
value->setup(mesh.mpi_comm(),
array::make_view<int, 1>(mesh.edges().partition()).data(),
array::make_view<idx_t, 1>(mesh.edges().remote_index()).data(), REMOTE_IDX_BASE,
mesh.edges().size());
return value;
Expand Down Expand Up @@ -130,7 +131,8 @@ class EdgeColumnsGatherScatterCache : public util::Cache<std::string, parallel::

static value_type* create(const Mesh& mesh) {
value_type* value = new value_type();
value->setup(array::make_view<int, 1>(mesh.edges().partition()).data(),
value->setup(mesh.mpi_comm(),
array::make_view<int, 1>(mesh.edges().partition()).data(),
array::make_view<idx_t, 1>(mesh.edges().remote_index()).data(), REMOTE_IDX_BASE,
array::make_view<gidx_t, 1>(mesh.edges().global_index()).data(), mesh.edges().size());
return value;
Expand Down Expand Up @@ -194,14 +196,14 @@ void EdgeColumns::set_field_metadata(const eckit::Configuration& config, Field&
}

idx_t EdgeColumns::config_size(const eckit::Configuration& config) const {
const idx_t rank = mpi::rank();
idx_t size = nb_edges();
bool global(false);
if (config.get("global", global)) {
if (global) {
idx_t owner(0);
config.get("owner", owner);
idx_t _nb_edges_global(nb_edges_global());
const idx_t rank = mpi::comm(mpi_comm()).rank();
size = (rank == owner ? _nb_edges_global : 0);
}
}
Expand Down Expand Up @@ -266,7 +268,7 @@ EdgeColumns::EdgeColumns(const Mesh& mesh, const eckit::Configuration& config):
return _nb_edges;
};

mesh::actions::build_nodes_parallel_fields(mesh_.nodes());
mesh::actions::build_nodes_parallel_fields(mesh_);
mesh::actions::build_periodic_boundaries(mesh_);

if (halo_.size() > 0) {
Expand Down Expand Up @@ -570,6 +572,10 @@ Field EdgeColumns::remote_index() const {
return edges().remote_index();
};

Field EdgeColumns::partition() const {
return edges().partition();
}

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 9b6fb72

Please sign in to comment.