Skip to content

Commit

Permalink
Merge branch 'release/0.15.0'
Browse files Browse the repository at this point in the history
* release/0.15.0: (123 commits)
  Disable PGI build from travis ci
  Print more configuration information
  Reduce test times
  Remove warnings related to unreachable statements detected by PGI compiler
  Fix various warnings shown by pgi/18.4 -- still failing tests for pgi
  Version 0.15.0
  Fix a wrong template type
  Apply clang-format
  ATLAS-165 Fix intents in Fortran functions
  ATLAS-164 Array uses raw C pointer rather than std::vector and is initialised with signaling_NaN for debug builds
  ATLAS-163 Recompute weights on edges
  ATLAS-163 Introduce bit reproducibility for parallel interpolation for coinciding meshes
  ATLAS-163 Introduce bit reproducibility for parallel interpolation
  merging spectral U and V before the transform is now the default
  added option to merge U,V,scalars before transform with old vd2uv; this should be faster because the size of the dgemm calls is bigger
  work in progress: merging all spectral data into one array with vdoption
  Avoid inclusion of fftw3.h in TransLocal.h
  some clean-up. Unstructured grids are currently not working (ATLAS-162)
  fixed vd2uv for reduced grids and improved its performance by moving loop over wavenumbers inside vd2uv
  some cleanup
  ...
  • Loading branch information
wdeconinck committed Jun 20, 2018
2 parents f4ccfa3 + e8a347f commit 6a53e43
Show file tree
Hide file tree
Showing 147 changed files with 4,454 additions and 1,453 deletions.
70 changes: 46 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,20 @@ matrix:
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'gcc-5', 'gfortran-5']
packages: ['g++-5', 'gcc-5', 'gfortran-5', 'libfftw3-dev']

- os: linux
compiler: gcc
env:
- CACHE_NAME=linux-gcc7-mpich
- CXX_COMPILER='g++-7' C_COMPILER='gcc-7' Fortran_COMPILER='gfortran-7'
- MPI='mpich'
- ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG"
- ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG -DENABLE_GPROF=ON"
- COVERAGE=ON
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'gcc-7', 'gfortran-7']

- os: linux
compiler: gcc
env:
- CACHE_NAME=linux-pgi-openmpi
- CXX_COMPILER='pgc++' C_COMPILER='pgcc' Fortran_COMPILER='pgfortran'
- MPI='openmpi'
- PGI_VERSION="CommunityEdition"
- ECKIT_CMAKE_OPTIONS="-DRT_LIB=/usr/lib/x86_64-linux-gnu/librt.so -DCURSES_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurses.so"
- ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG -DENABLE_FORTRAN=OFF" # Fortran tests known to be broken with pgi/17.10
packages: ['g++-7', 'gcc-7', 'gfortran-7', 'libfftw3-dev', 'lcov']

- os: osx
env:
Expand All @@ -89,6 +80,16 @@ matrix:
# - MPI=mpich
# osx_image: xcode9

# - os: linux
# compiler: gcc
# env:
# - CACHE_NAME=linux-pgi-openmpi
# - CXX_COMPILER='pgc++' C_COMPILER='pgcc' Fortran_COMPILER='pgfortran'
# - MPI='openmpi'
# - PGI_VERSION="CommunityEdition"
# - ECKIT_CMAKE_OPTIONS="-DRT_LIB=/usr/lib/x86_64-linux-gnu/librt.so -DCURSES_LIBRARY=/usr/lib/x86_64-linux-gnu/libcurses.so"
# - ATLAS_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=DEBUG -DENABLE_FORTRAN=OFF" # Fortran tests known to be broken with pgi/17.10

before_install:

