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

[BUILD] How do I enable BLOSC compression codec? #1745

Open
rddrdhd opened this issue Jan 3, 2024 · 0 comments
Open

[BUILD] How do I enable BLOSC compression codec? #1745

rddrdhd opened this issue Jan 3, 2024 · 0 comments
Labels

Comments

@rddrdhd
Copy link

rddrdhd commented Jan 3, 2024

Environment

Operating System: CentOS Linux release 7.9
Version: OpenVDB v10.1.0
CMake Version: 3.20.1
Compiler: gcc 10.2.0

Describe the problem

When I try to run my built project, I get

An exception occurred: "BLOSC compression codec was disabled during build"

which I understand it was disabled during my OpenVDB lib build, even though using a flag NANOVDB_USE_BLOSC=ON. Or maybe it was disabled in my project built? Or maybe I'm just not using it correctly?

To Reproduce

in main.cpp:

    openvdb::initialize();

    openvdb::io::File inputFile("/path/to/input.vdb"); 
    auto grids = inputFile.getGrids();

    const std::string outputFile = "/path/to/output.nvdb";
    nanovdb::io::Codec codec = nanovdb::io::Codec::BLOSC;
    std::ofstream os(outputFile, std::ios::out | std::ios::binary);

    for (auto& srcGrid : *grids) {
        auto handle = nanovdb::openToNanoVDB<nanovdb::CudaDeviceBuffer>(srcGrid);
        // ... 
        nanovdb::io::writeGrid(os, handle, codec);
    }

Additional context

I'm building OpenVDB with this:

cmake .. \
-DUSE_NANOVDB=ON \
-DNANOVDB_BUILD_UNITTESTS=OFF \
-DNANOVDB_BUILD_EXAMPLES=ON \
-DNANOVDB_USE_INTRINSICS=ON \
-DNANOVDB_USE_CUDA=ON \
-DNANOVDB_CUDA_KEEP_PTX=ON \
-DNANOVDB_USE_OPENVDB=ON \
-DNANOVDB_USE_BLOSC=ON \
-DTBB_ROOT=/path/to/tbb/2020.3 \
-DBOOST_ROOT=/path/to/Boost/1.74.0 \
-DBLOSC_ROOT=/path/to/c-blosc/1.21.0 \
-DCMAKE_INSTALL_PREFIX:PATH=/path/to/my/openvdb/install
@Idclip Idclip added the nanovdb label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants