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 all 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
23 changes: 16 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -640,7 +650,6 @@ workflows:
#- clang-tidy
- build_ubuntu18
- build_centos7
#- foo
#- test_clang_format
#- build_win10_installer
#- build_osx_installer
Expand Down
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions apps/cf2vdc/cf2vdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <vapor/VDCNetCDF.h>
#include <vapor/DCCF.h>
#include <vapor/FileUtils.h>
#include <vapor/SetHDF5PluginPath.h>

using namespace Wasp;
using namespace VAPoR;
Expand Down Expand Up @@ -223,6 +224,8 @@ vector<string> remove_vector(vector<string> v1, vector<string> v2)

int main(int argc, char **argv)
{
VAPoR::SetHDF5PluginPath();

OptionParser op;

MyBase::SetErrMsgFilePtr(stderr);
Expand Down
3 changes: 3 additions & 0 deletions apps/cfvdccreate/cfvdccreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <vapor/VDCNetCDF.h>
#include <vapor/DCCF.h>
#include <vapor/FileUtils.h>
#include <vapor/SetHDF5PluginPath.h>

using namespace Wasp;
using namespace VAPoR;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions apps/ncdf2wasp/ncdf2wasp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <vapor/OptionParser.h>
#include <vapor/WASP.h>
#include <vapor/FileUtils.h>
#include <vapor/SetHDF5PluginPath.h>

using namespace Wasp;
using namespace VAPoR;
Expand Down Expand Up @@ -394,6 +395,8 @@ void Process(string ncdffile, string waspfile)

int main(int argc, char **argv)
{
VAPoR::SetHDF5PluginPath();

OptionParser op;

MyBase::SetErrMsgFilePtr(stderr);
Expand Down
6 changes: 4 additions & 2 deletions apps/vaporgui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
#include <vapor/OptionParser.h>
#include <vapor/FileUtils.h>
#include <vapor/OSPRay.h>
#include <vapor/SetHDF5PluginPath.h>
#ifdef WIN32
#include "Windows.h"
#endif

using namespace std;
using namespace VAPoR;
using namespace Wasp;
Expand Down Expand Up @@ -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()) {
Expand All @@ -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<QString> files;
Expand Down
3 changes: 3 additions & 0 deletions apps/wrf2vdc/wrf2vdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <vapor/VDCNetCDF.h>
#include <vapor/DCWRF.h>
#include <vapor/FileUtils.h>
#include <vapor/SetHDF5PluginPath.h>

using namespace Wasp;
using namespace VAPoR;
Expand Down Expand Up @@ -54,6 +55,8 @@ string ProgName;

int main(int argc, char **argv)
{
VAPoR::SetHDF5PluginPath();

OptionParser op;

MyBase::SetErrMsgFilePtr(stderr);
Expand Down
3 changes: 3 additions & 0 deletions apps/wrfvdccreate/wrfvdccreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <vapor/VDCNetCDF.h>
#include <vapor/DCWRF.h>
#include <vapor/FileUtils.h>
#include <vapor/SetHDF5PluginPath.h>

using namespace Wasp;
using namespace VAPoR;
Expand Down Expand Up @@ -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);
Expand Down
21 changes: 21 additions & 0 deletions include/vapor/SetHDF5PluginPath.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include "vapor/ResourcePath.h"

#ifndef WIN32
#include <H5PLpublic.h>
#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
2 changes: 1 addition & 1 deletion lib/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 1 addition & 0 deletions lib/vdc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down