#################################################################
Expand Down Expand Up @@ -143,16 +144,6 @@ install:
source ${DEPS_DIR}/pgi/env.sh
fi
#################################################################
# Install CGAL
#################################################################
- |
### Install CGAL
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew upgrade cgal || brew install cgal
fi
#################################################################
# Install MPI
#################################################################
Expand All @@ -179,6 +170,24 @@ install:
fi
cmake --version
#################################################################
# Install FFTW
#################################################################
- |
### Install FFTW
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew upgrade fftw || brew install fftw
fi
#################################################################
# Install CGAL
#################################################################
- |
### Install CGAL
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew upgrade cgal || brew install cgal
fi
#################################################################
# Install ecbuild
#################################################################
Expand Down Expand Up @@ -231,7 +240,20 @@ script:
#################################################################
# Test Atlas
#################################################################
- ctest
- ctest -VV

after_success:

- |
if [[ "${COVERAGE}" == "ON" ]]; then
# Creating report
cd ${ATLAS_BUILD_DIR}
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
lcov --list coverage.info #debug info
# Uploading report to CodeCov
bash <(curl -s https://codecov.io/bash) -t 9c489980-d292-499c-8615-af02df3b20d1 || echo "Codecov did not collect coverage reports"
fi
after_failure:

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

## [Unreleased]

## [0.15.0] - 2018-06-19
### Changed
- Native Array data storage uses now a raw C pointer instead of std::vector
- Significant performance improvements to Spherical harmonics transforms

### Fixed
- Various bugs related to parallel halos
- Bit reproducibility for parallel interpolation

## [0.14.0] - 2018-03-22
### Added
- Spherical Harmonics transforms can receive a cache memory handle
Expand All @@ -30,6 +39,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.15.0]: https://github.com/ecmwf/atlas/compare/0.14.0...0.15.0
[0.14.0]: https://github.com/ecmwf/atlas/compare/0.13.2...0.14.0
[0.13.2]: https://github.com/ecmwf/atlas/compare/0.13.1...0.13.2
[0.13.1]: https://github.com/ecmwf/atlas/compare/0.13.0...0.13.1
28 changes: 24 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ecbuild_declare_project()

### eckit

ecbuild_use_package( PROJECT eckit VERSION 0.20.0 REQUIRED )
ecbuild_use_package( PROJECT eckit VERSION 0.21.0 REQUIRED )
ecbuild_debug( " ECKIT_FEATURES : [${ECKIT_FEATURES}]" )

# options & dependencies
Expand Down Expand Up @@ -99,6 +99,12 @@ else()
ecbuild_enable_ompstubs()
endif()

### FFTW ...

ecbuild_add_option( FEATURE FFTW
DESCRIPTION "Support for fftw"
REQUIRED_PACKAGES "FFTW COMPONENTS double" )

### trans ...

