Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New3rd party libraries #3110

Merged
merged 35 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c321001
Update new 3rd party libraries for 3.7
sgpearse May 25, 2022
bf5ad5b
fix ubuntu build
sgpearse May 25, 2022
1d43283
fix 3rd party library file names
sgpearse May 25, 2022
bc96017
fix 3rd party library file names
sgpearse May 25, 2022
5c90026
updates
sgpearse Jun 24, 2022
024e3a0
update cmakelists
sgpearse Jun 24, 2022
f46c58c
turn off installer builds
sgpearse Jun 24, 2022
edc78eb
change hdf5 plugin path
sgpearse Jul 5, 2022
3c671c8
fix typo
sgpearse Jul 5, 2022
e711645
add HDF5 env variable to windows
sgpearse Jul 12, 2022
abec656
simplify hdf5 plugin path on UNIX
sgpearse Jul 13, 2022
7648d24
Remove HDF5 plugin error
sgpearse Jul 13, 2022
92f566e
create SetHDF5pluginPath() in lib/common/ResourcePath.cpp
sgpearse Jul 14, 2022
7032c99
revert some CMakeLists.txt changes
sgpearse Jul 14, 2022
000ada1
test
sgpearse Jul 14, 2022
7b9af49
windows update
sgpearse Jul 15, 2022
1d2d932
resolve conflicts with main
sgpearse Jul 15, 2022
ae6c18f
Merge branch 'newLibraries' of https://github.com/NCAR/VAPOR into new…
sgpearse Jul 15, 2022
138105b
fix CI conflict
sgpearse Jul 15, 2022
c67250f
fix CI conflict
sgpearse Jul 15, 2022
f8c1252
osx update
sgpearse Jul 18, 2022
894ee16
update plugin installation path
sgpearse Aug 11, 2022
c7eb393
test
sgpearse Aug 12, 2022
78573fa
test
sgpearse Aug 12, 2022
2fd8f26
Test
sgpearse Aug 12, 2022
af029cd
Test
sgpearse Aug 12, 2022
08f3697
Test
sgpearse Aug 12, 2022
d4810cb
add message
Aug 12, 2022
28dd4f1
Merge branch 'newLibraries' of https://github.com/NCAR/VAPOR into new…
sgpearse Aug 12, 2022
b5d6fec
fix osx build and address comments
sgpearse Aug 12, 2022
0340a34
test installer builds
sgpearse Aug 12, 2022
612fc54
merge
sgpearse Aug 12, 2022
b8998b1
swap libraries to vdc for SetHDF5PluginPath
sgpearse Aug 16, 2022
bf3e985
forgot to add the important file
sgpearse Aug 16, 2022
ab754df
turn off build tests
sgpearse Aug 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ jobs:
steps:
- checkout

- run:
name: update 3rd party libraries
command: |
rm -rf /usr/local/VAPOR-Deps/2019-Aug
apt update
apt install -y python3-pip
pip3 install gdown
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: make installer
command: |
Expand All @@ -179,7 +190,16 @@ jobs:

steps:
- checkout


- 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=1S9DwySMnQrBuUUZGKolD__WQrjTmLgyn
filename="/root/project/2019-Aug-CentOS.tar.xz"
bsdtar -xf ${filename} -C /usr/local/VAPOR-Deps

- run:
name: cmake3 and make
command: |
Expand Down Expand Up @@ -312,8 +332,18 @@ jobs:
command: |
apt-get update
apt-get install -y python3
apt install -y python3-pip
- checkout

- 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: make debug
command: |
Expand Down Expand Up @@ -407,6 +437,15 @@ jobs:
steps:
- checkout

- 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=1S9DwySMnQrBuUUZGKolD__WQrjTmLgyn
filename="/root/project/2019-Aug-CentOS.tar.xz"
bsdtar -xf ${filename} -C /usr/local/VAPOR-Deps

- run:
name: make debug
command: |
Expand Down
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ if (WIN32)
${QTDIR}/plugins/platforms/qwindows.dll
DESTINATION platforms
)
install (
DIRECTORY ${THIRD_PARTY_DIR}/lib/plugin
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT Dependencies
)
endif (GENERATE_FULL_INSTALLER)

