mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[adios2] Add zfp feature (#29678)
* [adios2] add zfp feature * remove zfp version
This commit is contained in:
parent
a94b6f34a7
commit
3768a4d37e
@ -1,9 +1,11 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ornladios/ADIOS2
|
||||
REPO ornladios/ADIOS2
|
||||
REF 473fe8c7d1a13c0746910361aa45ee1b96f57bfb
|
||||
SHA512 ef8af30419cf57183b52ce9cb29613a381b06e16848a6d22d83c751c43b8485e504be90cead1381adcc92bb8d4912611083cd6d0b73d161b33f779231a041e6c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
zfp-version.patch # Backport zfp 1.0 support to v2.8.3 (https://github.com/ornladios/ADIOS2/pull/3312), included upstream in v2.9.0 when released.
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -11,10 +13,11 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
mpi ADIOS2_USE_MPI
|
||||
cuda ADIOS2_USE_CUDA
|
||||
python ADIOS2_USE_Python # requires numpy / mpi4py; so not exposed in the manifest yet
|
||||
zfp ADIOS2_USE_ZFP
|
||||
)
|
||||
|
||||
set(disabled_options "")
|
||||
list(APPEND disabled_options ZFP SZ LIBPRESSIO MGARD DAOS DataMan DataSpaces MHS SST BP5 IME Fortran SysVShMem Profiling)
|
||||
list(APPEND disabled_options SZ LIBPRESSIO MGARD DAOS DataMan DataSpaces MHS SST BP5 IME Fortran SysVShMem Profiling)
|
||||
list(TRANSFORM disabled_options PREPEND "-DADIOS2_USE_")
|
||||
list(TRANSFORM disabled_options APPEND ":BOOL=OFF")
|
||||
set(enabled_options "")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "adios2",
|
||||
"version": "2.8.3",
|
||||
"port-version": 1,
|
||||
"description": "Next generation of ADIOS developed in the Exascale Computing Program",
|
||||
"homepage": "https://github.com/ornladios/ADIOS2",
|
||||
"license": "Apache-2.0",
|
||||
@ -54,6 +55,12 @@
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"zfp": {
|
||||
"description": "Enable zfp support",
|
||||
"dependencies": [
|
||||
"zfp"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
65
ports/adios2/zfp-version.patch
Normal file
65
ports/adios2/zfp-version.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake
|
||||
index d4e2e5dbf..80f231c16 100644
|
||||
--- a/cmake/DetectOptions.cmake
|
||||
+++ b/cmake/DetectOptions.cmake
|
||||
@@ -89,9 +89,9 @@ endif()
|
||||
|
||||
# ZFP
|
||||
if(ADIOS2_USE_ZFP STREQUAL AUTO)
|
||||
- find_package(ZFP 0.5.1 CONFIG)
|
||||
+ find_package(ZFP CONFIG)
|
||||
elseif(ADIOS2_USE_ZFP)
|
||||
- find_package(ZFP 0.5.1 REQUIRED CONFIG)
|
||||
+ find_package(ZFP REQUIRED CONFIG)
|
||||
endif()
|
||||
if(ZFP_FOUND)
|
||||
set(ADIOS2_HAVE_ZFP TRUE)
|
||||
diff --git a/source/adios2/operator/compress/CompressZFP.cpp b/source/adios2/operator/compress/CompressZFP.cpp
|
||||
index 77aaa6f08..e8162f97a 100644
|
||||
--- a/source/adios2/operator/compress/CompressZFP.cpp
|
||||
+++ b/source/adios2/operator/compress/CompressZFP.cpp
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <zfp.h>
|
||||
|
||||
/* CMake will make sure zfp >= 5.0.1 */
|
||||
-#if ZFP_VERSION_RELEASE > 1 && !defined(ZFP_DEFAULT_EXECUTION_POLICY)
|
||||
+//#if ZFP_VERSION_RELEASE > 1 && !defined(ZFP_DEFAULT_EXECUTION_POLICY)
|
||||
|
||||
/* ZFP will default to SERIAL if CUDA is not available */
|
||||
#ifdef ADIOS2_HAVE_ZFP_CUDA
|
||||
@@ -22,7 +22,7 @@
|
||||
#define ZFP_DEFAULT_EXECUTION_POLICY zfp_exec_serial
|
||||
#endif
|
||||
|
||||
-#endif
|
||||
+//#endif
|
||||
|
||||
namespace adios2
|
||||
{
|
||||
@@ -80,7 +80,7 @@ size_t CompressZFP::Operate(const char *dataIn, const Dims &blockStart,
|
||||
PutParameter(bufferOut, bufferOutOffset,
|
||||
static_cast<uint8_t>(ZFP_VERSION_MINOR));
|
||||
PutParameter(bufferOut, bufferOutOffset,
|
||||
- static_cast<uint8_t>(ZFP_VERSION_RELEASE));
|
||||
+ static_cast<uint8_t>(ZFP_VERSION_PATCH));
|
||||
PutParameters(bufferOut, bufferOutOffset, m_Parameters);
|
||||
// zfp V1 metadata end
|
||||
|
||||
@@ -302,7 +302,7 @@ zfp_stream *GetZFPStream(const Dims &dimensions, DataType type,
|
||||
auto itPrecision = parameters.find("precision");
|
||||
const bool hasPrecision = itPrecision != parameters.end();
|
||||
|
||||
-#if ZFP_VERSION_RELEASE > 1
|
||||
+//#if ZFP_VERSION_RELEASE > 1
|
||||
auto itBackend = parameters.find("backend");
|
||||
const bool hasBackend = itBackend != parameters.end();
|
||||
|
||||
@@ -332,7 +332,7 @@ zfp_stream *GetZFPStream(const Dims &dimensions, DataType type,
|
||||
|
||||
zfp_stream_set_execution(stream, policy);
|
||||
}
|
||||
-#endif
|
||||
+//#endif
|
||||
|
||||
if ((hasAccuracy && hasPrecision) || (hasAccuracy && hasRate) ||
|
||||
(hasPrecision && hasRate) ||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "fac4ec886b3d46f0a48ee44988fc8224bce59ad7",
|
||||
"version": "2.8.3",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "1a832feea61b7166bf688a246cda2f7c038aeeac",
|
||||
"version": "2.8.3",
|
||||
|
@ -42,7 +42,7 @@
|
||||
},
|
||||
"adios2": {
|
||||
"baseline": "2.8.3",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"advobfuscator": {
|
||||
"baseline": "2020-06-26",
|
||||
|
Loading…
x
Reference in New Issue
Block a user