diff --git a/.circleci/config.yml b/.circleci/config.yml index 0fd214669d..1328f91650 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,15 +104,16 @@ jobs: - run: name: Get libomp command: | - sudo /opt/local/bin/port selfupdate - (sudo yes || true) | sudo /opt/local/bin/port install libomp + #sudo /opt/local/bin/port selfupdate + #(sudo yes || true) | sudo /opt/local/bin/port install libomp no_output_timeout: 30m - run: - name: Get clang12 + name: Get clang13 command: | - (sudo yes || true) | sudo /opt/local/bin/port install clang-12 - sudo /opt/local/bin/port select --set clang mp-clang-12 + sudo /opt/local/bin/port selfupdate + (sudo yes || true) | sudo /opt/local/bin/port install clang-13 + sudo /opt/local/bin/port select --set clang mp-clang-13 /opt/local/bin/clang++ -v > clangVersion.txt no_output_timeout: 30m @@ -130,7 +131,7 @@ jobs: cd build git checkout $CIRCLE_BRANCH export PATH=/opt/local/bin:$PATH - sudo port select --set clang mp-clang-12 + sudo port select --set clang mp-clang-13 cmake -DCPACK_BINARY_DRAGNDROP=ON -DCMAKE_BUILD_TYPE:String=Release -DDIST_INSTALLER:string=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DUSE_OMP=ON .. make -j2 make installer -j2 @@ -349,6 +350,15 @@ jobs: pip3 install scikit-build command - run: + name: update 3rd party libraries + command: | + rm -rf /usr/local/VAPOR-Deps/2019-Aug + pip3 install gdown --upgrade + gdown https://drive.google.com/uc?id=1elB8v-UNMzkNmnsJPtxk3cI1zBelJ3Hd + filename="/root/project/2019-Aug-Ubuntu.tar.xz" + tar -xf ${filename} -C /usr/local/VAPOR-Deps + + - run: name: update cmake command: | apt remove -y --purge --auto-remove cmake @@ -640,7 +650,6 @@ workflows: #- clang-tidy - build_ubuntu18 - build_centos7 - #- foo #- test_clang_format #- build_win10_installer #- build_osx_installer diff --git a/CMakeLists.txt b/CMakeLists.txt index 99c14ddde5..c27f3e6dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,6 +143,7 @@ find_library(UDUNITS2 udunits2) find_library(FREETYPE freetype) find_library(GEOTIFF geotiff) find_library(JPEG jpeg) +find_library(HDF5_LIB hdf5) # find_package(Python) # Output @@ -342,6 +343,11 @@ if (WIN32) ${QTDIR}/plugins/platforms/qwindows.dll DESTINATION platforms ) + install ( + DIRECTORY ${THIRD_PARTY_DIR}/share/plugins + DESTINATION ${INSTALL_LIB_DIR}/share + COMPONENT Dependencies + ) endif (GENERATE_FULL_INSTALLER) set (CPACK_NSIS_MODIFY_PATH OFF) @@ -415,6 +421,12 @@ if (APPLE) COMPONENT Dependencies ) endif () + file (GLOB_RECURSE HDF5_PLUGINS "${THIRD_PARTY_DIR}/share/plugins/*.so") + install ( + FILES ${HDF5_PLUGINS} + DESTINATION "${INSTALL_SHARE_DIR}/plugins" + COMPONENT Dependencies + ) endif () endif (APPLE) @@ -434,6 +446,9 @@ if (UNIX AND NOT APPLE) if (BUILD_PYTHON) set (PARSE_BINARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libvapi.so") endif() + message( STATUS "${CMAKE_SOURCE_DIR}/buildutils/gen_linux_shared_libs.pl + ${PARSE_BINARY} ${EXTRA_LIBS_SEARCH} > + ${CMAKE_BINARY_DIR}/LinuxInstallLibs.txt") add_custom_target ( linuxpreinstall COMMAND ${CMAKE_SOURCE_DIR}/buildutils/gen_linux_shared_libs.pl @@ -490,6 +505,13 @@ if (UNIX AND NOT APPLE) ) endif () + file (GLOB HDF5_PLUGINS "${THIRD_PARTY_DIR}/share/plugins/*.so") + message(STATUS "HDF5_PLUGINS ${HDF5_PLUGINS}") + install ( + FILES ${HDF5_PLUGINS} + DESTINATION "${INSTALL_SHARE_DIR}/plugins" + COMPONENT Dependencies + ) endif (DIST_INSTALLER AND GENERATE_FULL_INSTALLER) endif (UNIX AND NOT APPLE) diff --git a/apps/cf2vdc/cf2vdc.cpp b/apps/cf2vdc/cf2vdc.cpp index e6dfae5d0e..2fccdf2d32 100644 --- a/apps/cf2vdc/cf2vdc.cpp +++ b/apps/cf2vdc/cf2vdc.cpp @@ -9,6 +9,7 @@ #include #include #include +#include using namespace Wasp; using namespace VAPoR; @@ -223,6 +224,8 @@ vector remove_vector(vector v1, vector v2) int main(int argc, char **argv) { + VAPoR::SetHDF5PluginPath(); + OptionParser op; MyBase::SetErrMsgFilePtr(stderr); diff --git a/apps/cfvdccreate/cfvdccreate.cpp b/apps/cfvdccreate/cfvdccreate.cpp index 71da31d1ab..3a614a0d70 100644 --- a/apps/cfvdccreate/cfvdccreate.cpp +++ b/apps/cfvdccreate/cfvdccreate.cpp @@ -9,6 +9,7 @@ #include #include #include +#include using namespace Wasp; using namespace VAPoR; @@ -144,6 +145,8 @@ void defineMapProjection(const DCCF &dc, VDCNetCDF &vdc) { vdc.SetMapProjection( int main(int argc, char **argv) { + VAPoR::SetHDF5PluginPath(); + OptionParser op; MyBase::SetErrMsgFilePtr(stderr); diff --git a/apps/ncdf2wasp/ncdf2wasp.cpp b/apps/ncdf2wasp/ncdf2wasp.cpp index 3b4a82dd1c..5586515f7a 100644 --- a/apps/ncdf2wasp/ncdf2wasp.cpp +++ b/apps/ncdf2wasp/ncdf2wasp.cpp @@ -8,6 +8,7 @@ #include #include #include +#include using namespace Wasp; using namespace VAPoR; @@ -394,6 +395,8 @@ void Process(string ncdffile, string waspfile) int main(int argc, char **argv) { + VAPoR::SetHDF5PluginPath(); + OptionParser op; MyBase::SetErrMsgFilePtr(stderr); diff --git a/apps/vaporgui/main.cpp b/apps/vaporgui/main.cpp index 359d87629b..0a495b5d1e 100644 --- a/apps/vaporgui/main.cpp +++ b/apps/vaporgui/main.cpp @@ -31,9 +31,11 @@ #include #include #include +#include #ifdef WIN32 #include "Windows.h" #endif + using namespace std; using namespace VAPoR; using namespace Wasp; @@ -151,7 +153,6 @@ int main(int argc, char **argv) // For Mac and Linux, set the PYTHONHOME in this app #if PRE_PYTHON_API_REFACTOR #ifndef WIN32 - const char *s = getenv("PYTHONHOME"); string phome = s ? s : ""; if (!phome.empty()) { @@ -172,10 +173,11 @@ int main(int argc, char **argv) setenv("PYTHONHOME", phome.c_str(), 1); } MyBase::SetDiagMsg("PYTHONHOME = %s", phome.c_str()); - #endif #endif + VAPoR::SetHDF5PluginPath(); + app = &a; vector files; diff --git a/apps/wrf2vdc/wrf2vdc.cpp b/apps/wrf2vdc/wrf2vdc.cpp index 58cf6cce5e..5be229f059 100644 --- a/apps/wrf2vdc/wrf2vdc.cpp +++ b/apps/wrf2vdc/wrf2vdc.cpp @@ -9,6 +9,7 @@ #include #include #include +#include using namespace Wasp; using namespace VAPoR; @@ -54,6 +55,8 @@ string ProgName; int main(int argc, char **argv) { + VAPoR::SetHDF5PluginPath(); + OptionParser op; MyBase::SetErrMsgFilePtr(stderr); diff --git a/apps/wrfvdccreate/wrfvdccreate.cpp b/apps/wrfvdccreate/wrfvdccreate.cpp index 3a0623f4dc..756dfd7a2f 100644 --- a/apps/wrfvdccreate/wrfvdccreate.cpp +++ b/apps/wrfvdccreate/wrfvdccreate.cpp @@ -9,6 +9,7 @@ #include #include #include +#include using namespace Wasp; using namespace VAPoR; @@ -58,6 +59,8 @@ void defineMapProjection(const DCWRF &dcwrf, VDCNetCDF &vdc) { vdc.SetMapProject int main(int argc, char **argv) { + VAPoR::SetHDF5PluginPath(); + OptionParser op; MyBase::SetErrMsgFilePtr(stderr); diff --git a/include/vapor/SetHDF5PluginPath.h b/include/vapor/SetHDF5PluginPath.h new file mode 100644 index 0000000000..e981f70d37 --- /dev/null +++ b/include/vapor/SetHDF5PluginPath.h @@ -0,0 +1,21 @@ +#pragma once + +#include "vapor/ResourcePath.h" + +#ifndef WIN32 + #include +#endif + +namespace VAPoR { +VDF_API void SetHDF5PluginPath() { + string plugins = Wasp::GetSharePath("plugins"); + + #ifndef WIN32 + H5PLreplace(plugins.c_str(), 0); + #else + plugins = "HDF5_PLUGIN_PATH=" + plugins; + int rc=_putenv(plugins.c_str()); + if (rc != 0) MyBase::SetErrMsg("Unable to set environtment variable %s", plugins.c_str()); + #endif +} +}; // namespace VAPoR diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt index 317965fea7..2cc0ffcd10 100644 --- a/lib/common/CMakeLists.txt +++ b/lib/common/CMakeLists.txt @@ -55,7 +55,7 @@ if (CONDA_BUILD AND UNIX AND NOT APPLE) endif() if (NOT WIN32) - target_link_libraries (common pthread) + target_link_libraries (common pthread ${HDF5_LIB}) add_definitions (-DENABLE_THREADS) endif() diff --git a/lib/vdc/CMakeLists.txt b/lib/vdc/CMakeLists.txt index 8cc45a1b64..083e7ee397 100644 --- a/lib/vdc/CMakeLists.txt +++ b/lib/vdc/CMakeLists.txt @@ -92,6 +92,7 @@ set (HEADERS ${PROJECT_SOURCE_DIR}/include/vapor/OpenMPSupport.h ${PROJECT_SOURCE_DIR}/include/vapor/DCUGRID.h ${PROJECT_SOURCE_DIR}/include/vapor/UnstructuredGridCoordless.h + ${PROJECT_SOURCE_DIR}/include/vapor/SetHDF5PluginPath.h ) add_library (vdc SHARED ${SRC} ${HEADERS})