set (CPACK_NSIS_MODIFY_PATH OFF)
Expand All @@ -284,7 +289,7 @@ endif (WIN32)
if (APPLE)
set (CPACK_BINARY_DRAGNDROP ON)
if (DIST_INSTALLER AND GENERATE_FULL_INSTALLER)
file (GLOB INSTALL_LIBS ${THIRD_PARTY_LIB_DIR}/*.dylib ${OSPRAYDIR}/lib/*.dylib)
file (GLOB INSTALL_LIBS "${THIRD_PARTY_LIB_DIR}/*.dylib" "${OSPRAYDIR}/lib/*.dylib")
file (GLOB INSTALL_FRAMEWORKS ${THIRD_PARTY_LIB_DIR}/*.framework ${PYTHONPATH} ${QTDIR}/lib/*.framework)
install (
FILES ${INSTALL_LIBS}
Expand Down Expand Up @@ -316,6 +321,12 @@ if (APPLE)
COMPONENT Dependencies
)
endif ()
file (GLOB_RECURSE HDF5_PLUGINS "${THIRD_PARTY_LIB_DIR}/hdf/*.so")
install (
FILES ${HDF5_PLUGINS}
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT Dependencies
)

endif ()
endif (APPLE)
Expand Down Expand Up @@ -385,6 +396,13 @@ if (UNIX AND NOT APPLE)
)
endif ()

file (GLOB HDF5_PLUGINS "${THIRD_PARTY_LIB_DIR}/hdf/HDF_Group/HDF5/1.12.2/lib/plugin/*.so")
message(STATUS "HDF5_PLUGINS ${HDF5_PLUGINS}")
install (
FILES ${HDF5_PLUGINS}
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT Dependencies
)

endif (DIST_INSTALLER AND GENERATE_FULL_INSTALLER)
endif (UNIX AND NOT APPLE)
Expand Down
4 changes: 3 additions & 1 deletion apps/vaporgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ set (CMAKE_INCLUDE_CURRENT_DIR ON)
set (ASSIMP_LIB assimp)
set (PYTHON_LIB python${PYTHONVERSION}m)
set (TIFF_LIB tiff)
set (HDF5_LIB hdf5)

if (APPLE)
set (SRCS ${SRCS} core_profile_attributes.mm)
Expand All @@ -369,6 +370,7 @@ elseif (WIN32)
set (ASSIMP_LIB assimp-vc140-mt)
set (PYTHON_LIB python${PYTHONVERSION})
set (TIFF_LIB libtiff)
set (TIFF_LIB libhdf5)

set (WINDOWS_ICON_PATH "${CMAKE_SOURCE_DIR}/share/images/vapor-win-icon.ico")
configure_file (vapor.rc.in ${CMAKE_CURRENT_BINARY_DIR}/vaporgui.rc)
Expand All @@ -379,7 +381,7 @@ endif()

target_link_libraries (
vapor common vdc wasp render params jpeg ${GLEW}
${TIFF_LIB} geotiff ${ASSIMP_LIB} Qt5::Widgets Qt5::OpenGL Qt5::Core Qt5::Gui Qt5::DBus Qt5::Network
${HDF5_LIB} ${TIFF_LIB} geotiff ${ASSIMP_LIB} Qt5::Widgets Qt5::OpenGL Qt5::Core Qt5::Gui Qt5::DBus Qt5::Network
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the GUI links against HDF5?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. This is because main.cpp is the only thing making a call to HDF5 in order to set the plugin path.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the GUI will support ZFP data but our command line utilities won't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - netcdf, and wrf utilites now link to the hdf5 plugins.

${PYTHON_LIB}
)

Expand Down
10 changes: 8 additions & 2 deletions apps/vaporgui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
#include <vapor/OSPRay.h>
#ifdef WIN32
#include "Windows.h"
#else
#include <H5PLpublic.h>
#endif

using namespace std;
using namespace VAPoR;
using namespace Wasp;
Expand Down Expand Up @@ -148,9 +151,9 @@ int main(int argc, char **argv)
//
setlocale(LC_ALL, "C");

// For Mac and Linux, set the PYTHONHOME in this app
// For Mac and Linux, set the PYTHONHOME and HDF5 plugin path in this app
#ifndef WIN32

// PYTHON
const char *s = getenv("PYTHONHOME");
string phome = s ? s : "";
if (!phome.empty()) {
Expand All @@ -172,6 +175,9 @@ int main(int argc, char **argv)
}
MyBase::SetDiagMsg("PYTHONHOME = %s", phome.c_str());

// HDF5
string plugins = GetResourcePath("lib");
H5PLreplace(plugins.c_str(), 0);
#endif

app = &a;
Expand Down
5 changes: 4 additions & 1 deletion lib/vdc/NetCDFSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ int NetCDFSimple::Read(const size_t start[], const size_t count[], float *data,

int rc = nc_get_vara_float(_ncid, varid, start, count, data);
if (rc != 0) {
SetErrMsg("nc_get_vara_float(%d, %d) : %s", _ncid, varid, nc_strerror(rc));
std::string error = nc_strerror(rc);
if (error.find("NetCDF: Filter error: unimplemented filter encountered") != std::string::npos)
SetErrMsg("\nHave you set the environment variable HDF5_PLUGIN_PATH to Vapor's /lib directory?\n");
StasJ marked this conversation as resolved.
Show resolved Hide resolved
SetErrMsg("nc_get_vara_float(%d, %d) : %s", _ncid, varid, error.c_str());
StasJ marked this conversation as resolved.
Show resolved Hide resolved
return (-1);
}
return (0);
Expand Down