Skip to content

Commit

Permalink
Merge remote-tracking branch 'ecmwf/develop' into bugfix/qhull
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminmenetrier committed Oct 9, 2024
2 parents 02342df + 84ec3e1 commit 7f84f1f
Show file tree
Hide file tree
Showing 168 changed files with 11,010 additions and 2,552 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ jobs:

- name: macos
# Xcode compiler requires empty environment variables, so we pass null (~) here
os: macos-12
compiler: clang-14
os: macos-14
compiler: clang-15
compiler_cc: ~
compiler_cxx: ~
compiler_fc: gfortran-11
compiler_fc: gfortran-13
caching: true
coverage: false
cmake_options: -DMPI_SLOTS=4
Expand Down
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 }}
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,43 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## [Unreleased]

## [0.39.0] - 2024-09-18

### Added
- Add HIC abstraction layer for HIP and CUDA by @wdeconinck in https://github.com/ecmwf/atlas/pull/219
- Support for HIP via HIC
- Add regional interpolation by @benjaminmenetrier in https://github.com/ecmwf/atlas/pull/215
- Pack vector components into higher-rank vector fields. by @odlomax in https://github.com/ecmwf/atlas/pull/218

### Fixed
- Fix missing header in FieldImpl.h by @tehrengruber in https://github.com/ecmwf/atlas/pull/214
- Bug fixes to vector interpolation with StructuredColumns and spherical vector interpolation by @MarekWlasak in https://github.com/ecmwf/atlas/pull/222


## [0.38.1] - 2024-07-15

