[odb-api] 01/14: Upstream release 0.17.4
Alastair McKinstry
mckinstry at moszumanska.debian.org
Sun Nov 5 16:23:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository odb-api.
commit 932fe09c5f55138c2f5953ff8646f6721d9523bc
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Fri Nov 3 13:26:05 2017 +0000
Upstream release 0.17.4
---
CMakeLists.txt | 8 +-
VERSION.cmake | 2 +-
.../GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin | Bin 12536 -> 0 bytes
.../GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/constexpr-N2235.cpp.bin | Bin 12576 -> 0 bytes
.../cpp11/constructor_delegate.cpp.bin | Bin 17032 -> 0 bytes
.../GreatCMakeCookOff/cpp11/cstdint.cpp.bin | Bin 12488 -> 0 bytes
.../GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin | Bin 12536 -> 0 bytes
.../cpp11/deleted_constructor.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/enable_if.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin | Bin 12600 -> 0 bytes
.../GreatCMakeCookOff/cpp11/initialization.cpp.bin | Bin 47832 -> 0 bytes
.../GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin | Bin 12536 -> 0 bytes
.../GreatCMakeCookOff/cpp11/long_double.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/long_long-N1811.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/noexcept.cpp.bin | Bin 12560 -> 0 bytes
.../GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/override.cpp.bin | Bin 17432 -> 0 bytes
.../GreatCMakeCookOff/cpp11/random_device.cpp.bin | Bin 24416 -> 0 bytes
.../cpp11/rvalue_references-N2118.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin | Bin 25232 -> 0 bytes
.../cpp11/sizeof_member-N2253.cpp.bin | Bin 12504 -> 0 bytes
.../cpp11/static_assert-N1720.cpp.bin | Bin 12504 -> 0 bytes
.../GreatCMakeCookOff/cpp11/template_alias.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/trivial_type_traits.cpp.bin | Bin 12504 -> 0 bytes
.../GreatCMakeCookOff/cpp11/type_traits.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin | Bin 24328 -> 0 bytes
.../cpp11/variadic_templates-N2555.cpp.bin | Bin 17320 -> 0 bytes
.../GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin | Bin 12536 -> 0 bytes
.../GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/constexpr-N2235.cpp.bin | Bin 12576 -> 0 bytes
.../cpp11/constructor_delegate.cpp.bin | Bin 17032 -> 0 bytes
.../GreatCMakeCookOff/cpp11/cstdint.cpp.bin | Bin 12488 -> 0 bytes
.../GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin | Bin 12536 -> 0 bytes
.../cpp11/deleted_constructor.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/enable_if.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin | Bin 12600 -> 0 bytes
.../GreatCMakeCookOff/cpp11/initialization.cpp.bin | Bin 47832 -> 0 bytes
.../GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin | Bin 12536 -> 0 bytes
.../GreatCMakeCookOff/cpp11/long_double.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/long_long-N1811.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/noexcept.cpp.bin | Bin 12560 -> 0 bytes
.../GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/override.cpp.bin | Bin 17432 -> 0 bytes
.../GreatCMakeCookOff/cpp11/random_device.cpp.bin | Bin 24416 -> 0 bytes
.../cpp11/rvalue_references-N2118.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin | Bin 25232 -> 0 bytes
.../cpp11/sizeof_member-N2253.cpp.bin | Bin 12504 -> 0 bytes
.../cpp11/static_assert-N1720.cpp.bin | Bin 12504 -> 0 bytes
.../GreatCMakeCookOff/cpp11/template_alias.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/trivial_type_traits.cpp.bin | Bin 12504 -> 0 bytes
.../GreatCMakeCookOff/cpp11/type_traits.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin | Bin 24328 -> 0 bytes
.../cpp11/variadic_templates-N2555.cpp.bin | Bin 17320 -> 0 bytes
.../GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin | Bin 12536 -> 0 bytes
.../GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/constexpr-N2235.cpp.bin | Bin 12576 -> 0 bytes
.../cpp11/constructor_delegate.cpp.bin | Bin 17032 -> 0 bytes
.../GreatCMakeCookOff/cpp11/cstdint.cpp.bin | Bin 12488 -> 0 bytes
.../GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin | Bin 12536 -> 0 bytes
.../cpp11/deleted_constructor.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/enable_if.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin | Bin 12600 -> 0 bytes
.../GreatCMakeCookOff/cpp11/initialization.cpp.bin | Bin 47832 -> 0 bytes
.../GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin | Bin 12536 -> 0 bytes
.../GreatCMakeCookOff/cpp11/long_double.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/long_long-N1811.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/noexcept.cpp.bin | Bin 12560 -> 0 bytes
.../GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/override.cpp.bin | Bin 17432 -> 0 bytes
.../GreatCMakeCookOff/cpp11/random_device.cpp.bin | Bin 24416 -> 0 bytes
.../cpp11/rvalue_references-N2118.cpp.bin | Bin 12568 -> 0 bytes
.../GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin | Bin 25232 -> 0 bytes
.../cpp11/sizeof_member-N2253.cpp.bin | Bin 12504 -> 0 bytes
.../cpp11/static_assert-N1720.cpp.bin | Bin 12504 -> 0 bytes
.../GreatCMakeCookOff/cpp11/template_alias.cpp.bin | Bin 12496 -> 0 bytes
.../cpp11/trivial_type_traits.cpp.bin | Bin 12504 -> 0 bytes
.../GreatCMakeCookOff/cpp11/type_traits.cpp.bin | Bin 12496 -> 0 bytes
.../GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin | Bin 24328 -> 0 bytes
.../cpp11/variadic_templates-N2555.cpp.bin | Bin 17320 -> 0 bytes
eckit/VERSION.cmake | 2 +-
eckit/src/eckit/cmd/KillCmd.cc | 12 +--
eckit/src/eckit/filesystem/marsfs/MarsFSFile.cc | 11 +-
eckit/src/eckit/io/DataHandle.cc | 55 +++++++++-
eckit/src/eckit/io/DataHandle.h | 14 +--
eckit/src/eckit/io/MultiHandle.cc | 6 +-
eckit/src/eckit/io/MultiHandle.h | 10 +-
eckit/src/eckit/linalg/SparseMatrix.cc | 2 +-
eckit/src/eckit/log/ProgressTimer.cc | 13 ++-
eckit/src/eckit/log/ProgressTimer.h | 5 +-
eckit/src/eckit/mpi/Request.cc | 4 +
eckit/src/eckit/mpi/Serial.cc | 98 ++++++++---------
eckit/src/eckit/mpi/SerialRequest.cc | 1 +
eckit/src/eckit/net/TCPServer.cc | 13 +--
eckit/src/eckit/net/TCPServer.h | 11 +-
eckit/src/eckit/net/TCPSocket.cc | 81 +++++++++++---
eckit/src/eckit/net/TCPSocket.h | 2 +-
eckit/src/eckit/option/FactoryOption.h | 1 +
eckit/src/eckit/option/VectorOption.h | 1 +
eckit/src/eckit/runtime/Application.cc | 9 +-
eckit/src/eckit/runtime/TaskInfo.cc | 8 +-
eckit/src/eckit/value/Value.h | 11 +-
eckit/tests/filesystem/test_restarthandle.cc | 39 ++++---
eckit/tests/io/CMakeLists.txt | 2 +-
eckit/tests/mpi/eckit_test_mpi.cc | 35 ++++++
eckit/tests/value/CMakeLists.txt | 13 ++-
metkit/VERSION.cmake | 2 +-
metkit/src/metkit/MarsExpension.cc | 6 +-
metkit/src/metkit/MarsLanguage.cc | 9 +-
metkit/src/metkit/MarsLanguage.h | 36 ++++---
metkit/src/metkit/MarsParser.cc | 4 +
metkit/src/metkit/MarsParser.h | 8 ++
metkit/src/metkit/MarsRequest.h | 2 +-
metkit/src/metkit/Parameter.cc | 3 +
metkit/src/metkit/Parameter.h | 7 +-
metkit/src/metkit/types/TypeParam.cc | 72 +++++++------
metkit/src/tools/parse-mars-request.cc | 9 +-
odb/CMakeLists.txt | 27 +++--
odb/VERSION.cmake | 2 +-
odb/src/extras/ifsaux/module/.parkind1.F90.un~ | Bin 1070 -> 0 bytes
odb/src/module/.odb_module.F90.un~ | Bin 1969 -> 0 bytes
.../.ipynb_checkpoints/Untitled-checkpoint.ipynb | 6 ++
odb_api/Untitled.ipynb | 105 ++++++++++++++++++
odb_api/VERSION.cmake | 2 +-
odb_api/bamboo/MACOSX-flags.cmake | 1 +
odb_api/regressions/CMakeLists.txt | 8 ++
odb_api/regressions/ODB-387-and-388.sh | 54 ++++++++++
odb_api/src/odb_api/Comparator.cc | 62 +++++++++--
odb_api/src/odb_api/Comparator.h | 65 +++++++++---
odb_api/src/odb_api/FileMapper.cc | 30 ++++--
odb_api/src/odb_api/IteratorProxy.h | 2 +
odb_api/src/odb_api/MetaDataReaderIterator.h | 2 +
odb_api/src/odb_api/ReaderIterator.h | 2 +
odb_api/src/odb_api/SelectIterator.h | 4 +-
odb_api/src/odb_api/data/DataHandleFactory.cc | 117 ---------------------
odb_api/src/odb_api/data/DataHandleFactory.h | 61 -----------
odb_api/src/odb_api/data/FileHandleFactory.cc | 30 ------
odb_api/src/odb_api/data/FileHandleFactory.h | 29 -----
odb_api/src/odb_api/data/HttpHandle.cc | 80 --------------
odb_api/src/odb_api/data/HttpHandle.h | 49 ---------
odb_api/src/odb_api/data/HttpHandleFactory.cc | 33 ------
odb_api/src/odb_api/data/HttpHandleFactory.h | 29 -----
odb_api/src/odb_api/data/Makefile | 2 -
odb_api/src/odb_api/data/MarsHandleFactory.cc | 85 ---------------
odb_api/src/odb_api/data/MarsHandleFactory.h | 29 -----
odb_api/src/odb_api/data/PartFileHandleFactory.cc | 39 -------
odb_api/src/odb_api/data/PartFileHandleFactory.h | 29 -----
odb_api/src/odb_api/ecml_verbs/ChunkHandler.cc | 2 -
odb_api/src/odb_api/tools/CompareTool.cc | 22 ++--
odb_api/src/odb_api/tools/CompareTool.h | 6 +-
odb_api/src/odb_api/tools/MDSetTool.cc | 5 +-
odb_api/tests/core/CMakeLists.txt | 2 +-
odb_api/tests/core/test_decode_odb.cc | 2 +-
.../dhshome/data/partitions_info_test_stage.txt | 0
.../data/partitions_info_test_stage.txt.files | 0
odb_api/tests/sql/CMakeLists.txt | 3 +-
156 files changed, 753 insertions(+), 900 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca3bea3..5b1c0d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,12 +7,12 @@ project( odb_api_bundle C CXX )
ecbuild_bundle_initialize()
ecbuild_bundle( PROJECT ecbuild STASH "ecsdk/ecbuild" TAG 2.7.3 )
-ecbuild_bundle( PROJECT eckit STASH "ecsdk/eckit" TAG 0.18.0 )
-ecbuild_bundle( PROJECT metkit STASH "ecsdk/metkit" TAG 0.7.0 )
-ecbuild_bundle( PROJECT odb_api STASH "odb/odb_api" TAG 0.17.3 )
+ecbuild_bundle( PROJECT eckit STASH "ecsdk/eckit" TAG 0.18.1 )
+ecbuild_bundle( PROJECT metkit STASH "ecsdk/metkit" TAG 0.7.1 )
+ecbuild_bundle( PROJECT odb_api STASH "odb/odb_api" TAG 0.17.4 )
if( ENABLE_ODB )
-ecbuild_bundle( PROJECT odb STASH "odb/odb" TAG 1.0.7 )
+ecbuild_bundle( PROJECT odb STASH "odb/odb" TAG 1.0.8 )
ecbuild_bundle( PROJECT odb-tools STASH "odb/odb-tools" TAG 0.17.1 )
endif()
diff --git a/VERSION.cmake b/VERSION.cmake
index fbb421b..b3ec3df 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -1 +1 @@
-set(${PROJECT_NAME}_VERSION_STR "0.17.3")
+set(${PROJECT_NAME}_VERSION_STR "0.17.4")
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin
deleted file mode 100755
index 4b0f080..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin
deleted file mode 100755
index d93817a..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin
deleted file mode 100755
index 3fc1ee8..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin
deleted file mode 100755
index c6b64f1..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin
deleted file mode 100755
index 93c3912..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin
deleted file mode 100755
index 4faa394..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin
deleted file mode 100755
index af808a8..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin
deleted file mode 100755
index c79b4b4..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin
deleted file mode 100755
index 8a2e755..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin
deleted file mode 100755
index 5ca3475..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin
deleted file mode 100755
index 40f427c..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin
deleted file mode 100755
index 81eff9a..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin
deleted file mode 100755
index 3a38df1..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin
deleted file mode 100755
index 805c08e..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin
deleted file mode 100755
index 1d4def9..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin
deleted file mode 100755
index cec584d..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin
deleted file mode 100755
index eb0f508..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin
deleted file mode 100755
index d2f0583..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin
deleted file mode 100755
index 5f57fcc..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin
deleted file mode 100755
index 8c283be..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin
deleted file mode 100755
index a8f8ee6..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin
deleted file mode 100755
index 7bcad71..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin
deleted file mode 100755
index 430fe16..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin
deleted file mode 100755
index 26ebc99..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin
deleted file mode 100755
index 7e27180..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin and /dev/null differ
diff --git a/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin b/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin
deleted file mode 100755
index b7c463b..0000000
Binary files a/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin
deleted file mode 100755
index 4b0f080..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin
deleted file mode 100755
index d93817a..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin
deleted file mode 100755
index 3fc1ee8..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin
deleted file mode 100755
index c6b64f1..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin
deleted file mode 100755
index 93c3912..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin
deleted file mode 100755
index 4faa394..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin
deleted file mode 100755
index af808a8..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin
deleted file mode 100755
index c79b4b4..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin
deleted file mode 100755
index 8a2e755..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin
deleted file mode 100755
index 5ca3475..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin
deleted file mode 100755
index 40f427c..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin
deleted file mode 100755
index 81eff9a..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin
deleted file mode 100755
index 3a38df1..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin
deleted file mode 100755
index 805c08e..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin
deleted file mode 100755
index 1d4def9..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin
deleted file mode 100755
index cec584d..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin
deleted file mode 100755
index eb0f508..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin
deleted file mode 100755
index d2f0583..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin
deleted file mode 100755
index 5f57fcc..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin
deleted file mode 100755
index 8c283be..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin
deleted file mode 100755
index a8f8ee6..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin
deleted file mode 100755
index 7bcad71..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin
deleted file mode 100755
index 430fe16..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin
deleted file mode 100755
index 26ebc99..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin
deleted file mode 100755
index 7e27180..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin and /dev/null differ
diff --git a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin b/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin
deleted file mode 100755
index b7c463b..0000000
Binary files a/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin
deleted file mode 100755
index 4b0f080..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/__func__-N2340.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin
deleted file mode 100755
index d93817a..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/auto-N2546.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin
deleted file mode 100755
index 3fc1ee8..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constexpr-N2235.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin
deleted file mode 100755
index c6b64f1..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/constructor_delegate.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin
deleted file mode 100755
index 93c3912..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/cstdint.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin
deleted file mode 100755
index 4faa394..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/decltype-N2343.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin
deleted file mode 100755
index af808a8..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/deleted_constructor.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin
deleted file mode 100755
index c79b4b4..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/enable_if.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin
deleted file mode 100755
index 8a2e755..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/explicit_cast.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin
deleted file mode 100755
index 5ca3475..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/initialization.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin
deleted file mode 100755
index 40f427c..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/lambda-N2927.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin
deleted file mode 100755
index 81eff9a..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_double.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin
deleted file mode 100755
index 3a38df1..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/long_long-N1811.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin
deleted file mode 100755
index 805c08e..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/noexcept.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin
deleted file mode 100755
index 1d4def9..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/nullptr-N2431.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin
deleted file mode 100755
index cec584d..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/override.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin
deleted file mode 100755
index eb0f508..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/random_device.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin
deleted file mode 100755
index d2f0583..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/rvalue_references-N2118.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin
deleted file mode 100755
index 5f57fcc..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/shared_ptr.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin
deleted file mode 100755
index 8c283be..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/sizeof_member-N2253.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin
deleted file mode 100755
index a8f8ee6..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/static_assert-N1720.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin
deleted file mode 100755
index 7bcad71..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/template_alias.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin
deleted file mode 100755
index 430fe16..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/trivial_type_traits.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin
deleted file mode 100755
index 26ebc99..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/type_traits.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin
deleted file mode 100755
index 7e27180..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/unique_ptr.cpp.bin and /dev/null differ
diff --git a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin b/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin
deleted file mode 100755
index b7c463b..0000000
Binary files a/ecbuild/share/ecbuild/cmake/contrib/GreatCMakeCookOff/cpp11/variadic_templates-N2555.cpp.bin and /dev/null differ
diff --git a/eckit/VERSION.cmake b/eckit/VERSION.cmake
index 7b33880..d143742 100644
--- a/eckit/VERSION.cmake
+++ b/eckit/VERSION.cmake
@@ -1 +1 @@
-set( ${PROJECT_NAME}_VERSION_STR "0.18.0" )
+set( ${PROJECT_NAME}_VERSION_STR "0.18.1" )
diff --git a/eckit/src/eckit/cmd/KillCmd.cc b/eckit/src/eckit/cmd/KillCmd.cc
index 52fcec3..1d04535 100644
--- a/eckit/src/eckit/cmd/KillCmd.cc
+++ b/eckit/src/eckit/cmd/KillCmd.cc
@@ -14,21 +14,19 @@
#include "eckit/cmd/KillCmd.h"
#include "eckit/runtime/Monitor.h"
-//-----------------------------------------------------------------------------
+
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
KillCmd::KillCmd() : CmdResource("kill") {
}
-//-----------------------------------------------------------------------------
KillCmd::~KillCmd() {
}
-//-----------------------------------------------------------------------------
void KillCmd::execute(std::istream&, std::ostream& out, CmdArg& arg) {
@@ -62,7 +60,6 @@ void KillCmd::execute(std::istream&, std::ostream& out, CmdArg& arg) {
}
}
-//-----------------------------------------------------------------------------
void KillCmd::kill(pid_t pid, std::ostream& out) const {
static pid_t me = ::getpid();
@@ -76,21 +73,18 @@ void KillCmd::kill(pid_t pid, std::ostream& out) const {
}
}
-//-----------------------------------------------------------------------------
void KillCmd::help(std::ostream& out) const {
}
-//-----------------------------------------------------------------------------
Arg KillCmd::usage(const std::string& cmd) const {
return Arg("<name>", Arg::text) | Arg("<pid>", Arg::number) | Arg("<task>", Arg::number);
}
-//-----------------------------------------------------------------------------
static KillCmd killCmd;
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
} // namespace eckit
diff --git a/eckit/src/eckit/filesystem/marsfs/MarsFSFile.cc b/eckit/src/eckit/filesystem/marsfs/MarsFSFile.cc
index d3d795c..58f1a27 100644
--- a/eckit/src/eckit/filesystem/marsfs/MarsFSFile.cc
+++ b/eckit/src/eckit/filesystem/marsfs/MarsFSFile.cc
@@ -78,7 +78,16 @@ long MarsFSFile::read(void* buffer, long len) {
// Timer t("MarsFSFile::read() hashing");
std::string remoteHash;
s >> remoteHash;
- ASSERT(hash_->compute(buffer, size) == remoteHash);
+
+ const std::string localHash = hash_->compute(buffer, size);
+
+ if(localHash != remoteHash) {
+ std::ostringstream msg;
+ msg << "Mismatch of hash while reading from MarsFS:"
+ << " expected remote hash " << remoteHash
+ << " local computed hash " << localHash;
+ throw eckit::BadValue(msg.str(), Here());
+ }
}
return size;
}
diff --git a/eckit/src/eckit/io/DataHandle.cc b/eckit/src/eckit/io/DataHandle.cc
index f866c07..d9d168b 100644
--- a/eckit/src/eckit/io/DataHandle.cc
+++ b/eckit/src/eckit/io/DataHandle.cc
@@ -543,20 +543,65 @@ static int closefn(void *data) {
#ifdef EC_HAVE_FOPENCOOKIE
static ssize_t _read(void *cookie, char *buf, size_t size) {
- return readfn(cookie, buf, size);
+
+ try {
+
+ return readfn(cookie, buf, size);
+
+ } catch(std::exception& e) {
+
+ // Catch all exceptions on a possible C/C++ boundary
+ eckit::Log::error() << "Exception caught in wrapped DataHandle read: " << e.what();
+ // See man fopencookie. Returns -1 on error
+ return -1;
+ }
}
static ssize_t _write(void *cookie, const char *buf, size_t size) {
- return writefn(cookie, buf, size);
+
+ try {
+
+ return writefn(cookie, buf, size);
+
+ } catch(std::exception& e) {
+
+ // Catch all exceptions on a possible C/C++ boundary
+ eckit::Log::error() << "Exception caught in wrapped DataHandle write: " << e.what();
+ // See man fopencookie. Returns 0 on error
+ return 0;
+ }
}
static int _seek(void *cookie, off64_t *offset, int whence) {
- *offset = seekfn(cookie, *offset, whence);
- return *offset >= 0 ? 0 : -1;
+
+ try {
+
+ *offset = seekfn(cookie, *offset, whence);
+ return *offset >= 0 ? 0 : -1;
+
+ } catch (std::exception& e) {
+
+ // Catch all exceptions on a possible C/C++ boundary, and return an invalid write size.
+ eckit::Log::error() << "Exception caught in wrapped DataHandle seek: " << e.what();
+ // See man fopencookie. Returns -1 on error
+ return -1;
+
+ }
}
static int _close(void *cookie) {
- return closefn(cookie);
+
+ try {
+
+ return closefn(cookie);
+
+ } catch (std::exception& e) {
+
+ // Catch all exceptions on a possible C/C++ boundary, and return an invalid write size.
+ eckit::Log::error() << "Exception caught in wrapped DataHandle close: " << e.what();
+ // See man fopencookie. Returns EOF on error
+ return EOF;
+ }
}
FILE* DataHandle::openf(const char* mode, bool delete_on_close) {
diff --git a/eckit/src/eckit/io/DataHandle.h b/eckit/src/eckit/io/DataHandle.h
index b319d77..f95d014 100644
--- a/eckit/src/eckit/io/DataHandle.h
+++ b/eckit/src/eckit/io/DataHandle.h
@@ -8,8 +8,8 @@
* does it submit to any jurisdiction.
*/
-// File DataHandle.h
-// Baudouin Raoult - ECMWF May 96
+/// @author Baudouin Raoult
+/// @date May 96
#ifndef eckit_DataHandle_h
#define eckit_DataHandle_h
@@ -22,11 +22,10 @@
#include "eckit/serialisation/Streamable.h"
#include "eckit/io/TransferWatcher.h"
-//-----------------------------------------------------------------------------
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
class RestartTransfer {
Offset from_;
@@ -35,7 +34,7 @@ public:
const Offset& from() const { return from_; }
};
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
class DataHandle : public Streamable {
public:
@@ -137,7 +136,7 @@ private:
};
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
class AutoClose {
DataHandle& handle_;
@@ -156,7 +155,8 @@ Streamable* Reanimator<DataHandle>::ressucitate(Stream& s) const
#endif
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
+
} // namespace eckit
diff --git a/eckit/src/eckit/io/MultiHandle.cc b/eckit/src/eckit/io/MultiHandle.cc
index 4c8b106..8e167f6 100644
--- a/eckit/src/eckit/io/MultiHandle.cc
+++ b/eckit/src/eckit/io/MultiHandle.cc
@@ -15,11 +15,10 @@
#include "eckit/config/Resource.h"
-//-----------------------------------------------------------------------------
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
ClassSpec MultiHandle::classSpec_ = {&DataHandle::classSpec(), "MultiHandle",};
Reanimator<MultiHandle> MultiHandle::reanimator_;
@@ -415,7 +414,6 @@ std::string MultiHandle::title() const
return os.str();
}
-//-----------------------------------------------------------------------------
bool MultiHandle::compress(bool sorted) {
@@ -491,6 +489,6 @@ bool MultiHandle::compress(bool sorted) {
}
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
} // namespace eckit
diff --git a/eckit/src/eckit/io/MultiHandle.h b/eckit/src/eckit/io/MultiHandle.h
index 0dfef13..b03343a 100644
--- a/eckit/src/eckit/io/MultiHandle.h
+++ b/eckit/src/eckit/io/MultiHandle.h
@@ -8,19 +8,19 @@
* does it submit to any jurisdiction.
*/
-// File io/MultiHandle.h
-// Manuel Fuentes - ECMWF Jul 96
+/// @author Baudouin Raoult
+/// @date May 96
#ifndef eckit_filesystem_MultiHandle_h
#define eckit_filesystem_MultiHandle_h
#include "eckit/io/DataHandle.h"
-//-----------------------------------------------------------------------------
+
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
class MultiHandle : public DataHandle {
public:
@@ -106,7 +106,7 @@ private:
};
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
} // namespace eckit
diff --git a/eckit/src/eckit/linalg/SparseMatrix.cc b/eckit/src/eckit/linalg/SparseMatrix.cc
index 9e39367..dbe62cf 100644
--- a/eckit/src/eckit/linalg/SparseMatrix.cc
+++ b/eckit/src/eckit/linalg/SparseMatrix.cc
@@ -121,7 +121,7 @@ SparseMatrix::SparseMatrix(Size rows, Size cols, const std::vector<Triplet>& tri
// triplets are ordered by rows
ASSERT( it->row() >= row );
ASSERT( it->row() < shape_.rows_ );
- ASSERT( it->col() >= 0 );
+ // ASSERT( it->col() >= 0 ); // useless comparison with unsigned int
ASSERT( it->col() < shape_.cols_ );
// start a new row
diff --git a/eckit/src/eckit/log/ProgressTimer.cc b/eckit/src/eckit/log/ProgressTimer.cc
index 0f9084f..3f7ec17 100644
--- a/eckit/src/eckit/log/ProgressTimer.cc
+++ b/eckit/src/eckit/log/ProgressTimer.cc
@@ -40,13 +40,13 @@ ProgressTimer::ProgressTimer(const std::string& name, size_t limit, const std::s
{
}
-void ProgressTimer::operator++()
+ProgressTimer& ProgressTimer::operator++()
{
- bool doOutput = counter_ && (
+ hasOutput_ = counter_ && (
(progressCounted_ > 0 && counter_ % progressCounted_ == 0) ||
(progressTimed_ > 0. && lastTime_ + progressTimed_ < elapsed()) );
- if (doOutput) {
+ if (hasOutput_) {
lastTime_ = elapsed();
double rate = counter_ / lastTime_;
output() << eckit::Plural(counter_, unit_) << " in " << eckit::Seconds(lastTime_)
@@ -58,6 +58,13 @@ void ProgressTimer::operator++()
if (counter_ < limit_) {
++counter_;
}
+
+ return *this;
+}
+
+eckit::ProgressTimer::operator bool() const
+{
+ return hasOutput_;
}
//----------------------------------------------------------------------------------------------------------------------
diff --git a/eckit/src/eckit/log/ProgressTimer.h b/eckit/src/eckit/log/ProgressTimer.h
index 25f740e..cd98a5e 100644
--- a/eckit/src/eckit/log/ProgressTimer.h
+++ b/eckit/src/eckit/log/ProgressTimer.h
@@ -40,7 +40,9 @@ public:
/// @param o output stream
ProgressTimer(const std::string& name, size_t limit, const std::string& unit, double progressTimed = 10., std::ostream& o = Log::info());
- void operator++();
+ ProgressTimer& operator++();
+
+ operator bool() const;
private: // members
@@ -52,6 +54,7 @@ private: // members
size_t counter_;
double lastTime_;
+ bool hasOutput_;
};
//-----------------------------------------------------------------------------
diff --git a/eckit/src/eckit/mpi/Request.cc b/eckit/src/eckit/mpi/Request.cc
index 7b6a77e..6966003 100644
--- a/eckit/src/eckit/mpi/Request.cc
+++ b/eckit/src/eckit/mpi/Request.cc
@@ -64,6 +64,10 @@ int Request::request() const {
return content_->request();
}
+void Request::print(std::ostream& out) const {
+ content_->print(out);
+}
+
RequestContent::~RequestContent() {
}
diff --git a/eckit/src/eckit/mpi/Serial.cc b/eckit/src/eckit/mpi/Serial.cc
index a795ef4..e71f396 100644
--- a/eckit/src/eckit/mpi/Serial.cc
+++ b/eckit/src/eckit/mpi/Serial.cc
@@ -31,41 +31,6 @@ namespace mpi {
//----------------------------------------------------------------------------------------------------------------------
-class SerialSendReceive : private NonCopyable {
-public:
-
- static SerialSendReceive& instance() {
- static SerialSendReceive inst;
- return inst;
- }
-
- void addSend( const Request& send_request )
- {
- send_queue_.push_back(send_request);
- }
-
- Request nextSend()
- {
- Request send = send_queue_.front();
- send_queue_.pop_front();
- return send;
- }
-
- void lock() { mutex_.lock(); }
- void unlock() { mutex_.unlock(); }
-
-private:
-
- SerialSendReceive() {}
- ~SerialSendReceive() {}
-
- std::deque<Request> send_queue_;
-
- eckit::Mutex mutex_; ///< instance() creation is thread safe, but access thereon isn't so we need a mutex
-};
-
-
-
class SerialRequestPool : private NonCopyable {
public:
@@ -76,7 +41,7 @@ public:
Request createSendRequest(const void* buffer, size_t count, Data::Code type, int tag) {
Request r = registerRequest(new SendRequest(buffer,count,type,tag));
- send_[tag] = r;
+ send_[tag].push_back(r);
return r;
}
@@ -89,13 +54,37 @@ public:
return requests_[request];
}
- Request sendRequest(int tag) {
- return send_[tag];
+ SendRequest& matchingSendRequest( const ReceiveRequest& req ) {
+ return matchingSendRequest(req.tag());
+ }
+
+ SendRequest& matchingSendRequest( int tag ) {
+ Request send;
+ if( tag == anyTag() ) {
+ std::map<int,std::deque<Request> >::iterator it = send_.begin();
+ for(; it != send_.end(); ++ it) {
+ std::deque<Request>& sends = it->second;
+ if( sends.size() ) {
+ Request send = sends.front();
+ sends.pop_front();
+ return send.as<SendRequest>();
+ }
+ }
+ throw eckit::Exception("No send requests available",Here());
+ } else {
+ ASSERT( send_.count(tag) > 0 );
+ ASSERT( send_[tag].size() );
+ Request send = send_[tag].front();
+ send_[tag].pop_front();
+ return send.as<SendRequest>();
+ }
}
void lock() { mutex_.lock(); }
void unlock() { mutex_.unlock(); }
+ static int anyTag() { return std::numeric_limits<int>::max(); }
+
private:
Request registerRequest(SerialRequest* request) {
@@ -117,7 +106,7 @@ private:
std::vector<Request> requests_;
- std::map<int,Request> send_;
+ std::map<int, std::deque<Request> > send_;
int n_;
@@ -171,9 +160,7 @@ Status Serial::wait(Request& req) const {
ReceiveRequest& recvReq = req.as<ReceiveRequest>();
- int tag = recvReq.tag();
-
- SendRequest& sendReq = SerialRequestPool::instance().sendRequest(tag).as<SendRequest>();
+ SendRequest& sendReq = SerialRequestPool::instance().matchingSendRequest(recvReq);
::memcpy( recvReq.buffer(), sendReq.buffer(), sendReq.count() * dataSize[sendReq.type()] );
@@ -205,7 +192,7 @@ int Serial::anySource() const {
}
int Serial::anyTag() const {
- return std::numeric_limits<int>::max();
+ return SerialRequestPool::anyTag();
}
size_t Serial::getCount(Status& st, Data::Code) const {
@@ -265,12 +252,11 @@ void Serial::allToAllv(const void* sendbuf, const int sendcounts[], const int[],
memcpy( recvbuf, sendbuf, sendcounts[0] * dataSize[type] );
}
-Status Serial::receive(void* recv, size_t count, Data::Code type, int source, int tag) const
+Status Serial::receive(void* recv, size_t count, Data::Code type, int /*source*/, int tag) const
{
- AutoLock<SerialSendReceive> lock(SerialSendReceive::instance());
-
- Request send_request = SerialSendReceive::instance().nextSend();
- SendRequest& send = send_request.as<SendRequest>();
+ AutoLock<SerialRequestPool> lock(SerialRequestPool::instance());
+ ReceiveRequest recv_request( recv, count, type, tag );
+ SendRequest& send = SerialRequestPool::instance().matchingSendRequest(recv_request);
if( tag != anyTag() ) {
ASSERT( tag == send.tag() );
}
@@ -286,25 +272,25 @@ Status Serial::receive(void* recv, size_t count, Data::Code type, int source, in
return Status(st);
}
-void Serial::send(const void* send, size_t count, Data::Code type, int dest, int tag) const
+void Serial::send(const void* send, size_t count, Data::Code type, int /*dest*/, int tag) const
{
- AutoLock<SerialSendReceive> lock(SerialSendReceive::instance());
- SerialSendReceive::instance().addSend( Request( new SendRequest(send,count,type,tag) ) );
+ AutoLock<SerialRequestPool> lock(SerialRequestPool::instance());
+ SerialRequestPool::instance().createSendRequest(send,count,type,tag);
}
-void Serial::synchronisedSend(const void* send, size_t count, Data::Code type, int dest, int tag) const
+void Serial::synchronisedSend(const void* send, size_t count, Data::Code type, int /*dest*/, int tag) const
{
// TODO: see if this is good enough
- AutoLock<SerialSendReceive> lock(SerialSendReceive::instance());
- SerialSendReceive::instance().addSend( Request( new SendRequest(send,count,type,tag) ) );
+ AutoLock<SerialRequestPool> lock(SerialRequestPool::instance());
+ SerialRequestPool::instance().createSendRequest(send,count,type,tag);
}
-Request Serial::iReceive(void* recv, size_t count, Data::Code type, int source, int tag) const {
+Request Serial::iReceive(void* recv, size_t count, Data::Code type, int /*source*/, int tag) const {
AutoLock<SerialRequestPool> lock(SerialRequestPool::instance());
return SerialRequestPool::instance().createReceiveRequest(recv,count,type,tag);
}
-Request Serial::iSend(const void* send, size_t count, Data::Code type, int dest, int tag) const {
+Request Serial::iSend(const void* send, size_t count, Data::Code type, int /*dest*/, int tag) const {
AutoLock<SerialRequestPool> lock(SerialRequestPool::instance());
return SerialRequestPool::instance().createSendRequest(send,count,type,tag);
}
diff --git a/eckit/src/eckit/mpi/SerialRequest.cc b/eckit/src/eckit/mpi/SerialRequest.cc
index 7f8d4df..dccfee8 100644
--- a/eckit/src/eckit/mpi/SerialRequest.cc
+++ b/eckit/src/eckit/mpi/SerialRequest.cc
@@ -28,6 +28,7 @@ SerialRequest::~SerialRequest() {
void SerialRequest::print(std::ostream& os) const {
os << "SerialRequest("
+ << "tag->" << tag()
<< ")";
}
diff --git a/eckit/src/eckit/net/TCPServer.cc b/eckit/src/eckit/net/TCPServer.cc
index 9fe4f68..3764f6e 100644
--- a/eckit/src/eckit/net/TCPServer.cc
+++ b/eckit/src/eckit/net/TCPServer.cc
@@ -17,18 +17,19 @@
#include "eckit/io/Select.h"
#include "eckit/net/TCPServer.h"
-//-----------------------------------------------------------------------------
+
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
-TCPServer::TCPServer(int port, const std::string& addr):
+TCPServer::TCPServer(int port, const std::string& addr, bool reusePort):
TCPSocket(),
port_(port),
listen_(-1),
addr_(addr),
- closeExec_(true)
+ closeExec_(true),
+ reusePort_(reusePort)
{
}
@@ -110,7 +111,7 @@ void TCPServer::bind()
{
if (listen_ == -1)
{
- listen_ = newSocket(port_);
+ listen_ = newSocket(port_, reusePort_);
::listen(listen_, 5);
//if(!willFork_)
@@ -139,7 +140,7 @@ void TCPServer::print(std::ostream& s) const {
s << "]";
}
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
} // namespace eckit
diff --git a/eckit/src/eckit/net/TCPServer.h b/eckit/src/eckit/net/TCPServer.h
index 13a97d7..7f7d01d 100644
--- a/eckit/src/eckit/net/TCPServer.h
+++ b/eckit/src/eckit/net/TCPServer.h
@@ -8,19 +8,19 @@
* does it submit to any jurisdiction.
*/
-// File TCPServer.h
-// Baudouin Raoult - ECMWF Jun 96
+/// @author Baudouin Raoult
+/// @date Jun 96
#ifndef eckit_TCPServer_h
#define eckit_TCPServer_h
#include "eckit/net/TCPSocket.h"
-//-----------------------------------------------------------------------------
+
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
// AIX #define accept to naccept. It took me a while :-(
// this clashes with the method accept()
@@ -32,7 +32,7 @@ public:
// -- Contructors
- TCPServer(int port = 0, const std::string& addr = "");
+ TCPServer(int port = 0, const std::string& addr = "", bool reusePort = false);
// -- Destructor
@@ -88,6 +88,7 @@ private:
virtual std::string bindingAddress() const;
bool closeExec_;
+ bool reusePort_;
};
diff --git a/eckit/src/eckit/net/TCPSocket.cc b/eckit/src/eckit/net/TCPSocket.cc
index c68e9c0..d0c5045 100644
--- a/eckit/src/eckit/net/TCPSocket.cc
+++ b/eckit/src/eckit/net/TCPSocket.cc
@@ -23,6 +23,7 @@
#include "eckit/os/AutoAlarm.h"
#include "eckit/thread/AutoLock.h"
#include "eckit/log/Log.h"
+#include "eckit/exception/Exceptions.h"
#include "eckit/thread/Once.h"
#include "eckit/thread/Mutex.h"
#include "eckit/config/Resource.h"
@@ -36,11 +37,11 @@
typedef void (*sighandler_t) (int);
#endif
-//-----------------------------------------------------------------------------
+
namespace eckit {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
static in_addr none = { INADDR_NONE };
@@ -123,6 +124,8 @@ long TCPSocket::write(const void* buf, long length) {
if (length == 0)
return ::write(socket_, buf, length);
+ size_t requested = length;
+
if (debug_) {
if (mode_ != 'w') {
@@ -160,14 +163,43 @@ long TCPSocket::write(const void* buf, long length) {
while (length > 0)
{
- long len = ::write(socket_, p, length);
+ long len = 0;
+ size_t retries = 0;
+ const size_t maxTCPSocketRetries = 10 * 60; // 10 minutes
+
+ errno = 0;
+ len = ::write(socket_, p, length);
+
+ while (len == 0) {
+
+ Log::warning() << "Socket write returns zero (" << *this << ")" << Log::syserr << std::endl;
+
+ if (++retries >= maxTCPSocketRetries) {
+ Log::warning() << "Giving up." << std::endl;
+ break;
+ }
+
+ Log::warning() << "Sleeping...." << std::endl;
+ ::sleep(1);
+
+ errno = 0;
+ len = ::write(socket_, p, length);
+
+ }
if (len < 0) {
- Log::error() << "Socket write" << Log::syserr << std::endl;
+ Log::error() << "Socket write failed (" << *this << ")" << Log::syserr << std::endl;
return len;
}
- if (len == 0) return sent;
+ if (len == 0) {
+ Log::warning() << "Socket write incomplete (" << *this << ") "
+ << sent
+ << " out of "
+ << requested
+ << std::endl;
+ return sent;
+ }
sent += len;
length -= len;
@@ -182,6 +214,8 @@ long TCPSocket::read(void *buf, long length)
{
if (length <= 0 ) return length;
+ size_t requested = length;
+
static bool useSelectOnTCPSocket = Resource<bool>("useSelectOnTCPSocket", false);
long received = 0;
char *p = (char*)buf;
@@ -213,8 +247,7 @@ long TCPSocket::read(void *buf, long length)
// Time out, write 0 bytes to check that peer is alive
if (::write(socket_, 0, 0) != 0)
{
- Log::error() << "TCPSocket::read write" <<
- Log::syserr << std::endl;
+ Log::error() << "TCPSocket::read write" << Log::syserr << std::endl;
return -1;
}
more = true;
@@ -237,12 +270,18 @@ long TCPSocket::read(void *buf, long length)
}
if (len < 0) {
- Log::error() << "Socket read" << Log::syserr << std::endl;
+ Log::error() << "Socket read failed (" << *this << ")" << Log::syserr << std::endl;
return len;
}
- if (len == 0) return received;
-
+ if (len == 0) {
+ Log::warning() << "Socket read incomplete (" << *this << ") "
+ << received
+ << " out of "
+ << requested
+ << std::endl;
+ return received;
+ }
if (debug_) {
@@ -468,7 +507,7 @@ TCPSocket& TCPClient::connect(const std::string& remote, int port, int retries,
}
-int TCPSocket::newSocket(int port)
+int TCPSocket::newSocket(int port, bool reusePort)
{
localPort_ = port;
@@ -487,11 +526,14 @@ int TCPSocket::newSocket(int port)
Log::warning() << "setsockopt SO_KEEPALIVE" << Log::syserr << std::endl;
+ if (reusePort) {
#ifdef SO_REUSEPORT
- flg = 1 ;
- if (::setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &flg, sizeof(flg)) < 0)
- Log::warning() << "setsockopt SO_REUSEPORT" << Log::syserr << std::endl;
+ flg = 1;
+ SYSCALL(::setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &flg, sizeof(flg)));
+#else
+ NOTIMP;
#endif
+ }
#ifdef SO_LINGER
linger ling;
@@ -580,6 +622,15 @@ int TCPSocket::newSocket(int port)
socklen_t len = sizeof(sin);
#endif
::getsockname(s, reinterpret_cast<sockaddr*>(&sin), &len);
+ if (localPort_ != 0) {
+ int gotPort = ntohs(sin.sin_port);
+ if (localPort_ != gotPort) {
+ std::ostringstream msg;
+ msg << "TCPSocket::newSocket() asking for port " << localPort_ << " but got " << gotPort << std::endl;
+ throw eckit::SeriousBug(msg.str(), Here());
+ }
+ }
+
localPort_ = ntohs(sin.sin_port);
localAddr_ = sin.sin_addr;
localHost_ = addrToHost(sin.sin_addr);
@@ -798,7 +849,7 @@ std::ostream& operator<<(std::ostream& s, in_addr a) {
}
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
} // namespace eckit
diff --git a/eckit/src/eckit/net/TCPSocket.h b/eckit/src/eckit/net/TCPSocket.h
index 5be192e..3e83965 100644
--- a/eckit/src/eckit/net/TCPSocket.h
+++ b/eckit/src/eckit/net/TCPSocket.h
@@ -125,7 +125,7 @@ protected:
// -- Methods
- int newSocket(int);
+ int newSocket(int, bool reusePort = false);
virtual void print(std::ostream& s) const;
diff --git a/eckit/src/eckit/option/FactoryOption.h b/eckit/src/eckit/option/FactoryOption.h
index 86aec5e..e461963 100644
--- a/eckit/src/eckit/option/FactoryOption.h
+++ b/eckit/src/eckit/option/FactoryOption.h
@@ -97,6 +97,7 @@ class FactoryOption : public Option {
// -- Overridden methods
+ using Option::set;
virtual void set(const std::string& value, Configured&) const;
virtual void copy(const Configuration& from, Configured& to) const;
diff --git a/eckit/src/eckit/option/VectorOption.h b/eckit/src/eckit/option/VectorOption.h
index 444fa2e..77ab2b5 100644
--- a/eckit/src/eckit/option/VectorOption.h
+++ b/eckit/src/eckit/option/VectorOption.h
@@ -97,6 +97,7 @@ class VectorOption : public Option {
// -- Overridden methods
+ using Option::set;
virtual void set(const std::string& value, Configured&) const;
virtual void copy(const Configuration& from, Configured& to) const;
diff --git a/eckit/src/eckit/runtime/Application.cc b/eckit/src/eckit/runtime/Application.cc
index 59170d7..7717bec 100644
--- a/eckit/src/eckit/runtime/Application.cc
+++ b/eckit/src/eckit/runtime/Application.cc
@@ -107,11 +107,10 @@ LogTarget* Application::createDebugLogTarget() const {
}
void Application::start() {
- int status = 0;
- displayName_ = Resource<std::string>("-name", name_);
+ int status = 0;
- Log::info() << "** Start of " << displayName_ << " ** pid is " << getpid() << std::endl;
+ Log::info() << "** Start of " << displayName() << " ** pid is " << getpid() << std::endl;
try {
Log::status() << "Running" << std::endl;
@@ -121,10 +120,10 @@ void Application::start() {
} catch (std::exception& e) {
status = 1;
Log::error() << "** " << e.what() << " Caught in " << Here() << std::endl;
- Log::error() << "** Exception terminates " << displayName_ << std::endl;
+ Log::error() << "** Exception terminates " << displayName() << std::endl;
}
- Log::info() << "** End of " << displayName_ << " (" << argv(0) << ") **" << std::endl;
+ Log::info() << "** End of " << displayName() << " (" << argv(0) << ") **" << std::endl;
::exit(status);
}
diff --git a/eckit/src/eckit/runtime/TaskInfo.cc b/eckit/src/eckit/runtime/TaskInfo.cc
index 633e7c7..34a474d 100644
--- a/eckit/src/eckit/runtime/TaskInfo.cc
+++ b/eckit/src/eckit/runtime/TaskInfo.cc
@@ -36,10 +36,10 @@ TaskInfo::TaskInfo()
pos_ = 0;
start_ = ::time(0);
if (Main::ready()) {
- strncpy(name_, Main::instance().name().c_str(), sizeof(name_) - 1);
- strcpy(kind_, name_);
- strcpy(application_, name_);
- strcpy(status_, "Starting");
+ ::strncpy(name_, Main::instance().displayName().c_str(), sizeof(name_) - 1);
+ ::strncpy(kind_, Main::instance().name().c_str(), sizeof(kind_) - 1);
+ ::strncpy(application_, Main::instance().name().c_str(), sizeof(application_) - 1);
+ ::strcpy(status_, "Starting");
}
show_ = true;
start(0, 0);
diff --git a/eckit/src/eckit/value/Value.h b/eckit/src/eckit/value/Value.h
index b6f434e..8cc156f 100644
--- a/eckit/src/eckit/value/Value.h
+++ b/eckit/src/eckit/value/Value.h
@@ -383,23 +383,26 @@ Value toValue(const std::map<K, V>& l) {
}
#ifdef __GNUC__
-#define DEPRECATED __attribute__((deprecated))
+#define ECKIT_DEPRECATED __attribute__((deprecated))
#else
-#define DEPRECATED /**/
+#define ECKIT_DEPRECATED /**/
#endif
template < typename T >
-DEPRECATED
+ECKIT_DEPRECATED
Value makeVectorValue(const std::vector<T>& v) {
return toValue(v);
}
template < typename T >
-DEPRECATED
+ECKIT_DEPRECATED
Value makeVectorValue(const std::list<T>& v) {
return toValue(v);
}
+
+#undef ECKIT_DEPRECATED
+
//----------------------------------------------------------------------------------------------------------------------
template< typename T >
diff --git a/eckit/tests/filesystem/test_restarthandle.cc b/eckit/tests/filesystem/test_restarthandle.cc
index ab890a3..9a65207 100644
--- a/eckit/tests/filesystem/test_restarthandle.cc
+++ b/eckit/tests/filesystem/test_restarthandle.cc
@@ -8,6 +8,8 @@
* does it submit to any jurisdiction.
*/
+#include <algorithm>
+
#include "eckit/config/Resource.h"
#include "eckit/filesystem/PathName.h"
#include "eckit/io/MultiHandle.h"
@@ -28,16 +30,18 @@ using namespace eckit::testing;
namespace eckit {
namespace test {
-//-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
class Restart : public DataHandle, public HandleHolder {
Length total_;
- Length next_;
+ Length nextStop_;
public:
+ static size_t increment() { return 77773; } // a prime larger than 4 KiB
+
Restart(DataHandle* h): HandleHolder(h), total_(0) {
- next_ = 4 * 1024 * 1024 + 1;
+ nextStop_ = increment();
}
virtual Length openForRead() {
@@ -57,9 +61,17 @@ public:
}
virtual long write(const void* buffer, long len) {
- if (total_ > next_) {
- next_ += len + 4 * 1024 * 1024 + 1;
- throw RestartTransfer(total_ - Length(12345));
+ if (total_ > nextStop_) {
+
+ nextStop_ += len + increment();
+
+ // 67108879 is first prime after 64*1024*1024 -- the default buffer size in saveInto()
+ // this way we test that we roll back to data position before the whole buffer size
+ Offset backTo = std::max(total_ - Length(67108879), (long long int) 0);
+
+ std::cout << "backTo " << backTo << " nextStop " << nextStop_ << std::endl;
+
+ throw RestartTransfer(backTo);
}
total_ += len;
return handle().write(buffer, len);
@@ -130,10 +142,9 @@ void TestMHHandle::test_write()
const char buf1[] = "abcdefghijklmnopqrstuvwxyz";
const char buf2[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- const size_t N = 1024 * 1024 * 64;
-
- // setformat(std::cout, Log::fullFormat);
+ const size_t N = 1024 * 1024 * 10;
+ // create first file
{
Buffer b1(N * 26);
@@ -152,6 +163,7 @@ void TestMHHandle::test_write()
std::cout << path1_ << std::endl;
}
+ // create second file
{
Buffer b2(N * 26);
char *p = b2;
@@ -171,10 +183,9 @@ void TestMHHandle::test_write()
}
- std::cout << "-----" << std::endl;
+ std::cout << "-------------------------------------------------------" << std::endl;
MultiHandle mh1;
-
{
for (int i = 0; i < 26; i++) {
@@ -184,13 +195,11 @@ void TestMHHandle::test_write()
}
- std::cout << mh1 << std::endl;
- std::cout << mh1.estimate() << std::endl;
+ std::cout << mh1 << " " << mh1.estimate() << std::endl;
// mh1.compress();
- // std::cout << mh1 << std::endl;
- // std::cout << mh1.estimate() << std::endl;
+ // std::cout << mh1 << " " << mh1.estimate() << std::endl;
Restart f3(path3_.fileHandle());
mh1.saveInto(f3);
diff --git a/eckit/tests/io/CMakeLists.txt b/eckit/tests/io/CMakeLists.txt
index 4fceb80..8b2eda4 100644
--- a/eckit/tests/io/CMakeLists.txt
+++ b/eckit/tests/io/CMakeLists.txt
@@ -8,7 +8,7 @@ ecbuild_add_test( TARGET eckit_test_datablob
ecbuild_add_test( TARGET eckit_test_urlhandle
SOURCES test_urlhandle.cc
- CONDITION ECKIT_HAVE_CURL
+ CONDITION ECKIT_HAVE_CURL AND OFF
LIBS eckit )
ecbuild_add_test( TARGET eckit_test_circularbuffer
diff --git a/eckit/tests/mpi/eckit_test_mpi.cc b/eckit/tests/mpi/eckit_test_mpi.cc
index 831c276..919833a 100644
--- a/eckit/tests/mpi/eckit_test_mpi.cc
+++ b/eckit/tests/mpi/eckit_test_mpi.cc
@@ -482,6 +482,41 @@ CASE( "test_nonblocking_send_receive" )
//----------------------------------------------------------------------------------------------------------------------
+CASE( "test_blocking_send_nonblocking_receive" )
+{
+ mpi::Comm& comm = mpi::comm("world");
+ int tag = 99;
+ double send;
+ double recv[] = {1.,1.};
+ double recv_check[] = {0.5,0.8};
+ std::vector<mpi::Request> recvreqs;
+
+ // Post 2 receive requests
+ if( comm.rank() == 0 ) {
+ recvreqs.push_back( comm.iReceive(&recv[0],1, comm.size()-1,tag) );
+ recvreqs.push_back( comm.iReceive(&recv[1],1, comm.size()-1,tag) );
+ }
+
+
+ // Two blocking sends
+ if( comm.rank() == comm.size()-1 ) {
+ send = 0.5;
+ comm.send(send,0,tag);
+
+ send = 0.8;
+ comm.send(send,0,tag);
+ }
+
+ // Wait for receiving to finish
+ for( int i=0; i<recvreqs.size(); ++i ) {
+ mpi::Status recvstatus = comm.wait(recvreqs[i]);
+ EXPECT( is_approximately_equal( recv[i], recv_check[i], 1.e-9 ) );
+ }
+
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+
CASE( "test_blocking_send_receive" )
{
mpi::Comm& comm = mpi::comm("world");
diff --git a/eckit/tests/value/CMakeLists.txt b/eckit/tests/value/CMakeLists.txt
index de79130..0bc57fb 100644
--- a/eckit/tests/value/CMakeLists.txt
+++ b/eckit/tests/value/CMakeLists.txt
@@ -11,7 +11,6 @@ ecbuild_add_test( TARGET eckit_test_value_value_properties
SOURCES test_value_properties.cc
LIBS eckit )
-
ecbuild_add_test( TARGET eckit_test_value_value_const
SOURCES test_value_const.cc
LIBS eckit )
@@ -21,7 +20,13 @@ ecbuild_add_test( TARGET eckit_test_value_value_typeordering
LIBS eckit )
foreach( valueType nil boolean integer double string valuemap valuelist date orderedmap )
- ecbuild_add_test( TARGET eckit_test_value_value_${valueType}
- SOURCES test_value_${valueType}.cc
- LIBS eckit )
+ ecbuild_add_test( TARGET eckit_test_value_value_${valueType}
+ SOURCES test_value_${valueType}.cc
+ LIBS eckit )
endforeach()
+
+if( CMAKE_CXX_COMPILER_ID MATCHES "Cray" )
+ # Disable warnings for test_value_integer due to following:
+ # "Integer conversion resulted in a change of sign."
+ set_source_files_properties(test_value_integer.cc PROPERTIES COMPILE_FLAGS "-hmsglevel_4" )
+endif()
diff --git a/metkit/VERSION.cmake b/metkit/VERSION.cmake
index a540c69..a79cf55 100644
--- a/metkit/VERSION.cmake
+++ b/metkit/VERSION.cmake
@@ -1 +1 @@
- set( ${PROJECT_NAME}_VERSION_STR "0.7.0" )
+set( ${PROJECT_NAME}_VERSION_STR "0.7.1" )
diff --git a/metkit/src/metkit/MarsExpension.cc b/metkit/src/metkit/MarsExpension.cc
index 53d17fd..ab04c26 100644
--- a/metkit/src/metkit/MarsExpension.cc
+++ b/metkit/src/metkit/MarsExpension.cc
@@ -53,7 +53,6 @@ void MarsExpension::reset() {
}
}
-//----------------------------------------------------------------------------------------------------------------------
MarsLanguage& MarsExpension::language(const std::string& verb) {
@@ -67,7 +66,7 @@ MarsLanguage& MarsExpension::language(const std::string& verb) {
return *(*j).second;
}
-//----------------------------------------------------------------------------------------------------------------------
+
std::vector<MarsRequest> MarsExpension::expand(const std::vector<MarsRequest>& requests) {
std::vector<MarsRequest> result;
@@ -85,14 +84,11 @@ std::vector<MarsRequest> MarsExpension::expand(const std::vector<MarsRequest>& r
return result;
}
-//----------------------------------------------------------------------------------------------------------------------
void MarsExpension::expand(const MarsRequest& request, ExpandCallback& callback) {
MarsRequest r = language(request.verb()).expand(request, inherit_);
callback(r);
}
-//----------------------------------------------------------------------------------------------------------------------
-
void MarsExpension::flatten(const MarsRequest& request,
FlattenCallback& callback) {
diff --git a/metkit/src/metkit/MarsLanguage.cc b/metkit/src/metkit/MarsLanguage.cc
index 1e051c3..be5b2ae 100644
--- a/metkit/src/metkit/MarsLanguage.cc
+++ b/metkit/src/metkit/MarsLanguage.cc
@@ -29,6 +29,7 @@
#include "eckit/log/Timer.h"
+//----------------------------------------------------------------------------------------------------------------------
static pthread_once_t once = PTHREAD_ONCE_INIT;
@@ -48,9 +49,15 @@ static void init() {
namespace metkit {
+
+//----------------------------------------------------------------------------------------------------------------------
+
+
MarsLanguage::MarsLanguage(const std::string& verb):
verb_(verb) {
+
pthread_once(&once, init);
+
eckit::Value lang = languages_[verb];
eckit::Value params = lang.keys();
@@ -412,6 +419,4 @@ void MarsLanguage::flatten(const MarsRequest & request,
//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
} // namespace metkit
diff --git a/metkit/src/metkit/MarsLanguage.h b/metkit/src/metkit/MarsLanguage.h
index 52cd47a..5605ab4 100644
--- a/metkit/src/metkit/MarsLanguage.h
+++ b/metkit/src/metkit/MarsLanguage.h
@@ -34,12 +34,17 @@ public:
};
+//----------------------------------------------------------------------------------------------------------------------
+
+
class MarsLanguage : private eckit::NonCopyable {
+
typedef std::map<std::string, std::string> StringMap;
-public:
+public: // methods
MarsLanguage(const std::string& verb);
+
~MarsLanguage();
MarsRequest expand(const MarsRequest& r, bool inherit);
@@ -48,13 +53,12 @@ public:
const std::string& verb() const;
- void flatten(const MarsRequest& request,
- FlattenCallback& callback);
-
+ void flatten(const MarsRequest& request, FlattenCallback& callback);
-// - Class methds
+public: // class methods
static std::string expandVerb(const std::string& verb);
+
static std::string bestMatch(const std::string& what,
const std::vector<std::string>& values,
bool fail,
@@ -65,17 +69,7 @@ public:
static eckit::Value jsonFile(const std::string& name);
-private:
-// -- Contructors
-
- std::string verb_;
- std::map<std::string, Type* > types_;
- std::vector<std::string> keywords_;
- StringMap aliases_;
-
- mutable StringMap cache_;
-
-private: // Methods
+private: // methods
void flatten(const MarsRequest& request,
const std::vector<std::string>& params,
@@ -85,6 +79,16 @@ private: // Methods
Type* type(const std::string& name) const;
+private: // members
+
+ std::string verb_;
+ std::map<std::string, Type* > types_;
+ std::vector<std::string> keywords_;
+
+ StringMap aliases_;
+
+ mutable StringMap cache_;
+
};
//----------------------------------------------------------------------------------------------------------------------
diff --git a/metkit/src/metkit/MarsParser.cc b/metkit/src/metkit/MarsParser.cc
index 2e91ea1..983f142 100644
--- a/metkit/src/metkit/MarsParser.cc
+++ b/metkit/src/metkit/MarsParser.cc
@@ -20,6 +20,10 @@ namespace metkit {
//----------------------------------------------------------------------------------------------------------------------
+MarsParserCallback::~MarsParserCallback() {}
+
+//----------------------------------------------------------------------------------------------------------------------
+
std::string MarsParser::parseString(char quote)
{
consume(quote);
diff --git a/metkit/src/metkit/MarsParser.h b/metkit/src/metkit/MarsParser.h
index 3cafc98..c94e516 100644
--- a/metkit/src/metkit/MarsParser.h
+++ b/metkit/src/metkit/MarsParser.h
@@ -20,13 +20,21 @@
namespace metkit {
+
//----------------------------------------------------------------------------------------------------------------------
+
class MarsParserCallback {
public:
virtual void operator()(const MarsRequest&) = 0;
+protected:
+ ~MarsParserCallback();
};
+
+//----------------------------------------------------------------------------------------------------------------------
+
+
class MarsParser : public eckit::StreamParser {
public: // methods
diff --git a/metkit/src/metkit/MarsRequest.h b/metkit/src/metkit/MarsRequest.h
index f0fb3d0..756b55f 100644
--- a/metkit/src/metkit/MarsRequest.h
+++ b/metkit/src/metkit/MarsRequest.h
@@ -70,7 +70,7 @@ public: // methods
bool is(const std::string& param, const std::string& value) const;
- const std::vector<std::string> &values(const std::string&, bool emptyOk = false) const;
+ const std::vector<std::string>& values(const std::string&, bool emptyOk = false) const;
template<class T>
diff --git a/metkit/src/metkit/Parameter.cc b/metkit/src/metkit/Parameter.cc
index 16f115d..a9c0df9 100644
--- a/metkit/src/metkit/Parameter.cc
+++ b/metkit/src/metkit/Parameter.cc
@@ -34,6 +34,9 @@ public:
static UndefinedType undefined;
+//----------------------------------------------------------------------------------------------------------------------
+
+
Parameter::Parameter():
type_(&undefined) {
type_->attach();
diff --git a/metkit/src/metkit/Parameter.h b/metkit/src/metkit/Parameter.h
index de208c9..ce44d22 100644
--- a/metkit/src/metkit/Parameter.h
+++ b/metkit/src/metkit/Parameter.h
@@ -33,8 +33,12 @@ namespace metkit {
class Type;
class MarsRequest;
+//----------------------------------------------------------------------------------------------------------------------
+
+
class Parameter {
public:
+
Parameter();
~Parameter();
@@ -60,11 +64,10 @@ private:
std::vector<std::string> values_;
};
-//----------------------------------------------------------------------------------------------------------------------
-
//----------------------------------------------------------------------------------------------------------------------
+
} // namespace metkit
#endif
diff --git a/metkit/src/metkit/types/TypeParam.cc b/metkit/src/metkit/types/TypeParam.cc
index 2c751de..2a42b35 100644
--- a/metkit/src/metkit/types/TypeParam.cc
+++ b/metkit/src/metkit/types/TypeParam.cc
@@ -9,16 +9,20 @@
*/
-#include "eckit/parser/YAMLParser.h"
-#include "eckit/types/Types.h"
+#include "eckit/config/Resource.h"
+#include "eckit/log/Log.h"
#include "eckit/parser/StringTools.h"
+#include "eckit/parser/YAMLParser.h"
#include "eckit/thread/AutoLock.h"
-#include "eckit/config/Resource.h"
+#include "eckit/types/Types.h"
-#include "metkit/types/TypesFactory.h"
-#include "metkit/types/TypeParam.h"
-#include "metkit/MarsLanguage.h"
#include "metkit/MarsLanguage.h"
+#include "metkit/config/LibMetkit.h"
+#include "metkit/types/TypeParam.h"
+#include "metkit/types/TypesFactory.h"
+
+using eckit::Log;
+using metkit::LibMetkit;
namespace {
@@ -130,7 +134,9 @@ Rule::Rule(const eckit::Value& matchers, const eckit::Value& values, const eckit
const eckit::Value& aliases = ids[id];
if (aliases.isNil()) {
- std::cerr << "No aliases for "
+
+ Log::debug<LibMetkit>()
+ << "No aliases for "
<< id
<< " "
<< *this
@@ -147,28 +153,30 @@ Rule::Rule(const eckit::Value& matchers, const eckit::Value& values, const eckit
if (precedence[v] <= j) {
- std::cerr << "Redefinition ignored: param "
- << v
- << "='"
- << first
- << "', keeping previous value of '"
- << mapping_[v]
- << "' "
- << *this
- << std::endl;
+ Log::debug<LibMetkit>()
+ << "Redefinition ignored: param "
+ << v
+ << "='"
+ << first
+ << "', keeping previous value of '"
+ << mapping_[v]
+ << "' "
+ << *this
+ << std::endl;
continue;
}
else {
- std::cerr << "Redefinition of param "
- << v
- << "='"
- << first
- << "', overriding previous value of '"
- << mapping_[v]
- << "' "
- << *this
- << std::endl;
+ Log::debug<LibMetkit>()
+ << "Redefinition of param "
+ << v
+ << "='"
+ << first
+ << "', overriding previous value of '"
+ << mapping_[v]
+ << "' "
+ << *this
+ << std::endl;
precedence[v] = j;
}
@@ -277,15 +285,15 @@ static void init() {
for (size_t i = 0; i < r.size(); ++i) {
const eckit::Value& rule = r[i];
- if(!rule.isList()) {
- rule.dump(std::cout) << std::endl;
- }
+ if(!rule.isList()) {
+ rule.dump(Log::error()) << std::endl;
+ }
+
ASSERT(rule.isList());
ASSERT(rule.size() == 2);
+
(*rules).push_back(Rule(rule[0], rule[1], ids));
}
-
-
}
@@ -324,7 +332,7 @@ bool TypeParam::expand(const MarsRequest& request, std::vector<std::string>& val
if (!rule) {
- std::cerr << "Not rule for " << request << std::endl;
+ Log::error() << "Not rule for " << request << std::endl;
}
ASSERT(rule);
@@ -334,7 +342,7 @@ bool TypeParam::expand(const MarsRequest& request, std::vector<std::string>& val
try {
s = rule->lookup(s, fail);
} catch (...) {
- std::cerr << *rule << std::endl;
+ Log::error() << *rule << std::endl;
throw;
}
}
diff --git a/metkit/src/tools/parse-mars-request.cc b/metkit/src/tools/parse-mars-request.cc
index f839fe7..1cfbaa7 100644
--- a/metkit/src/tools/parse-mars-request.cc
+++ b/metkit/src/tools/parse-mars-request.cc
@@ -80,16 +80,21 @@ void ParseRequest::process(const eckit::PathName& path)
}
- std::cout << "============= " << path << std::endl;
+ std::cout << "==========> Parsing : " << path << std::endl;
+
std::ifstream in(path.asString().c_str());
MarsParser parser(in);
- MarsExpension expand(true);
+
+ bool inherit = true;
+ MarsExpension expand(inherit);
std::vector<MarsRequest> p = parser.parse();
for (std::vector<MarsRequest>::const_iterator j = p.begin(); j != p.end(); ++j) {
(*j).dump(std::cout);
}
+ std::cout << "----------> Expanding ... " << std::endl;
+
std::vector<MarsRequest> v = expand.expand(p);
for (std::vector<MarsRequest>::const_iterator j = v.begin(); j != v.end(); ++j) {
diff --git a/odb/CMakeLists.txt b/odb/CMakeLists.txt
index 0496b09..6978ab3 100644
--- a/odb/CMakeLists.txt
+++ b/odb/CMakeLists.txt
@@ -21,6 +21,17 @@ else()
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/odb/module)
endif()
+ecbuild_declare_project()
+
+ecbuild_add_option(FEATURE OMP
+ DESCRIPTION "Support for OpenMP multi-threading"
+ REQUIRED_PACKAGES "OMP COMPONENTS C"
+ DEFAULT ON)
+
+if(HAVE_OMP)
+ ecbuild_enable_omp()
+endif()
+
ecbuild_add_option(FEATURE ODB_MPI
DESCRIPTION "Use system MPI library"
REQUIRED_PACKAGES MPI
@@ -69,27 +80,27 @@ endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
- set(CMAKE_C_FLAGS "-fPIC")
- set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -fopenmp -ffree-line-length-none")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -ffree-line-length-none")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -O0 -fcheck=bounds")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fopenmp -Wl,--as-needed")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
- set(CMAKE_Fortran_FLAGS "-fPIC -openmp -traceback -fpe0 -names lowercase")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -traceback -fpe0 -names lowercase")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -O0 -check bounds -check pointers")
- set(CMAKE_EXE_LINKER_FLAGS "-openmp -Wl,--as-needed")
+ set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "PGI")
- set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -mp -Ktrap=fp -noswitcherror")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -Ktrap=fp -noswitcherror")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -O0 -Mbounds")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
- set(CMAKE_Fortran_FLAGS "-hPIC -emf -homp -M 226,867,7212")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -hPIC -emf -M 226,867,7212")
set(CMAKE_Fortran_FLAGS_DEBUG "-G0 -O0 -hdevelop")
set(CMAKE_Fortran_FLAGS_RELEASE "-G2 -O2")
set(CMAKE_C_FLAGS "-fPIC -hnomessage=186:192:223:236:7212:10082")
@@ -104,8 +115,6 @@ find_program(ODB_AR NAMES sxar ar)
find_program(ODB_GZIP NAMES gzip)
find_program(ODB_GUNZIP NAMES gunzip)
-ecbuild_declare_project()
-
file(GLOB schema_dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src "src/ddl.[A-Z0-9]*")
string(REGEX REPLACE "ddl.([A-Z0-9]*)" "\\1" schemas "${schema_dirs}")
set(ODB_SCHEMAS ${schemas} CACHE STRING "List of pre-compiled ODB schemas")
diff --git a/odb/VERSION.cmake b/odb/VERSION.cmake
index 11801db..4d4eef9 100644
--- a/odb/VERSION.cmake
+++ b/odb/VERSION.cmake
@@ -1 +1 @@
-set(${PROJECT_NAME}_VERSION_STR "1.0.7")
+set(${PROJECT_NAME}_VERSION_STR "1.0.8")
diff --git a/odb/src/extras/ifsaux/module/.parkind1.F90.un~ b/odb/src/extras/ifsaux/module/.parkind1.F90.un~
deleted file mode 100644
index 9893e1c..0000000
Binary files a/odb/src/extras/ifsaux/module/.parkind1.F90.un~ and /dev/null differ
diff --git a/odb/src/module/.odb_module.F90.un~ b/odb/src/module/.odb_module.F90.un~
deleted file mode 100644
index b45d588..0000000
Binary files a/odb/src/module/.odb_module.F90.un~ and /dev/null differ
diff --git a/odb_api/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/odb_api/.ipynb_checkpoints/Untitled-checkpoint.ipynb
new file mode 100644
index 0000000..2fd6442
--- /dev/null
+++ b/odb_api/.ipynb_checkpoints/Untitled-checkpoint.ipynb
@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/odb_api/Untitled.ipynb b/odb_api/Untitled.ipynb
new file mode 100644
index 0000000..bea878c
--- /dev/null
+++ b/odb_api/Untitled.ipynb
@@ -0,0 +1,105 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "%load_ext Cython"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "%%cython\n",
+ "def f(n):\n",
+ " a = 0\n",
+ " for i in range(n):\n",
+ " a+=i\n",
+ " return a\n",
+ "\n",
+ "cpdef g(int n):\n",
+ " cdef int a = 0, i\n",
+ " for i in range(n):\n",
+ " a += i\n",
+ " return a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10 loops, best of 3: 25.1 ms per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "%timeit f(1000000)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10000 loops, best of 3: 67 µs per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "%timeit g(1000000)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.13"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/odb_api/VERSION.cmake b/odb_api/VERSION.cmake
index 080421a..17e3ea7 100644
--- a/odb_api/VERSION.cmake
+++ b/odb_api/VERSION.cmake
@@ -1 +1 @@
-set( ${PROJECT_NAME}_VERSION_STR "0.17.3" )
+set( ${PROJECT_NAME}_VERSION_STR "0.17.4" )
diff --git a/odb_api/bamboo/MACOSX-flags.cmake b/odb_api/bamboo/MACOSX-flags.cmake
new file mode 100644
index 0000000..9892d75
--- /dev/null
+++ b/odb_api/bamboo/MACOSX-flags.cmake
@@ -0,0 +1 @@
+SET(ENABLE_MIGRATOR ON CACHE BOOL "Build migrator tool")
diff --git a/odb_api/regressions/CMakeLists.txt b/odb_api/regressions/CMakeLists.txt
index 5428b61..e7db898 100644
--- a/odb_api/regressions/CMakeLists.txt
+++ b/odb_api/regressions/CMakeLists.txt
@@ -1,6 +1,7 @@
list( APPEND regressions_data_files
2000010106.odb
+ odb_387_mdset.odb
)
ecbuild_get_test_multidata( TARGET get_odb_api_regressions_data
@@ -14,3 +15,10 @@ ecbuild_add_test(
ENVIRONMENT PATH=${CMAKE_BINARY_DIR}/bin:$ENV{PATH}
TEST_DEPENDS get_odb_api_regressions_data
)
+
+ecbuild_add_test(
+ TYPE script
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ODB-387-and-388.sh
+ ENVIRONMENT PATH=${CMAKE_BINARY_DIR}/bin:$ENV{PATH}
+ TEST_DEPENDS get_odb_api_regressions_data
+)
diff --git a/odb_api/regressions/ODB-387-and-388.sh b/odb_api/regressions/ODB-387-and-388.sh
new file mode 100755
index 0000000..a5aebac
--- /dev/null
+++ b/odb_api/regressions/ODB-387-and-388.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+set -uex
+
+# A unique working directory
+
+wd=$(pwd)
+test_wd=$(pwd)/test_odb_387_388
+
+mkdir -p ${test_wd}
+cd ${test_wd}
+
+# Test doing a replace
+
+odb mdset "expver=' 9876'" ../odb_387_mdset.odb temporary1.odb
+
+# Demonstrate that we have changed a column
+
+odb compare ../odb_387_mdset.odb temporary1.odb && exit -1
+
+odb compare -excludeColumns expver ../odb_387_mdset.odb temporary1.odb
+
+# The file sizes are the same
+
+if [[ $(stat -c%s ../odb_387_mdset.odb) -ne $(stat -c%s temporary1.odb) ]]; then
+ exit -1
+fi
+
+# Change another column
+
+odb mdset "stream=123456" temporary1.odb temporary2.odb
+
+# Demonstrate that we can exclude only one, or a range of columns
+
+odb compare ../odb_387_mdset.odb temporary1.odb && exit -1
+
+odb compare temporary1.odb temporary2.odb && exit -1
+
+odb compare -excludeColumns stream temporary1.odb temporary2.odb
+
+odb compare -excludeColumns stream ../odb_387_mdset.odb temporary2.odb && exit -1
+
+odb compare -excludeColumns stream,expver ../odb_387_mdset.odb temporary2.odb
+
+# The file sizes are still the same
+
+if [[ $(stat -c%s ../odb_387_mdset.odb) -ne $(stat -c%s temporary2.odb) ]]; then
+ exit -1
+fi
+
+# Clean up
+
+cd ${wd}
+rm -rf ${test_wd}
diff --git a/odb_api/src/odb_api/Comparator.cc b/odb_api/src/odb_api/Comparator.cc
index ef2d9c4..01e0c2a 100644
--- a/odb_api/src/odb_api/Comparator.cc
+++ b/odb_api/src/odb_api/Comparator.cc
@@ -43,13 +43,15 @@ Comparator::Comparator(bool checkMissingFlag)
void Comparator::compare(const PathName& p1, const PathName& p2)
{
std::vector<std::string> noExcludedColumnTypes;
- compare(p1, p2, noExcludedColumnTypes);
+ std::vector<std::string> noExcludedColumns;
+ compare(p1, p2, noExcludedColumnTypes, noExcludedColumns);
}
void Comparator::compare(eckit::DataHandle& l, eckit::DataHandle& r)
{
std::vector<std::string> noExcludedColumnTypes;
- odb::Reader oda1(l);
+ std::vector<std::string> noExcludedColumns;
+ odb::Reader oda1(l);
odb::Reader oda2(r);
odb::Reader::iterator it1(oda1.begin());
@@ -57,10 +59,12 @@ void Comparator::compare(eckit::DataHandle& l, eckit::DataHandle& r)
odb::Reader::iterator it2(oda2.begin());
odb::Reader::iterator end2(oda2.end());
- compare(it1, end1, it2, end2, "left", "right", noExcludedColumnTypes);
+ compare(it1, end1, it2, end2, "left", "right", noExcludedColumnTypes, noExcludedColumns);
}
-void Comparator::compare(const PathName& p1, const PathName& p2, const std::vector<std::string>& excludedColumnsTypes)
+void Comparator::compare(const PathName& p1, const PathName& p2,
+ const std::vector<std::string>& excludedColumnsTypes,
+ const std::vector<std::string>& excludedColumns)
{
Tracer t(Log::debug(), std::string("Comparator::compare: ") + p1 + ", " + p2);
@@ -72,7 +76,7 @@ void Comparator::compare(const PathName& p1, const PathName& p2, const std::vect
odb::Reader::iterator it2(oda2.begin());
odb::Reader::iterator end2(oda2.end());
- compare(it1, end1, it2, end2, p1, p2, excludedColumnsTypes);
+ compare(it1, end1, it2, end2, p1, p2, excludedColumnsTypes, excludedColumns);
}
void Comparator::raiseNotEqual(const Column& column, double d1, double d2) {
@@ -83,10 +87,34 @@ void Comparator::raiseNotEqual(const Column& column, double d1, double d2) {
throw ValuesDifferent(ss.str());
}
-void Comparator::compare(int nCols, const double *data1, const double *data2, const MetaData& md1, const MetaData& md2)
-{
+void Comparator::compare(int nCols,
+ const double *data1,
+ const double *data2,
+ const MetaData& md1,
+ const MetaData& md2) {
+
+ std::vector<int> skipColsUnused;
+ compare(nCols, data1, data2, md1, md2, skipColsUnused);
+}
+
+void Comparator::compare(int nCols,
+ const double *data1,
+ const double *data2,
+ const MetaData& md1,
+ const MetaData& md2,
+ const std::vector<int>& skipCols) {
+
+ std::vector<int>::const_iterator nextSkipCol = skipCols.begin();
+
unsigned long long numberOfDifferences (0);
- for (int i=0; i < nCols; i++)
+ for (int i=0; i < nCols; i++) {
+
+ // Skip the specified columns
+ if (nextSkipCol != skipCols.end() && (*nextSkipCol) == i) {
+ ++nextSkipCol;
+ continue;
+ }
+
try {
const Column& column(*md1[i]);
ColumnType type(column.type());
@@ -128,6 +156,8 @@ void Comparator::compare(int nCols, const double *data1, const double *data2, co
//TODO: make it an option to stop when an error found
//throw;
}
+ }
+
if (numberOfDifferences)
{
stringstream ss;
@@ -137,11 +167,15 @@ void Comparator::compare(int nCols, const double *data1, const double *data2, co
}
-void Comparator::compare(const MetaData& metaData1, const MetaData& metaData2, const std::vector<std::string>& exColumnsTypes)
-{
+void Comparator::compare(const MetaData& metaData1, const MetaData& metaData2,
+ const std::set<std::string>& excludedColumnsTypes,
+ const std::set<std::string>& excludedColumns,
+ std::vector<int>& skipCols) {
+
ASSERT("Number of columns must be the same" && (metaData1.size() == metaData2.size()));
- std::set<std::string> excludedColumnsTypes(exColumnsTypes.begin(), exColumnsTypes.end());
+ // We keep track of which columns are skipped in this routine.
+ skipCols.clear();
size_t size = metaData1.size();
for (size_t i = 0; i < size; i++)
@@ -152,6 +186,12 @@ void Comparator::compare(const MetaData& metaData1, const MetaData& metaData2, c
try {
ASSERT(column1.name() == column2.name());
+ // If we are skipping a column, then we should check nothing for it.
+ if (excludedColumns.find(column1.name()) != excludedColumns.end()) {
+ skipCols.push_back(i);
+ continue;
+ }
+
if (excludedColumnsTypes.find(column1.name()) == excludedColumnsTypes.end())
{
ASSERT(column1.type() == column2.type());
diff --git a/odb_api/src/odb_api/Comparator.h b/odb_api/src/odb_api/Comparator.h
index 3a5fbf1..c0c29c4 100644
--- a/odb_api/src/odb_api/Comparator.h
+++ b/odb_api/src/odb_api/Comparator.h
@@ -38,18 +38,42 @@ public:
void run();
template <typename T1, typename T2>
- bool compare(T1& it1, const T1& end1, T2& it2, const T2& end2, const std::string& desc1, const std::string& desc2);
+ bool compare(T1& it1, const T1& end1,
+ T2& it2, const T2& end2,
+ const std::string& desc1, const std::string& desc2);
template <typename T1, typename T2>
- bool compare(T1& it1, const T1& end1, T2& it2, const T2& end2, const std::string& desc1, const std::string& desc2,
- const std::vector<std::string>& excludedColumnsTypes);
+ bool compare(T1& it1, const T1& end1,
+ T2& it2, const T2& end2,
+ const std::string& desc1, const std::string& desc2,
+ const std::vector<std::string>& excludedColumnsTypes,
+ const std::vector<std::string>& excludedColumns);
void compare(eckit::DataHandle&, eckit::DataHandle&);
void compare(const eckit::PathName&, const eckit::PathName&);
- void compare(const eckit::PathName&, const eckit::PathName&, const std::vector<std::string>& excludedColumnsTypes);
- void compare(const MetaData&, const MetaData&, const std::vector<std::string>&);
- void compare(int nCols, const double *data1, const double *data2, const MetaData&, const MetaData&);
+ void compare(const eckit::PathName& pathName1,
+ const eckit::PathName& pathName2,
+ const std::vector<std::string>& excludedColumnsTypes,
+ const std::vector<std::string>& excludedcolumns);
+
+ void compare(const MetaData& metaData1, const MetaData& metaData2,
+ const std::set<std::string>& excludedColumnsTypes,
+ const std::set<std::string>& excludedColumns,
+ std::vector<int>& skipCols);
+
+ void compare(int nCols,
+ const double *data1,
+ const double *data2,
+ const MetaData& metaData1,
+ const MetaData& metaData2);
+
+ void compare(int nCols,
+ const double *data1,
+ const double *data2,
+ const MetaData& metaData1,
+ const MetaData& metaData2,
+ const std::vector<int>& skipCols);
void checkMissingFlag(bool v) { checkMissingFlag_ = v; }
@@ -79,30 +103,41 @@ private:
template<typename T1, typename T2>
bool Comparator::compare(T1& it1, const T1& end1, T2& it2, const T2& end2, const std::string& desc1, const std::string& desc2)
{
- std::vector<std::string> noExcludedColumns;
- return compare(it1, end1, it2, end2, desc1, desc2, noExcludedColumns);
+ std::vector<std::string> noExcludedColumnsTypes;
+ std::vector<std::string> noExcludedColumns;
+ return compare(it1, end1, it2, end2, desc1, desc2, noExcludedColumnsTypes, noExcludedColumns);
}
template<typename T1, typename T2>
-bool Comparator::compare(T1& it1, const T1& end1, T2& it2, const T2& end2, const std::string& desc1, const std::string& desc2,
- const std::vector<std::string>& excludedColumnsTypes)
+bool Comparator::compare(T1& it1, const T1& end1,
+ T2& it2, const T2& end2,
+ const std::string& desc1, const std::string& desc2,
+ const std::vector<std::string>& excludedColumnsTypes,
+ const std::vector<std::string>& excludedColumns)
{
eckit::Log::info() << "Comparator::compare: (1) " << desc1 << " to (2) " << desc2 << std::endl;
nRow_ = 0;
- compare(it1->columns(), it2->columns(), excludedColumnsTypes);
+ // The columns to skip are filled in by the column comparator function
+ std::vector<int> skipCols;
+
+ // Convert the excluded columns/types into sets, for more efficient lookups
+ std::set<std::string> excludedColumnsTypesSet(excludedColumnsTypes.begin(), excludedColumnsTypes.end());
+ std::set<std::string> excludedColumnsSet(excludedColumns.begin(), excludedColumns.end());
+
+ compare(it1->columns(), it2->columns(), excludedColumnsTypesSet, excludedColumnsSet, skipCols);
for (; it1 != end1 && it2 != end2; ++it1, ++it2)
{
++nRow_;
- if (it1->isNewDataset())
- compare(it1->columns(), it2->columns(), excludedColumnsTypes);
+ if (it1->isNewDataset())
+ compare(it1->columns(), it2->columns(), excludedColumnsTypesSet, excludedColumnsSet, skipCols);
if (it2->isNewDataset())
- compare(it1->columns(), it2->columns(), excludedColumnsTypes);
+ compare(it1->columns(), it2->columns(), excludedColumnsTypesSet, excludedColumnsSet, skipCols);
- compare(it1->columns().size(), it1->data(), it2->data(), it1->columns(), it2->columns());
+ compare(it1->columns().size(), it1->data(), it2->data(), it1->columns(), it2->columns(), skipCols);
}
ASSERT("First file has more rows!" && ! (it1 != end1));
diff --git a/odb_api/src/odb_api/FileMapper.cc b/odb_api/src/odb_api/FileMapper.cc
index 58ae980..d55764f 100755
--- a/odb_api/src/odb_api/FileMapper.cc
+++ b/odb_api/src/odb_api/FileMapper.cc
@@ -1,9 +1,9 @@
/*
* (C) Copyright 1996-2013 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
+ * 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.
*/
@@ -15,6 +15,7 @@
#include "eckit/types/Types.h"
#include "eckit/parser/StringTools.h"
#include "eckit/filesystem/PathName.h"
+#include "eckit/config/Resource.h"
#include "odb_api/FileMapper.h"
#include "odb_api/FileCollector.h"
@@ -47,16 +48,16 @@ void FileMapper::checkRoots() const
const string& p (roots_[i]);
bool exists (PathName(roots_[i]).exists());
- Log::info() << "checkRoots: " << i << ": " << roots_[i]
+ Log::info() << "checkRoots: " << i << ": " << roots_[i]
<< " " << exists << std::endl;
-
+
if (exists)
atLeastOneRootExists = true;
}
if (! atLeastOneRootExists)
{
stringstream msg;
- msg << "No directory specified in odbServerRoots exists, checked: " << roots_[0];
+ msg << "No directory specified in odbServerRoots exists, checked: " << roots_[0];
for (size_t i(1); i < roots_.size(); ++i)
msg << ":" << roots_[i];
@@ -164,11 +165,18 @@ string FileMapper::encodeRelative(const std::map<std::string,std::string>& value
: values.find(S::lower(placeholder)) );
string value (it->second);
- string patchedValue
- ((S::upper(placeholder) == "TIME"
- || S::upper(placeholder) == "ANTIME")
- ? patchTime(value)
- : value);
+
+ /// @note behaviour here has been changed. Old behaviour ran patchTime on both TIME and ANTIME, this
+ /// does not match correct usage in (ECMWF) operations, and this now ONL patches ANTIME, unles
+ /// overridden with a Resource
+
+ bool patchTimeEncodeRelative = eckit::Resource<bool>("odbPatchTimeEncodeRelative;$ODB_PATCH_TIME_ENCODE_RELATIVE", false);
+
+ string patchedValue = value;
+ if (S::upper(placeholder) == "ANTIME" || (patchTimeEncodeRelative && S::upper(placeholder) == "TIME")) {
+ patchedValue = patchTime(value);
+ }
+
if (value != patchedValue)
L << "FileMapper::encodeRelative: value of '" << placeholder << "' was '" << value << "' changed to '" << patchedValue << "'" << endl;
diff --git a/odb_api/src/odb_api/IteratorProxy.h b/odb_api/src/odb_api/IteratorProxy.h
index beacbb1..17a63ec 100644
--- a/odb_api/src/odb_api/IteratorProxy.h
+++ b/odb_api/src/odb_api/IteratorProxy.h
@@ -102,6 +102,8 @@ public:
void writeHeader() { (*((*it_).iter_)).writeHeader(); }
void close() { ((*it_).iter_)->close(); }
+ const std::map<std::string, std::string>& properties() const { return it_->iter_->properties(); }
+
template <typename T> unsigned long pass1(T b, const T e) { return ((*it_).iter_)->pass1(b, e); }
ITERATOR& operator*() { return *((*it_).iter_); }
diff --git a/odb_api/src/odb_api/MetaDataReaderIterator.h b/odb_api/src/odb_api/MetaDataReaderIterator.h
index 4d4ebe2..2648a85 100644
--- a/odb_api/src/odb_api/MetaDataReaderIterator.h
+++ b/odb_api/src/odb_api/MetaDataReaderIterator.h
@@ -59,6 +59,8 @@ public:
void property(std::string, std::string);
std::string property(std::string);
+ const Properties& properties() const { return properties_; }
+
const MetaData& columns() { return columns_; }
const MetaData& columns(MetaData& md) { return columns_ = md; }
diff --git a/odb_api/src/odb_api/ReaderIterator.h b/odb_api/src/odb_api/ReaderIterator.h
index e7c2c82..99ec818 100644
--- a/odb_api/src/odb_api/ReaderIterator.h
+++ b/odb_api/src/odb_api/ReaderIterator.h
@@ -62,6 +62,8 @@ public:
void property(std::string, std::string);
std::string property(std::string);
+ const Properties& properties() const { return properties_; }
+
const MetaData& columns() const { return columns_; }
const MetaData& columns(const MetaData& md) { return columns_ = md; }
void setNumberOfColumns(size_t n) { columns_.setSize(n); }
diff --git a/odb_api/src/odb_api/SelectIterator.h b/odb_api/src/odb_api/SelectIterator.h
index a3ef6cb..92c1b9a 100644
--- a/odb_api/src/odb_api/SelectIterator.h
+++ b/odb_api/src/odb_api/SelectIterator.h
@@ -51,7 +51,9 @@ public:
const MetaData& columns(const MetaData&) { NOTIMP; }
void setNumberOfColumns(size_t) { NOTIMP; }
- int close() { NOTIMP; }
+ const std::map<std::string, std::string>& properties() const { NOTIMP; }
+
+ int close() { NOTIMP; }
int setColumn(size_t index, std::string name, ColumnType type) { NOTIMP; }
void writeHeader() { NOTIMP; }
int setBitfieldColumn(size_t index, std::string name, ColumnType type, BitfieldDef b) { NOTIMP; }
diff --git a/odb_api/src/odb_api/data/DataHandleFactory.cc b/odb_api/src/odb_api/data/DataHandleFactory.cc
deleted file mode 100644
index db16bae..0000000
--- a/odb_api/src/odb_api/data/DataHandleFactory.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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 <sstream>
-#include <memory>
-
-#include "odb_api/data/DataHandleFactory.h"
-#include "odb_api/data/PartFileHandleFactory.h"
-#include "odb_api/data/MarsHandleFactory.h"
-#include "odb_api/data/FileHandleFactory.h"
-#include "odb_api/data/HttpHandleFactory.h"
-
-#include "eckit/io/MultiHandle.h"
-#include "eckit/parser/StringTools.h"
-#include "eckit/memory/ScopedPtr.h"
-
-using namespace eckit;
-
-namespace odb {
-
-DataHandleFactory::DataHandleFactory(const std::string& prefix)
-: prefix_(prefix)
-{
- factories()[prefix] = this;
-}
-
-DataHandleFactory::~DataHandleFactory()
-{
- factories().erase(prefix_);
-}
-
-std::string DataHandleFactory::prefix() const { return prefix_; }
-
-DataHandleFactory::Storage &DataHandleFactory::factories()
-{
- static Storage factories;
- return factories;
-}
-
-DataHandle* DataHandleFactory::makeHandle(const std::string& prefix, const std::string& descriptor)
-{
- if (factories().find(prefix) == factories().end())
- throw UserError(std::string("No factory for '") + prefix + "://' data descriptors");
-
- return factories()[prefix]->makeHandle(descriptor);
-}
-
-std::pair<std::string, std::string> DataHandleFactory::splitPrefix(const std::string& handleDescriptor)
-{
- const std::string delimiter("://");
- size_t pos (handleDescriptor.find(delimiter));
- if (pos != std::string::npos)
- return make_pair(handleDescriptor.substr(0, pos), handleDescriptor.substr(pos + delimiter.size()));
-
- // Sugar.
- if (StringTools::startsWith(StringTools::lower(StringTools::trim(handleDescriptor)), "retrieve,")
- || StringTools::startsWith(StringTools::lower(StringTools::trim(handleDescriptor)), "stage,")
- || StringTools::startsWith(StringTools::lower(StringTools::trim(handleDescriptor)), "list,")
- || StringTools::startsWith(StringTools::lower(StringTools::trim(handleDescriptor)), "archive,"))
- return std::make_pair(std::string("mars"), handleDescriptor);
-
- return std::make_pair(std::string("file"), handleDescriptor);
-}
-
-void DataHandleFactory::buildMultiHandle(eckit::MultiHandle& mh, const std::string& dataDescriptor)
-{
- registerFactories();
- std::vector<std::string> ds;
- ds.push_back(dataDescriptor);
- buildMultiHandle(mh, ds);
-}
-
-void DataHandleFactory::buildMultiHandle(eckit::MultiHandle& mh, const std::vector<std::string>& dataDescriptors)
-{
- registerFactories();
- std::vector<DataHandle*> handles;
- for (size_t i(0); i < dataDescriptors.size(); ++i)
- {
- std::pair<std::string,std::string> p (splitPrefix(dataDescriptors[i]));
- mh += makeHandle(p.first, p.second);
- }
-}
-
-DataHandle* DataHandleFactory::openForRead(const std::string& s)
-{
- registerFactories();
- std::pair<std::string,std::string> p (splitPrefix(s));
- std::auto_ptr<DataHandle> d (makeHandle(p.first, p.second));
- d->openForRead();
- return d.release();
-}
-
-DataHandle* DataHandleFactory::openForWrite(const std::string& s, const eckit::Length& length)
-{
- registerFactories();
- std::pair<std::string,std::string> p (splitPrefix(s));
- std::auto_ptr<DataHandle> d (makeHandle(p.first, p.second));
- d->openForWrite(length);
- return d.release();
-}
-
-void DataHandleFactory::registerFactories()
-{
- static PartFileHandleFactory partFileHandleFactory;
- static MarsHandleFactory marsHandleFactory;
- static FileHandleFactory fileHandleFactory;
- static HttpHandleFactory httpHandleFactory;
-}
-
-} //namespace ecml
diff --git a/odb_api/src/odb_api/data/DataHandleFactory.h b/odb_api/src/odb_api/data/DataHandleFactory.h
deleted file mode 100644
index 5bbebe4..0000000
--- a/odb_api/src/odb_api/data/DataHandleFactory.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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.
- */
-/// @author Piotr Kuchta, May 2015
-
-#ifndef odb_data_DataHandleFactory_H
-#define odb_data_DataHandleFactory_H
-
-#include <string>
-#include <map>
-
-#include "eckit/filesystem/PathName.h"
-
-namespace eckit {
- class DataHandle;
- class MultiHandle;
- class Length;
-}
-
-namespace odb {
-
-class DataHandleFactory {
-public: // Types
- typedef std::map<std::string, DataHandleFactory*> Storage;
-
-public:
- virtual ~DataHandleFactory();
-
- static eckit::DataHandle* openForRead(const std::string&);
- static eckit::DataHandle* openForWrite(const std::string&, const eckit::Length& = eckit::Length(0));
-
- static void buildMultiHandle(eckit::MultiHandle&, const std::vector<std::string>&);
- static void buildMultiHandle(eckit::MultiHandle&, const std::string&);
-
-protected:
- DataHandleFactory(const std::string&);
-
- static std::pair<std::string,std::string> splitPrefix(const std::string&);
-
- static eckit::DataHandle* makeHandle(const std::string&, const std::string&);
-
- virtual eckit::DataHandle* makeHandle(const std::string&) const = 0;
- std::string prefix() const;
-
-private:
- DataHandleFactory();
- static Storage& factories();
- static void registerFactories();
-
- std::string prefix_;
-};
-
-} // namespace ecml
-
-#endif
diff --git a/odb_api/src/odb_api/data/FileHandleFactory.cc b/odb_api/src/odb_api/data/FileHandleFactory.cc
deleted file mode 100644
index 2f84e71..0000000
--- a/odb_api/src/odb_api/data/FileHandleFactory.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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 <sstream>
-
-#include "odb_api/data/FileHandleFactory.h"
-#include "eckit/io/FileHandle.h"
-
-using namespace eckit;
-using namespace std;
-
-namespace odb {
-
-FileHandleFactory::FileHandleFactory()
-: DataHandleFactory("file")
-{}
-
-eckit::DataHandle* FileHandleFactory::makeHandle(const string& fileName) const
-{
- return new FileHandle(fileName);
-}
-
-} // namespace ecml
diff --git a/odb_api/src/odb_api/data/FileHandleFactory.h b/odb_api/src/odb_api/data/FileHandleFactory.h
deleted file mode 100644
index 03a3d0b..0000000
--- a/odb_api/src/odb_api/data/FileHandleFactory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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.
- */
-/// @author Piotr Kuchta, May 2015
-
-#ifndef eckit_utils_FileHandleFactory_H
-#define eckit_utils_FileHandleFactory_H
-
-#include "DataHandleFactory.h"
-
-namespace odb {
-
-class FileHandleFactory : public DataHandleFactory
-{
-public:
- FileHandleFactory();
-protected:
- eckit::DataHandle* makeHandle(const std::string&) const;
-};
-
-} // namespace ecml
-
-#endif
diff --git a/odb_api/src/odb_api/data/HttpHandle.cc b/odb_api/src/odb_api/data/HttpHandle.cc
deleted file mode 100644
index b88738a..0000000
--- a/odb_api/src/odb_api/data/HttpHandle.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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 "odb_api/data/HttpHandle.h"
-
-namespace odb {
-
-void HttpHandle::print(std::ostream& s) const
-{
- s << "HttpHandle[" << url_ << ']';
-}
-
-void HttpHandle::encode(eckit::Stream& s) const
-{
- NOTIMP;
-}
-
-std::string HttpHandle::parseHost(const std::string& url)
-{
- // TODO:
- return "localhost";
-}
-
-int HttpHandle::parsePort(const std::string& url)
-{
- // TODO:
- return 8000;
-}
-
-HttpHandle::HttpHandle(const std::string &url)
-: url_(url),
- tcp_(parseHost(url), parsePort(url))
-{
-}
-
-HttpHandle::~HttpHandle()
-{
-}
-
-Length HttpHandle::openForRead()
-{
- return 0;
-}
-
-void HttpHandle::openForWrite(const Length&)
-{
-}
-
-void HttpHandle::openForAppend(const Length&)
-{
-}
-
-long HttpHandle::read(void* buffer, long length)
-{
- long n(0);
- // TODO:
- return n;
-}
-
-long HttpHandle::write(const void* buffer, long length)
-{
- long n(0);
- // TODO:
- return n;
-}
-
-void HttpHandle::close()
-{
-}
-
-} // namespace ecml
-
diff --git a/odb_api/src/odb_api/data/HttpHandle.h b/odb_api/src/odb_api/data/HttpHandle.h
deleted file mode 100644
index 417411c..0000000
--- a/odb_api/src/odb_api/data/HttpHandle.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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.
- */
-
-// @file HttpHandle.h
-// @author Piotr Kuchta - ECMWF 27 Oct 2016
-
-#ifndef odb_data_HttpFileHandle_h
-#define odb_data_HttpFileHandle_h
-
-#include "eckit/io/TCPHandle.h"
-
-namespace odb {
-
-class HttpHandle : public eckit::DataHandle {
-public:
- HttpHandle(const std::string& url);
- ~HttpHandle();
-// -- Overridden methods
- // From DataHandle
- virtual Length openForRead();
- virtual void openForWrite(const eckit::Length&);
- virtual void openForAppend(const eckit::Length&);
-
- virtual long read(void*,long);
- virtual long write(const void*,long);
- virtual void close();
- virtual void print(std::ostream&) const;
-
- // From Streamable
- virtual void encode(eckit::Stream&) const;
-
- static std::string parseHost(const std::string&);
- static int parsePort(const std::string&);
-
-private:
- const std::string url_;
- eckit::TCPHandle tcp_;
-};
-
-} // namespace eckit
-
-#endif
diff --git a/odb_api/src/odb_api/data/HttpHandleFactory.cc b/odb_api/src/odb_api/data/HttpHandleFactory.cc
deleted file mode 100644
index cb7d15f..0000000
--- a/odb_api/src/odb_api/data/HttpHandleFactory.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * (C) Copyright 1996-2013 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 <sstream>
-
-
-#include "eckit/parser/StringTools.h"
-
-#include "odb_api/data/HttpHandle.h"
-#include "odb_api/data/HttpHandleFactory.h"
-
-using namespace eckit;
-using namespace std;
-
-namespace odb {
-
-HttpHandleFactory::HttpHandleFactory()
-: DataHandleFactory("http")
-{}
-
-eckit::DataHandle* HttpHandleFactory::makeHandle(const std::string& r) const
-{
- return new HttpHandle(r);
-}
-
-} // namespace ecml
diff --git a/odb_api/src/odb_api/data/HttpHandleFactory.h b/odb_api/src/odb_api/data/HttpHandleFactory.h
deleted file mode 100644
index 8321f4b..0000000
--- a/odb_api/src/odb_api/data/HttpHandleFactory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (C) Copyright 1996-2013 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.
- */
-/// @author Piotr Kuchta, October 2016
-
-#ifndef odb_data_HttpHandleFactory_H
-#define odb_data_HttpHandleFactory_H
-
-#include "odb_api/data/DataHandleFactory.h"
-
-namespace odb {
-
-class HttpHandleFactory : public DataHandleFactory
-{
-public:
- HttpHandleFactory();
-protected:
- eckit::DataHandle* makeHandle(const std::string&) const;
-};
-
-} // namespace odb
-
-#endif
diff --git a/odb_api/src/odb_api/data/Makefile b/odb_api/src/odb_api/data/Makefile
deleted file mode 100644
index 3b2036e..0000000
--- a/odb_api/src/odb_api/data/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-all:
- m
diff --git a/odb_api/src/odb_api/data/MarsHandleFactory.cc b/odb_api/src/odb_api/data/MarsHandleFactory.cc
deleted file mode 100644
index 89a8d84..0000000
--- a/odb_api/src/odb_api/data/MarsHandleFactory.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (C) Copyright 1996-2013 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 <sstream>
-
-#include "eckit/io/FileHandle.h"
-#include "eckit/parser/StringTools.h"
-
-#include "ecml/parser/Request.h"
-#include "ecml/parser/RequestParser.h"
-#include "ecml/core/RequestHandler.h"
-
-#include "metkit/MarsRequestHandle.h"
-#include "metkit/DHSProtocol.h"
-
-#include "odb_api/data/MarsHandleFactory.h"
-
-using namespace eckit;
-using namespace std;
-
-namespace odb {
-
-MarsHandleFactory::MarsHandleFactory()
-: DataHandleFactory("mars")
-{}
-
-bool shortName(const std::string& prefix, const std::string& s)
-{
- if (prefix.size() > s.size())
- return false;
- return std::equal(prefix.begin(), prefix.end(), s.begin());
-}
-
-std::string verb(const ecml::Request request)
-{
- std::string v (eckit::StringTools::lower(request->text()));
-
- const char* verbs[] = {"retrieve", "stage", "list", "archive", 0};
-
- for (size_t i (0); verbs[i]; ++i)
- if (shortName(v, verbs[i]))
- return verbs[i];
-
- throw eckit::UserError(std::string("Unknown request '") + v + "'");
- return v;
-}
-
-DataHandle* MarsHandleFactory::makeHandle(const string& r) const
-{
- Log::debug() << "MarsHandleFactory::makeHandle: parsing " << r << endl;
-/*
- Request requests (ecml::RequestParser::parse(r));
-
- Log::debug() << "MarsHandleFactory::makeHandle: requests = " << requests << endl;
-
- Request request (requests->value());
-
- Log::debug() << "MarsHandleFactory::makeHandle: request = " << request << endl;
-
- if (requests->rest())
- Log::warning() << "MarsHandleFactory: Only " << request << " used, skipped rest of " << requests << endl;
-
- string host (RequestHandler::database(request));
- long port (RequestHandler::port(request));
-
- metkit::MarsRequest mr (verb(request));
- ecml::convertToMarsRequest<metkit::MarsRequest> (request, mr);
-
- return new metkit::MarsRequestHandle(mr, new metkit::DHSProtocol(host, host, port));
-*/
-
- /// TODO: This has been (potentially temporarily) removed by SDS during refactoring.
- /// IS IT BEING USED ANYWHERE?
-
- NOTIMP;
-}
-
-} // namespace ecml
diff --git a/odb_api/src/odb_api/data/MarsHandleFactory.h b/odb_api/src/odb_api/data/MarsHandleFactory.h
deleted file mode 100644
index e3e17c8..0000000
--- a/odb_api/src/odb_api/data/MarsHandleFactory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (C) Copyright 1996-2013 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.
- */
-/// @author Piotr Kuchta, May 2015
-
-#ifndef odb_data_MarsHandleFactory_H
-#define odb_data_MarsHandleFactory_H
-
-#include "odb_api/data/DataHandleFactory.h"
-
-namespace odb {
-
-class MarsHandleFactory : public DataHandleFactory
-{
-public:
- MarsHandleFactory();
-protected:
- eckit::DataHandle* makeHandle(const std::string&) const;
-};
-
-} // namespace odb
-
-#endif
diff --git a/odb_api/src/odb_api/data/PartFileHandleFactory.cc b/odb_api/src/odb_api/data/PartFileHandleFactory.cc
deleted file mode 100644
index 7c06785..0000000
--- a/odb_api/src/odb_api/data/PartFileHandleFactory.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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 "odb_api/data/PartFileHandleFactory.h"
-
-#include "eckit/io/PartFileHandle.h"
-#include "eckit/parser/StringTools.h"
-
-#include <sstream>
-
-using namespace eckit;
-using namespace std;
-
-namespace odb {
-
-PartFileHandleFactory::PartFileHandleFactory()
-: DataHandleFactory("partfile")
-{}
-
-DataHandle* PartFileHandleFactory::makeHandle(const string& descriptor) const
-{
- vector<string> ps (StringTools::split(":", descriptor));
- string fileName (ps[0]);
- vector<string> range (StringTools::split(",", ps[ps.size() - 1]));
-
- Offset offset (atoi(range[0].c_str()));
- Length length (atoi(range[1].c_str()));
-
- return new PartFileHandle(fileName, offset, length);
-}
-
-} // namespace odb
diff --git a/odb_api/src/odb_api/data/PartFileHandleFactory.h b/odb_api/src/odb_api/data/PartFileHandleFactory.h
deleted file mode 100644
index 3c4493e..0000000
--- a/odb_api/src/odb_api/data/PartFileHandleFactory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (C) Copyright 1996-2016 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.
- */
-/// @author Piotr Kuchta, August 2015
-
-#ifndef odb_data_PartFileHandleFactory_H
-#define odb_data_PartFileHandleFactory_H
-
-#include "odb_api/data/DataHandleFactory.h"
-
-namespace odb {
-
-class PartFileHandleFactory : public DataHandleFactory
-{
-public:
- PartFileHandleFactory();
-protected:
- eckit::DataHandle* makeHandle(const std::string&) const;
-};
-
-} // namespace odb
-
-#endif
diff --git a/odb_api/src/odb_api/ecml_verbs/ChunkHandler.cc b/odb_api/src/odb_api/ecml_verbs/ChunkHandler.cc
index 1d87c4d..e1024ea 100644
--- a/odb_api/src/odb_api/ecml_verbs/ChunkHandler.cc
+++ b/odb_api/src/odb_api/ecml_verbs/ChunkHandler.cc
@@ -12,8 +12,6 @@
#include "ChunkHandler.h"
-#include "odb_api/Comparator.h"
-
#include "eckit/types/Types.h"
#include "ecml/parser/Request.h"
diff --git a/odb_api/src/odb_api/tools/CompareTool.cc b/odb_api/src/odb_api/tools/CompareTool.cc
index e4eb526..f48c519 100644
--- a/odb_api/src/odb_api/tools/CompareTool.cc
+++ b/odb_api/src/odb_api/tools/CompareTool.cc
@@ -27,7 +27,8 @@ CompareTool::CompareTool (int argc, char *argv[])
: Tool(argc, argv)
{
registerOptionWithArgument("-excludeColumnsTypes");
- if (parameters().size() != 3)
+ registerOptionWithArgument("-excludeColumns");
+ if (parameters().size() != 3)
{
Log::error() << "Usage:";
usage(parameters(0), Log::error());
@@ -35,7 +36,6 @@ CompareTool::CompareTool (int argc, char *argv[])
throw Exception("Wrong number of parameters.");
}
-
PathName p;
if (! (p = PathName(parameters()[1])).exists()
|| ! (p = PathName(parameters()[2])).exists())
@@ -45,16 +45,16 @@ CompareTool::CompareTool (int argc, char *argv[])
throw Exception(s.str());
}
- file1 = new PathName(parameters()[1]);
- file2 = new PathName(parameters()[2]);
+ file1_ = new PathName(parameters()[1]);
+ file2_ = new PathName(parameters()[2]);
}
void CompareTool::run()
{
- Timer t(std::string("Comparing files ") + *file1 + " and " + *file2);
- odb::Reader oda1(*file1);
- odb::Reader oda2(*file2);
+ Timer t(std::string("Comparing files ") + *file1_ + " and " + *file2_);
+ odb::Reader oda1(*file1_);
+ odb::Reader oda2(*file2_);
odb::Reader::iterator it1(oda1.begin());
odb::Reader::iterator end1(oda1.end());
@@ -62,12 +62,16 @@ void CompareTool::run()
odb::Reader::iterator end2(oda2.end());
std::vector<std::string> excludedColumnsTypes = StringTools::split(",", optionArgument("-excludeColumnsTypes", std::string("")));
+ std::vector<std::string> excludedColumns = StringTools::split(",", optionArgument("-excludeColumns", std::string("")));
if (excludedColumnsTypes.size())
Log::info() << "excludedColumnsTypes:" << excludedColumnsTypes << std::endl;
-
+
+ if (excludedColumns.size())
+ Log::info() << "excludedColumns:" << excludedColumns << std::endl;
+
bool checkMissing = ! optionIsSet("-dontCheckMissing");
- odb::Comparator(checkMissing).compare(it1, end1, it2, end2, *file1, *file2, excludedColumnsTypes);
+ odb::Comparator(checkMissing).compare(it1, end1, it2, end2, *file1_, *file2_, excludedColumnsTypes, excludedColumns);
}
} // namespace tool
diff --git a/odb_api/src/odb_api/tools/CompareTool.h b/odb_api/src/odb_api/tools/CompareTool.h
index 8fe7795..93ac367 100644
--- a/odb_api/src/odb_api/tools/CompareTool.h
+++ b/odb_api/src/odb_api/tools/CompareTool.h
@@ -32,7 +32,7 @@ public:
static void usage(const std::string& name, std::ostream &o)
{
- o << name << " [-excludeColumnsTypes <list-of-columns>] [-dontCheckMissing] <file1.odb> <file2.odb>";
+ o << name << " [-excludeColumns <list-of-columns>] [-excludeColumnsTypes <list-of-columns>] [-dontCheckMissing] <file1.odb> <file2.odb>";
}
private:
@@ -43,8 +43,8 @@ private:
static char* dummyArgv_[];
- eckit::PathName* file1;
- eckit::PathName* file2;
+ eckit::PathName* file1_;
+ eckit::PathName* file2_;
odb::RowsReaderIterator* reader1_;
odb::RowsReaderIterator* reader2_;
diff --git a/odb_api/src/odb_api/tools/MDSetTool.cc b/odb_api/src/odb_api/tools/MDSetTool.cc
index 3536267..3b0067a 100644
--- a/odb_api/src/odb_api/tools/MDSetTool.cc
+++ b/odb_api/src/odb_api/tools/MDSetTool.cc
@@ -78,20 +78,19 @@ void MDSetTool::run()
}
size_t sizeOfEncodedData = (**it).sizeOfEncodedData();
- Properties props;
// See if the file was created on a different order architecture
if ((**it).byteOrder() == BYTE_ORDER_INDICATOR)
{
Log::info() << "MDSetTool::run: SAME ORDER " << sizeOfEncodedData << std::endl;
- serializeHeader<SameByteOrder,DataHandle>(*outHandle, sizeOfEncodedData, md.rowsNumber(), props, md);
+ serializeHeader<SameByteOrder,DataHandle>(*outHandle, sizeOfEncodedData, md.rowsNumber(), it->properties(), md);
DataStream<SameByteOrder,DataHandle>(*outHandle).writeBytes((**it).encodedData(), sizeOfEncodedData);
}
else
{
Log::info() << "MDSetTool::run: OTHER ORDER " << sizeOfEncodedData << std::endl;
- serializeHeader<OtherByteOrder,DataHandle>(*outHandle, sizeOfEncodedData, md.rowsNumber(), props, md);
+ serializeHeader<OtherByteOrder,DataHandle>(*outHandle, sizeOfEncodedData, md.rowsNumber(), it->properties(), md);
DataStream<OtherByteOrder,DataHandle>(*outHandle).writeBytes((**it).encodedData(), sizeOfEncodedData);
}
}
diff --git a/odb_api/tests/core/CMakeLists.txt b/odb_api/tests/core/CMakeLists.txt
index 4b3b180..c9cb4e9 100644
--- a/odb_api/tests/core/CMakeLists.txt
+++ b/odb_api/tests/core/CMakeLists.txt
@@ -14,7 +14,7 @@ list( APPEND _core_odb_tests
foreach( _test ${_core_odb_tests} )
ecbuild_add_test(
- TARGET ${_test}
+ TARGET odb_api_${_test}
SOURCES ${_test}.cc ../TemporaryFiles.h ../MockDataHandles.h
TEST_DEPENDS get_odb_api_test_data
INCLUDES ${ECKIT_INCLUDE_DIRS} ${ODB_API_INCLUDE_DIRS}
diff --git a/odb_api/tests/core/test_decode_odb.cc b/odb_api/tests/core/test_decode_odb.cc
index d7fa7a2..c20af80 100644
--- a/odb_api/tests/core/test_decode_odb.cc
+++ b/odb_api/tests/core/test_decode_odb.cc
@@ -21,7 +21,7 @@
#else
#include <cmath>
#define fabs(x) std::fabs((x))
-#define modf(x) std::modf((x))
+#define modf(x,y) std::modf((x),(y))
#endif
using namespace eckit::testing;
diff --git a/odb_api/tests/dhshome/data/partitions_info_test_stage.txt b/odb_api/tests/dhshome/data/partitions_info_test_stage.txt
deleted file mode 100644
index e69de29..0000000
diff --git a/odb_api/tests/dhshome/data/partitions_info_test_stage.txt.files b/odb_api/tests/dhshome/data/partitions_info_test_stage.txt.files
deleted file mode 100644
index e69de29..0000000
diff --git a/odb_api/tests/sql/CMakeLists.txt b/odb_api/tests/sql/CMakeLists.txt
index a2f8198..bd1cda9 100644
--- a/odb_api/tests/sql/CMakeLists.txt
+++ b/odb_api/tests/sql/CMakeLists.txt
@@ -5,10 +5,11 @@ list( APPEND _sql_odb_tests
foreach( _test ${_sql_odb_tests} )
ecbuild_add_test(
- TARGET ${_test}
+ TARGET odb_api_${_test}
SOURCES ${_test}.cc ../TemporaryFiles.h ../MockDataHandles.h
INCLUDES ${ECKIT_INCLUDE_DIRS} ${ODB_API_INCLUDE_DIRS}
ENVIRONMENT ${test_environment}
+ TEST_DEPENDS get_odb_api_test_data
LIBS eckit Odb )
endforeach()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/odb-api.git
More information about the debian-science-commits
mailing list