-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/0.37.0: (23 commits) Update Changelog Version 0.37.0 Projection base implementation derivatives performance/encapsulation … (#185) atlas_io is an adaptor library when eckit_codec is available (#181) Fix build for configuration setting ATLAS_BITS_LOCAL=64 (#184) Revert "Avoid linker warnings on macOS about 'ld: warning: could not create compact unwind for ...'" Cosmetic: readability braces Initialize std::array values to zero because valgrind complains, even though c++ standard mandates it should be default-initialized to zero Fix bug in TraceT caused by typo where the title was wrong Avoid linker warnings on macOS about 'ld: warning: could not create compact unwind for ...' Use new LocalConfiguration baseclass functions in util::Config and util::Metadata instead of eckit::Value backdoor Removed leftover code missed in PR #175 Update `SphericalVector` to work with StructuredColumns as source functionspace. (#175) Bugfix for regional grids with ny > nx Refactoring of interpolation::method::SphericalVector and implementation of adjoint methods. (#168) Added test with empty integer sequence. Added arrayForEachDim method. Add docs build workflow Github Actions: Fix macOS MPI slots Fix for elements that might have unassigned partition via parallel Delaunay meshgenerator ...
- Loading branch information
Showing
52 changed files
with
2,015 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# note: each step is executed in own process | ||
build-steps: | ||
- git clone --depth 1 https://github.com/ecmwf/atlas-docs.git $RUNNER_TEMP/atlas-docs | ||
- sudo apt install -y -q doxygen texlive-full | ||
- | | ||
cd $RUNNER_TEMP/atlas-docs | ||
make PUBLIC=1 WITH_ECKIT=1 WITH_DOXYGEN=1 ATLAS_SOURCE_DIR=$GITHUB_WORKSPACE clean html | ||
echo "DOC_BUILD_PATH=$RUNNER_TEMP/atlas-docs/build/html" >> "$GITHUB_ENV" | ||
hosts: | ||
ecmwf-sites: | ||
space: docs | ||
name: atlas | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' | ||
|
||
workflow_dispatch: ~ | ||
|
||
jobs: | ||
publish: | ||
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-docs.yml@v2 | ||
secrets: inherit | ||
with: | ||
config: .github/docs-config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.36.0 | ||
0.37.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_subdirectory(atlas_io) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
ecbuild_add_library( TARGET atlas_io | ||
|
||
INSTALL_HEADERS ALL | ||
HEADER_DESTINATION include/atlas_io | ||
PUBLIC_LIBS eckit_codec | ||
PUBLIC_INCLUDES | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/eckit_codec_adaptor/src> | ||
|
||
SOURCES | ||
atlas-io.h | ||
Trace.cc | ||
Trace.h | ||
detail/BlackMagic.h | ||
LINKER_LANGUAGE CXX | ||
) | ||
|
||
target_compile_features( atlas_io PUBLIC cxx_std_17 ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* (C) Copyright 2020 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. | ||
*/ | ||
|
||
#include "Trace.h" | ||
|
||
#include "eckit/log/CodeLocation.h" | ||
|
||
namespace atlas { | ||
namespace io { | ||
|
||
atlas::io::Trace::Trace(const eckit::CodeLocation& loc) { | ||
for (size_t id = 0; id < TraceHookRegistry::size(); ++id) { | ||
if (TraceHookRegistry::enabled(id)) { | ||
hooks_.emplace_back(TraceHookRegistry::hook(id)(loc, loc.func())); | ||
} | ||
} | ||
} | ||
|
||
Trace::Trace(const eckit::CodeLocation& loc, const std::string& title) { | ||
for (size_t id = 0; id < TraceHookRegistry::size(); ++id) { | ||
if (TraceHookRegistry::enabled(id)) { | ||
hooks_.emplace_back(TraceHookRegistry::hook(id)(loc, title)); | ||
} | ||
} | ||
} | ||
|
||
Trace::Trace(const eckit::CodeLocation& loc, const std::string& title, const Labels& labels) { | ||
for (size_t id = 0; id < TraceHookRegistry::size(); ++id) { | ||
if (TraceHookRegistry::enabled(id)) { | ||
hooks_.emplace_back(TraceHookRegistry::hook(id)(loc, title)); | ||
} | ||
} | ||
} | ||
|
||
} // namespace io | ||
} // namespace atlas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* (C) Copyright 2020 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
|
||
#include <functional> | ||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
#include <limits> | ||
|
||
namespace eckit { | ||
class CodeLocation; | ||
} | ||
|
||
namespace atlas { | ||
namespace io { | ||
|
||
struct TraceHook { | ||
TraceHook() = default; | ||
virtual ~TraceHook() = default; | ||
}; | ||
|
||
struct TraceHookRegistry { | ||
using TraceHookBuilder = std::function<std::unique_ptr<TraceHook>(const eckit::CodeLocation&, const std::string&)>; | ||
std::vector<TraceHookBuilder> hooks; | ||
std::vector<int> enabled_; | ||
static TraceHookRegistry& instance() { | ||
static TraceHookRegistry instance; | ||
return instance; | ||
} | ||
static size_t add(TraceHookBuilder&& hook) { | ||
instance().hooks.emplace_back(hook); | ||
instance().enabled_.emplace_back(true); | ||
return instance().hooks.size() - 1; | ||
} | ||
static size_t add(const TraceHookBuilder& hook) { | ||
instance().hooks.emplace_back(hook); | ||
instance().enabled_.emplace_back(true); | ||
return instance().hooks.size() - 1; | ||
} | ||
static void enable(size_t id) { instance().enabled_[id] = true; } | ||
static void disable(size_t id) { instance().enabled_[id] = false; } | ||
static bool enabled(size_t id) { return instance().enabled_[id]; } | ||
static size_t size() { return instance().hooks.size(); } | ||
static TraceHookBuilder& hook(size_t id) { return instance().hooks[id]; } | ||
static size_t invalidId() { return std::numeric_limits<size_t>::max(); } | ||
|
||
private: | ||
TraceHookRegistry() = default; | ||
}; | ||
|
||
struct Trace { | ||
using Labels = std::vector<std::string>; | ||
Trace(const eckit::CodeLocation& loc); | ||
Trace(const eckit::CodeLocation& loc, const std::string& title); | ||
Trace(const eckit::CodeLocation& loc, const std::string& title, const Labels& labels); | ||
|
||
private: | ||
std::vector<std::unique_ptr<TraceHook>> hooks_; | ||
}; | ||
|
||
} // namespace io | ||
} // namespace atlas | ||
|
||
#include "atlas_io/detail/BlackMagic.h" | ||
|
||
#define ATLAS_IO_TRACE(...) __ATLAS_IO_TYPE(::atlas::io::Trace, Here() __ATLAS_IO_COMMA_ARGS(__VA_ARGS__)) | ||
#define ATLAS_IO_TRACE_SCOPE(...) __ATLAS_IO_TYPE_SCOPE(::atlas::io::Trace, Here() __ATLAS_IO_COMMA_ARGS(__VA_ARGS__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* | ||
* (C) Copyright 2023- 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "eckit/codec/codec.h" | ||
|
||
namespace atlas::io { | ||
|
||
// Encoding/Decoding | ||
using Metadata = ::eckit::codec::Metadata; | ||
using DataType = ::eckit::codec::DataType; | ||
using Data = ::eckit::codec::Data; | ||
using Encoder = ::eckit::codec::Encoder; | ||
using Decoder = ::eckit::codec::Decoder; | ||
|
||
// Record | ||
using Record = ::eckit::codec::Record; | ||
using RecordWriter = ::eckit::codec::RecordWriter; | ||
using RecordPrinter = ::eckit::codec::RecordPrinter; | ||
using RecordItemReader = ::eckit::codec::RecordItemReader; | ||
using RecordReader = ::eckit::codec::RecordReader; | ||
|
||
// I/O | ||
using Session = ::eckit::codec::Session; | ||
using Mode = ::eckit::codec::Mode; | ||
using Stream = ::eckit::codec::Stream; | ||
using FileStream = ::eckit::codec::FileStream; | ||
using InputFileStream = ::eckit::codec::InputFileStream; | ||
using OutputFileStream = ::eckit::codec::OutputFileStream; | ||
|
||
// Array | ||
using ArrayReference = ::eckit::codec::ArrayReference; | ||
using ArrayMetadata = ::eckit::codec::ArrayMetadata; | ||
using ArrayShape = ::eckit::codec::ArrayShape; | ||
|
||
// Exceptions | ||
using Exception = ::eckit::codec::Exception; | ||
using NotEncodable = ::eckit::codec::NotEncodable; | ||
using NotDecodable = ::eckit::codec::NotDecodable; | ||
using InvalidRecord = ::eckit::codec::InvalidRecord; | ||
using DataCorruption = ::eckit::codec::DataCorruption; | ||
using WriteError = ::eckit::codec::WriteError; | ||
|
||
// Type traits | ||
template <class T, class A> | ||
static constexpr bool is_interpretable() { | ||
return ::eckit::codec::is_interpretable<T,A>(); | ||
} | ||
template <typename T> | ||
static constexpr bool is_encodable() { | ||
return ::eckit::codec::is_encodable<T>(); | ||
} | ||
template <typename T> | ||
static constexpr bool is_decodable() { | ||
return ::eckit::codec::is_decodable<T>(); | ||
} | ||
template <typename T> | ||
static constexpr bool can_encode_metadata() { | ||
return ::eckit::codec::can_encode_metadata<T>(); | ||
} | ||
template <typename T> | ||
static constexpr bool can_encode_data() { | ||
return ::eckit::codec::can_encode_metadata<T>(); | ||
} | ||
|
||
namespace tag { | ||
using disable_static_assert = ::eckit::codec::tag::disable_static_assert; | ||
using enable_static_assert = ::eckit::codec::tag::enable_static_assert; | ||
} | ||
|
||
// Functions | ||
using ::eckit::codec::ref; | ||
using ::eckit::codec::copy; | ||
using ::eckit::codec::encode; | ||
using ::eckit::codec::decode; | ||
using ::eckit::codec::interprete; | ||
using ::eckit::codec::link; | ||
using ::eckit::codec::make_datatype; | ||
// template <typename DATATYPE> | ||
// using make_datatype = eckit::codec::make_datatype<DATATYPE>; | ||
|
||
namespace defaults { | ||
using ::eckit::codec::defaults::compression_algorithm; | ||
using ::eckit::codec::defaults::checksum_algorithm; | ||
using ::eckit::codec::defaults::checksum_read; | ||
using ::eckit::codec::defaults::checksum_write; | ||
} | ||
} | ||
|
||
#define ATLAS_IO_ASSERT(X) ASSERT(X) | ||
#define ATLAS_IO_ASSERT_MSG(X, M) ASSERT_MSG(X, M) |
Oops, something went wrong.