Skip to content

Commit

Permalink
Merge branch 'release/0.38.0'
Browse files Browse the repository at this point in the history
* release/0.38.0: (47 commits)
  Update Changelog
  Version 0.38.0
  implement a procedure to carry out a regridding from high to low resolution (binning) (#191)
  Fixes opposite pole coordinates (#202)
  Avoid silent errors accessing Fieldset fields by ambiguous names (#210)
  Made sure cubed-sphere interpolation method always sets metadata. (#208)
  Add fortran interface for node-to-edge connectivity building (#209)
  Removed redundant headers.
  Fixed SphericalVector.
  Fixed StructuredInterpolation2D.
  Added failing tests.
  Update ci.yml to fix notification (#207)
  Add notifications to github workflows
  Remove float in Triag2D intersection algorithm (#203)
  Fixup: use C++17 uncaught_exceptions (extra s in exceptions)
  Disable logging of ATLAS_TRACE during stack unwinding (e.g. when exception is thrown)
  Add GPU offloading capability with OpenACC support to Native WrappedDataStore
  Add C++ OpenACC test for some sanity
  Refactor OpenACC support and implement for Native arrays
  Enable use of CUDA for Native arrays
  ...
  • Loading branch information
wdeconinck committed Jun 20, 2024
2 parents 986938e + e39fe1c commit 7ad6d4d
Show file tree
Hide file tree
Showing 92 changed files with 5,849 additions and 2,375 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,20 @@ jobs:
repository: private-downstream-ci
event_type: downstream-ci-hpc
payload: '{"atlas": "ecmwf/atlas@${{ github.event.pull_request.head.sha || github.sha }}"}'


notify:
runs-on: ubuntu-latest
needs:
- downstream-ci
- private-downstream-ci
- downstream-ci-hpc
- private-downstream-ci-hpc
if: ${{ always() && !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
steps:
- name: Trigger Teams notification
uses: ecmwf-actions/notify-teams@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
needs_context: ${{ toJSON(needs) }}

15 changes: 15 additions & 0 deletions .github/workflows/notify-new-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Notify new issue

on:
issues:
types:
- "opened"

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify new issue
uses: ecmwf-actions/notify-teams-issue@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
16 changes: 16 additions & 0 deletions .github/workflows/notify-new-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Notify new PR

# Needs the worklow to be located in the branche the PR is merged to
on:
pull_request_target:
types:
- "opened"

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify new PR
uses: ecmwf-actions/notify-teams-pr@v1
with:
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ build/*
install/*
env.sh
*.DS_Store
.vscode

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

## [Unreleased]

## [0.38.0] - 2024-06-20

### Added
- Make non_linear interpolation independent of a chosen value type by @wdeconinck in https://github.com/ecmwf/atlas/pull/176
- Procedure to carry out a regridding from high to low resolution (binning) by @mo-lormi in https://github.com/ecmwf/atlas/pull/191
- Add Fortran interface for node-to-edge connectivity building by @benjaminmenetrier in https://github.com/ecmwf/atlas/pull/209
- CUDA/OpenACC capable fields with Native storage backend @sbrdar and @wdeconinck in https://github.com/ecmwf/atlas/pull/182

### Changed
- Make non_linear interpolation independent of a chosen value type by @wdeconinck in https://github.com/ecmwf/atlas/pull/176

### Fixed
- Remove float in Triag2D intersection algorithm by @fmahebert in https://github.com/ecmwf/atlas/pull/203
- Allow zero-sized interpolation target functionspace by @odlomax in https://github.com/ecmwf/atlas/pull/206
- Made sure cubed-sphere interpolation method always sets metadata. by @odlomax in https://github.com/ecmwf/atlas/pull/208
- Avoid silent errors accessing Fieldset fields by ambiguous names by @wdeconinck in https://github.com/ecmwf/atlas/pull/210
- Fixes opposite pole coordinates by @benjaminmenetrier in https://github.com/ecmwf/atlas/pull/202

## [0.37.0] - 2024-04-09
### Added
- Add SphericalVector interpolation method using parallel transport (#163)
Expand Down Expand Up @@ -527,6 +545,7 @@ Fix StructuredInterpolation2D with retry for failed stencils
## 0.13.0 - 2018-02-16

[Unreleased]: https://github.com/ecmwf/atlas/compare/master...develop
[0.38.0]: https://github.com/ecmwf/atlas/compare/0.37.0...0.38.0
[0.37.0]: https://github.com/ecmwf/atlas/compare/0.36.0...0.37.0
[0.36.0]: https://github.com/ecmwf/atlas/compare/0.35.1...0.36.0
[0.35.1]: https://github.com/ecmwf/atlas/compare/0.35.0...0.35.1
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ecbuild_add_option( FEATURE ECKIT_DEVELOP

include( features/BOUNDSCHECKING )
include( features/FORTRAN )
include( features/CUDA )
include( features/MPI )
include( features/OMP )
include( features/FFTW )
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.37.0
0.38.0
6 changes: 4 additions & 2 deletions cmake/features/ACC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ ecbuild_add_option( FEATURE ACC

if( atlas_HAVE_ACC )
if( CMAKE_Fortran_COMPILER_ID MATCHES "PGI|NVHPC" )
set( ACC_Fortran_FLAGS -acc -ta=tesla,nordc )
#set( ACC_Fortran_FLAGS -acc -ta=tesla,nordc )
set( ACC_Fortran_FLAGS "-acc=gpu;-gpu=gvmode,lineinfo,fastmath,rdc" )
set( ACC_C_FLAGS ${ACC_Fortran_FLAGS} )
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 )
Expand All @@ -27,4 +28,5 @@ endif()
else()
set( HAVE_ACC 0 )
set( atlas_HAVE_ACC 0 )
endif()
endif()

15 changes: 15 additions & 0 deletions cmake/features/CUDA.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

ecbuild_add_option( FEATURE CUDA
DESCRIPTION "Enable CUDA support"
DEFAULT OFF
)

if( HAVE_CUDA )

enable_language( CUDA )
ecbuild_info( "CUDA language enabled" )

find_package( CUDAToolkit REQUIRED )

endif()

47 changes: 12 additions & 35 deletions cmake/features/GRIDTOOLS_STORAGE.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if( atlas_HAVE_ATLAS_FIELD )
if( atlas_HAVE_ATLAS_FIELD AND (ENABLE_GRIDTOOLS_STORAGE OR atlas_ENABLE_GRIDTOOLS_STORAGE) )

### GridTools storage module

Expand All @@ -22,51 +22,28 @@ ecbuild_add_option(
DESCRIPTION "Arrays internally use GridTools storage layer"
CONDITION GridTools_FOUND )

ecbuild_add_option( FEATURE CUDA
DESCRIPTION "Enable CUDA support via GridTools CUDA backend"
CONDITION GRIDTOOLS_HAS_BACKEND_CUDA )

set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_HOST 0 )
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA 0 )

if( atlas_HAVE_GRIDTOOLS_STORAGE )

if( atlas_HAVE_CUDA )

ecbuild_info( "GridTools found with CUDA support" )

# Logic to check if we can use enable_language( CUDA )
# - CMake already supports it (as GridTools requires version that supports it)
# - ecbuild version 3.3 added support
# - overriding mechanism possible with cached "atlas_CUDA_LANGUAGE_ENABLED" variable
if( DEFINED ecbuild_VERSION AND NOT ecbuild_VERSION VERSION_LESS 3.3 )
set( atlas_CUDA_LANGUAGE_ENABLED_DEFAULT ON )
if( GRIDTOOLS_HAS_BACKEND_CUDA )
if( atlas_HAVE_CUDA )
ecbuild_info( "GridTools found with CUDA support -> backend CUDA" )
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA 1 )
else()
set( atlas_CUDA_LANGUAGE_ENABLED_DEFAULT OFF )
ecbuild_info( "GridTools found with CUDA support, but atlas does not have CUDA enabled -> backend HOST" )
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_HOST 1 )
endif()
set( atlas_CUDA_LANGUAGE_ENABLED ${atlas_CUDA_LANGUAGE_ENABLED_DEFAULT} CACHE BOOL "atlas enables CUDA language" )

if( atlas_CUDA_LANGUAGE_ENABLED )
enable_language( CUDA )
ecbuild_info( "CUDA language enabled" )
else()
ecbuild_info("CUDA enabled through find_package(CUDA) instead of enable_language(CUDA)")
find_package( CUDA )
endif()

set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA 1 )

else()

ecbuild_info( "GridTools found without CUDA support -> backend HOST" )
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_HOST 1 )

endif()

endif()

else()
set( HAVE_GRIDTOOLS_STORAGE 1 )
set( HAVE_GRIDTOOLS_STORAGE 0 )
set( atlas_HAVE_GRIDTOOLS_STORAGE 0 )
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA 0 )
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_HOST 0 )
endif()
set( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA 0 )
endif()

35 changes: 22 additions & 13 deletions cmake/project_summary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,7 @@ if( CGAL_FOUND )

endif()

if( atlas_HAVE_GRIDTOOLS_STORAGE )

ecbuild_info( "GRIDTOOLS_STORAGE" )
if( ATLAS_GRIDTOOLS_STORAGE_BACKEND_HOST )
ecbuild_info( " BACKEND : [HOST]" )
endif()
if( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA )
ecbuild_info( " BACKEND : [CUDA]" )
endif()

endif()

if( CUDA_FOUND )
if( atlas_HAVE_CUDA )

ecbuild_info( "CUDA (${CUDA_VERSION})" )
ecbuild_info( " CUDA_NVCC_COMPILER : [${CUDA_NVCC_EXECUTABLE}]" )
Expand All @@ -59,3 +47,24 @@ if( atlas_HAVE_ACC )
ecbuild_info( " ACC_Fortran_FLAGS : [${ACC_Fortran_FLAGS}]" )

endif()


if( atlas_HAVE_GRIDTOOLS_STORAGE )

if( ATLAS_GRIDTOOLS_STORAGE_BACKEND_HOST )
ecbuild_info( "Array storage backend: GridTools [HOST]" )
endif()
if( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA )
ecbuild_info( "Array storage backend: GridTools [CUDA]" )
endif()

else()

if( NOT atlas_HAVE_CUDA )
ecbuild_info( "Array storage backend: Native [HOST]" )
else()
ecbuild_info( "Array storage backend: Native [CUDA]" )
endif()

endif()

6 changes: 3 additions & 3 deletions doc/example-grids/classic_gaussian_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ projection :

check :
size : 1688
lonlat(first) : [3,44.8796]
lonlat(last) : [-172.453,-54.9736]
uid : 64d609c6ee4b036b209047aef97a10eb
lonlat(first) : [3,49.1204]
lonlat(last) : [179.6485,-38.8936]
uid : 02ef7ed866af557e04882342a90fddfe
bounding_box(n,w,s,e) : [90,0,-90,360]
2 changes: 1 addition & 1 deletion doc/example-grids/custom_structured_5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ check :
size : 144
lonlat(first) : [3,40]
lonlat(last) : [-177,-40]
uid : d55211f27c4a8c6ce94ea67f0c706e22
uid : 23f0a23085bbea10277b457f482927c0
bounding_box(n,w,s,e) : [90,0,-90,360]
6 changes: 3 additions & 3 deletions doc/example-grids/octahedral_gaussian_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ projection : { type: "rotated_schmidt", stretching_factor : 4.0, north_pole : [

check :
size : 1600
lonlat(first) : [3,45.9397]
lonlat(last) : [-165.776,-62.6128]
uid : 20308244515b7c78e22709ebaa842246
lonlat(first) : [3,48.0603]
lonlat(last) : [177.0166,-30.8]
uid : 1297f9ab088b831da3139eb5f44e20a9
bounding_box(n,w,s,e) : [90,0,-90,360]
6 changes: 3 additions & 3 deletions doc/example-grids/octahedral_gaussian_4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ projection : { type: "rotated_schmidt", stretching_factor: 4.0, north_pole: [3.

check :
size : 1600
lonlat(first) : [3,45.9397]
lonlat(last) : [-165.776,-62.6128]
uid : 20308244515b7c78e22709ebaa842246
lonlat(first) : [3,48.0603]
lonlat(last) : [177.0166,-30.8]
uid : 1297f9ab088b831da3139eb5f44e20a9
bounding_box(n,w,s,e) : [90,0,-90,360]
2 changes: 1 addition & 1 deletion doc/example-grids/regional_rotated_mercator_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ check :
size : 2000
lonlat(first) : [-10.319,40.2109]
lonlat(last) : [24.4206,57.2263]
uid : 9d4b8c38db08c6f3fe3221c8770d8d57
uid : 88d856331d46d30703b38e3ed2e8b2de
bounding_box(n,w,s,e) : [58.734,-16.4206,40.2109,24.4206]
6 changes: 3 additions & 3 deletions doc/example-grids/regular_gaussian_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ projection :

check :
size : 128
lonlat(first) : [3,38.8589]
lonlat(last) : [-135.011,-72.4668]
uid : d179fd0b56811242a1a0a8e83dade6a1
lonlat(first) : [3,55.1411]
lonlat(last) : [170.8438,-16.8513]
uid : 2efc83bfae617ec2fe1a7cebe523cf41
bounding_box(n,w,s,e) : [90,0,-90,360]
12 changes: 12 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ else()
set( atlas_HAVE_INIT_SNAN 0 )
endif()

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

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

if( atlas_HAVE_GRIDTOOLS_STORAGE )
set( atlas_HAVE_GRIDTOOLS_STORAGE 1 )
else()
Expand Down
Loading

0 comments on commit 7ad6d4d

Please sign in to comment.