### Fixed
- Compilation and running with NAG compiler
- Wrap out-of-bounds source cells into the domain (#211)

## [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 +564,9 @@ Fix StructuredInterpolation2D with retry for failed stencils
## 0.13.0 - 2018-02-16

[Unreleased]: https://github.com/ecmwf/atlas/compare/master...develop
[0.39.0]: https://github.com/ecmwf/atlas/compare/0.38.1...0.39.0
[0.38.1]: https://github.com/ecmwf/atlas/compare/0.38.0...0.38.1
[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
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ ecbuild_add_option( FEATURE ECKIT_DEVELOP
DESCRIPTION "Used to enable new features or API depending on eckit develop branch, not yet in a tagged release"
DEFAULT OFF )

if (DEFINED ATLAS_ENABLE_CUDA AND NOT DEFINED HIC_ENABLE_CUDA )
set( HIC_ENABLE_CUDA ${ATLAS_ENABLE_CUDA} )
endif()
if (DEFINED ATLAS_ENABLE_HIP AND NOT DEFINED HIC_ENABLE_HIP )
set( HIC_ENABLE_HIP ${ATLAS_ENABLE_HIP} )
endif()

add_subdirectory( hic )
find_package(hic)


include( features/BOUNDSCHECKING )
include( features/FORTRAN )
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.39.0
1 change: 1 addition & 0 deletions cmake/atlas-import.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if( atlas_HAVE_FORTRAN )
endif()

find_dependency( atlas_io HINTS ${CMAKE_CURRENT_LIST_DIR}/../atlas_io @atlas_io_DIR@ @atlas_io_BINARY_DIR@ )
find_dependency( hic HINTS ${CMAKE_CURRENT_LIST_DIR}/../hic @hic_DIR@ @hic_BINARY_DIR@ )

## Eigen3
set( Eigen3_HINT @Eigen3_DIR@ )
Expand Down
5 changes: 3 additions & 2 deletions cmake/atlas_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

if( CMAKE_CXX_COMPILER_ID MATCHES Cray )


ecbuild_add_cxx_flags("-hnomessage=3140" NAME atlas_cxx_disable_warnings ) # colon separated numbers
if( NOT CMAKE_CXX_COMPILER_ID MATCHES CrayClang )
ecbuild_add_cxx_flags("-hnomessage=3140" NAME atlas_cxx_disable_warnings ) # colon separated numbers
endif()
ecbuild_add_fortran_flags("-hnomessage=3140" NAME atlas_fortran_disable_warnings ) # colon separated numbers

# CC-3140 crayc++: WARNING File = atlas/functionspace/NodeColumns.cc, Line = 1, Column = 1
Expand Down
28 changes: 17 additions & 11 deletions cmake/atlas_host_device.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

function( create_cuda_wrapper variable )
function( create_hic_wrapper variable )
set( options "" )
set( single_value_args SOURCE )
set( multi_value_args "" )
Expand All @@ -17,18 +17,24 @@ function( create_cuda_wrapper variable )
get_filename_component(name ${_PAR_SOURCE} NAME)
get_filename_component(abspath ${_PAR_SOURCE} ABSOLUTE)

if( HAVE_CUDA )
set( extension "cu" )
elseif( HAVE_HIP )
set( extension "hip" )
endif()

if( directory )
set(cuda_wrapper ${CMAKE_CURRENT_BINARY_DIR}/${directory}/${base}.cu)
set(hic_wrapper ${CMAKE_CURRENT_BINARY_DIR}/${directory}/${base}.${extension})
else()
set(cuda_wrapper ${CMAKE_CURRENT_BINARY_DIR}/${base}.cu)
set(hic_wrapper ${CMAKE_CURRENT_BINARY_DIR}/${base}.${extension})
endif()
set(${variable} ${cuda_wrapper} PARENT_SCOPE)
set(${variable} ${hic_wrapper} PARENT_SCOPE)
set(content
"
#include \"atlas/${directory}/${name}\"
")
if( ${abspath} IS_NEWER_THAN ${cuda_wrapper} )
file(WRITE ${cuda_wrapper} "${content}")
if( ${abspath} IS_NEWER_THAN ${hic_wrapper} )
file(WRITE ${hic_wrapper} "${content}")
endif()
endfunction()

Expand All @@ -40,12 +46,12 @@ function( atlas_host_device srclist )
set( multi_value_args SOURCES )
cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${ARGN} )

if( ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA )
set( use_cuda_srclist ${_PAR_SOURCES} )
if( HAVE_GPU )
set( use_hic_srclist ${_PAR_SOURCES} )

foreach( src ${use_cuda_srclist} )
create_cuda_wrapper( cuda_wrapper SOURCE ${src} )
list( APPEND ${srclist} ${cuda_wrapper} )
foreach( src ${use_hic_srclist} )
create_hic_wrapper( hic_wrapper SOURCE ${src} )
list( APPEND ${srclist} ${hic_wrapper} )
ecbuild_list_exclude_pattern( LIST ${srclist} REGEX ${src} )
endforeach()

Expand Down
37 changes: 16 additions & 21 deletions cmake/features/ACC.cmake
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
### OpenACC

if( atlas_HAVE_ATLAS_FIELD )
if( atlas_HAVE_ATLAS_FIELD AND HAVE_GPU )

set( ATLAS_ACC_CAPABLE FALSE )
if( HAVE_CUDA )
if( CMAKE_Fortran_COMPILER_ID MATCHES "PGI|NVHPC" )
set( ATLAS_ACC_CAPABLE TRUE )
if( DEFINED ATLAS_ENABLE_ACC )
set( ENABLE_ACC ${ATLAS_ENABLE_ACC} )
endif()
endif()

ecbuild_add_option( FEATURE ACC
DESCRIPTION "OpenACC capable data structures"
CONDITION ATLAS_ACC_CAPABLE )

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=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 )
ecbuild_error( "Could not find OpenACC capable C compiler" )
if( ENABLE_ACC )
if( NOT HAVE_FORTRAN )
enable_language(Fortran)
endif()
find_package( OpenACC COMPONENTS Fortran CXX )
endif()

ecbuild_add_option( FEATURE ACC
DESCRIPTION "OpenACC capable data structures"
CONDITION OpenACC_Fortran_FOUND )
if( HAVE_ACC )
set( ACC_LINK_OPTIONS ${OpenACC_Fortran_FLAGS} )
endif()
endif()

else()

set( HAVE_ACC 0 )
set( atlas_HAVE_ACC 0 )
endif()

endif()
42 changes: 32 additions & 10 deletions cmake/features/CUDA.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@

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

if( HAVE_CUDA )

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

find_package( CUDAToolkit REQUIRED )
set( atlas_HAVE_CUDA 0 )
set( atlas_HAVE_HIP 0 )
set( atlas_HAVE_GPU 0 )

if( hic_HAVE_CUDA )
enable_language( CUDA )
ecbuild_info( "CUDA language enabled" )
find_package(CUDAToolkit REQUIRED)
set( atlas_HAVE_CUDA 1 )
set( atlas_HAVE_GPU 1 )
elseif( hic_HAVE_HIP )
enable_language( HIP )
ecbuild_info( "HIP language enabled" )
find_package(hip CONFIG REQUIRED)
set( atlas_HAVE_HIP 1 )
set( atlas_HAVE_GPU 1 )
endif()

set( HAVE_CUDA ${atlas_HAVE_CUDA} )
set( HAVE_HIP ${atlas_HAVE_HIP} )
set( HAVE_GPU ${atlas_HAVE_GPU} )

if( HAVE_GPU )
ecbuild_info("GPU support enabled")
else()
ecbuild_info("GPU support not enabled")
endif()
10 changes: 7 additions & 3 deletions cmake/features/ECTRANS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ if( atlas_HAVE_ATLAS_FUNCTIONSPACE AND (ENABLE_ECTRANS OR NOT DEFINED ENABLE_ECT
if( TARGET transi_dp )
set( transi_FOUND TRUE )
if( NOT TARGET transi )
get_target_property( transi_dp_IMPORTED transi_dp IMPORTED )
if( transi_dp_IMPORTED )
set_target_properties( transi_dp PROPERTIES IMPORTED_GLOBAL TRUE) # required for aliasing imports
if( CMAKE_VERSION VERSION_LESS 3.18 )
# Before CMake 3.18 it is not possible to alias a non-global imported target
# Make the import global. Warning, this may break further find_package
get_target_property( transi_dp_IMPORTED transi_dp IMPORTED )
if( transi_dp_IMPORTED )
set_target_properties( transi_dp PROPERTIES IMPORTED_GLOBAL TRUE)
endif()
endif()
add_library( transi ALIAS transi_dp )
endif()
Expand Down
8 changes: 3 additions & 5 deletions cmake/project_summary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ endif()
if( atlas_HAVE_ACC )

ecbuild_info( "ACC" )
ecbuild_info( " ACC_C_COMPILER : [${ACC_C_COMPILER}]" )
ecbuild_info( " ACC_C_FLAGS : [${ACC_C_FLAGS}]" )
ecbuild_info( " ACC_Fortran_FLAGS : [${ACC_Fortran_FLAGS}]" )
ecbuild_info( " OpenACC_Fortran_FLAGS : [${OpenACC_Fortran_FLAGS}]" )

endif()

Expand All @@ -60,10 +58,10 @@ if( atlas_HAVE_GRIDTOOLS_STORAGE )

else()

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

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

if(atlas_HAVE_FORTRAN)
add_subdirectory(example-fortran)
endif()

if(atlas_HAVE_DOCS)

add_subdirectory(user-guide)
Expand Down
10 changes: 10 additions & 0 deletions doc/example-fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# (C) Copyright 2024- 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.

add_subdirectory(structured-grid-stencils)

12 changes: 12 additions & 0 deletions doc/example-fortran/structured-grid-stencils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# (C) Copyright 2024- 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.

ecbuild_add_executable( TARGET example-fortran-structured-grid-stencils
OUTPUT_NAME program NOINSTALL
SOURCES program.F90
LIBS atlas_f )
Loading

0 comments on commit 7f84f1f

Please sign in to comment.