ecbuild_add_option( FEATURE TRANS
Expand Down Expand Up @@ -185,15 +191,29 @@ set( ATLAS_BITS_GLOBAL 64 )
### Bounds checking
if( ${CMAKE_BUILD_TYPE} MATCHES "Debug" )
set( DEFAULT_BOUNDSCHECKING ON )
set( DEFAULT_INIT_SNAN ON )
else()
set( DEFAULT_BOUNDSCHECKING OFF )
set( DEFAULT_INIT_SNAN OFF )
endif()

ecbuild_add_option( FEATURE BOUNDSCHECKING
DEFAULT ${DEFAULT_BOUNDSCHECKING}
DESCRIPTION "Bounds checking for atlas::ArrayView and atlas::IndexView" )
if( ${CMAKE_BUILD_TYPE} MATCHES "Debug" AND NOT ATLAS_HAVE_BOUNDSCHECKING )
ecbuild_info( "Turning BOUNDSCHECKING ON for Debug build" )
set( ATLAS_HAVE_BOUNDSCHECKING 1 )

ecbuild_add_option( FEATURE INIT_SNAN
DEFAULT ${DEFAULT_INIT_SNAN}
DESCRIPTION "Initialise atlas arrays with signaling_NaN (real types) or other invalid values (other types)" )

if( ${CMAKE_BUILD_TYPE} MATCHES "Debug" )
if( NOT ATLAS_HAVE_INIT_SNAN )
ecbuild_info( "Turning INIT_SNAN ON for Debug build" )
set( ATLAS_HAVE_INIT_SNAN 1 )
endif()
if( NOT ATLAS_HAVE_BOUNDSCHECKING )
ecbuild_info( "Turning BOUNDSCHECKING ON for Debug build" )
set( ATLAS_HAVE_BOUNDSCHECKING 1 )
endif()
endif()

### sandbox
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Atlas

[![travis master](https://img.shields.io/travis/ecmwf/atlas/master.svg?label=master&logo=travis)](http://travis-ci.org/ecmwf/atlas "master")
[![travis develop](https://img.shields.io/travis/ecmwf/atlas/develop.svg?label=develop&logo=travis)](http://travis-ci.org/ecmwf/atlas "develop")
[![codecov](https://codecov.io/gh/ecmwf/atlas/branch/develop/graph/badge.svg)](https://codecov.io/gh/ecmwf/atlas)

Project home: https://software.ecmwf.int/wiki/display/ATLAS
Contact: Willem Deconinck ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

set ( ${PROJECT_NAME}_VERSION_STR "0.14.0" )
set ( ${PROJECT_NAME}_VERSION_STR "0.15.0" )

2 changes: 2 additions & 0 deletions bamboo/CLANG-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ module unload fftw
module unload libemos

module switch gnu clang
export FC=/usr/local/apps/gcc/6.3.0/bin/gfortran

11 changes: 8 additions & 3 deletions bamboo/INTEL-env.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Initialise module environment if it is not
#!/bin/bash

# initialise module environment if it is not
if [[ ! $(command -v module > /dev/null 2>&1) ]]; then
. /usr/local/apps/module/init/bash
fi
# unload modules not available for intel

module unload grib_api
module unload eccodes
module unload emos
module unload fftw
module unload libemos

module switch gnu intel/16.0.3
module load cmake/3.10.2

module switch gnu intel/16.0.3
6 changes: 6 additions & 0 deletions cmake/CompileFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ if( CMAKE_CXX_COMPILER_ID MATCHES Cray )
# directives, ACC directives, or ASM intrinsics.

endif()

#ecbuild_add_cxx_flags("-Wl,-ydgemm_")
#ecbuild_add_fortran_flags("-Wl,-ydgemm_")
#ecbuild_add_cxx_flags("-fsanitize=address")
#ecbuild_add_cxx_flags("-fsanitize=thread")
#ecbuild_add_cxx_flags("-fsanitize=memory")
12 changes: 12 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,24 @@ else()
set( ATLAS_HAVE_TRANS 0 )
endif()

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

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

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

if( ATLAS_HAVE_GRIDTOOLS_STORAGE )
set( ATLAS_HAVE_GRIDTOOLS_STORAGE 1 )
else()
Expand Down
7 changes: 0 additions & 7 deletions src/apps/atlas-benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,6 @@ using namespace atlas::functionspace;
using namespace atlas::meshgenerator;
using atlas::AtlasTool;

namespace {
void usage( const std::string& tool ) {
Log::info() << "Usage: " << tool << " [OPTIONS]..." << std::endl;
}

} // namespace

//----------------------------------------------------------------------------------------------------------------------

struct TimerStats {
Expand Down
19 changes: 13 additions & 6 deletions src/atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,24 +317,28 @@ numerics/fvm/Method.cc
numerics/fvm/Nabla.h
numerics/fvm/Nabla.cc

trans/Cache.h
trans/Cache.cc
trans/Trans.h
trans/Trans.cc
trans/VorDivToUV.h
trans/VorDivToUV.cc
trans/LegendreCacheCreator.h
trans/LegendreCacheCreator.cc
trans/local/TransLocal.h
trans/local/TransLocal.cc
trans/local/LegendrePolynomials.h
trans/local/LegendrePolynomials.cc
trans/local/LegendreTransforms.h
trans/local/LegendreTransforms.cc
trans/local/FourierTransforms.h
trans/local/FourierTransforms.cc
trans/local/VorDivToUVLocal.h
trans/local/VorDivToUVLocal.cc
trans/local/LegendreCacheCreatorLocal.h
trans/local/LegendreCacheCreatorLocal.cc

)
if( ATLAS_HAVE_TRANS )
list( APPEND atlas_numerics_srcs
trans/ifs/LegendreCacheCreatorIFS.h
trans/ifs/LegendreCacheCreatorIFS.cc
trans/ifs/TransIFS.h
trans/ifs/TransIFS.cc
trans/ifs/TransIFSNodeColumns.h
Expand Down Expand Up @@ -555,7 +559,9 @@ ecbuild_add_library( TARGET atlas
PRIVATE_INCLUDES
"${CGAL_INCLUDE_DIRS}"
"${TRANSI_INCLUDE_DIRS}"
"${MPI_CXX_INCLUDE_DIRS}"

PUBLIC_INCLUDES "${FFTW_INCLUDES}"

LIBS
eckit_geometry
eckit_linalg
Expand All @@ -564,9 +570,10 @@ ecbuild_add_library( TARGET atlas
"${CGAL_LIBRARIES}"
"${TRANSI_LIBRARIES}"
"${FCKIT_LIBRARIES}"
"${FFTW_LIBRARIES}"
DEFINITIONS
${ATLAS_DEFINITIONS}
)
)

if( ATLAS_HAVE_GRIDTOOLS_STORAGE )
target_link_libraries( atlas gridtools::storage )
Expand Down
11 changes: 5 additions & 6 deletions src/atlas/array/SVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace array {
template <typename T>
class SVector {
public:

ATLAS_HOST_DEVICE
SVector() : data_( nullptr ), size_( 0 ), externally_allocated_( false ) {}

Expand All @@ -41,13 +40,13 @@ class SVector {
ATLAS_HOST_DEVICE
SVector( T* data, size_t size ) : data_( data ), size_( size ) {}

SVector( size_t N ) : data_( nullptr), size_( N ), externally_allocated_( false ) {
if( N != 0 ) {
SVector( size_t N ) : data_( nullptr ), size_( N ), externally_allocated_( false ) {
if ( N != 0 ) {
#if ATLAS_GRIDTOOLS_STORAGE_BACKEND_CUDA
cudaError_t err = cudaMallocManaged( &data_, N * sizeof( T ) );
if ( err != cudaSuccess ) throw eckit::AssertionFailed( "failed to allocate GPU memory" );
cudaError_t err = cudaMallocManaged( &data_, N * sizeof( T ) );
if ( err != cudaSuccess ) throw eckit::AssertionFailed( "failed to allocate GPU memory" );
#else
data_ = (T*)malloc( N * sizeof( T ) );
data_ = (T*)malloc( N * sizeof( T ) );
#endif
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/atlas/array/gridtools/GridToolsTraits.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "gridtools/common/generic_metafunctions/is_all_integrals.hpp"
#include "gridtools/common/generic_metafunctions/accumulate.hpp"
#include "gridtools/common/generic_metafunctions/is_all_integrals.hpp"
#include "gridtools/storage/storage-facility.hpp"

#include "atlas/array/ArrayViewDefs.h"
Expand Down
6 changes: 2 additions & 4 deletions src/atlas/array/helpers/ArraySlicer.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,13 @@ class ArraySlicer {
return idx * view.stride( i_view++ );
}

static int offset_part( View& view, int& i_view, Range range ) {
return range.start() * view.stride( i_view++ ); }
static int offset_part( View& view, int& i_view, Range range ) { return range.start() * view.stride( i_view++ ); }

static int offset_part( View& view, int& i_view, RangeAll range ) {
return range.start() * view.stride( i_view++ );
}

static int offset_part( View& view, int& i_view, RangeTo range ) {
return range.start() * view.stride( i_view++ ); }
static int offset_part( View& view, int& i_view, RangeTo range ) { return range.start() * view.stride( i_view++ ); }

static int offset_part( View& view, int& i_view, RangeFrom range ) {
return range.start() * view.stride( i_view++ );
Expand Down
Loading

0 comments on commit 6a53e43

Please sign in to comment.