Skip to content

(2022-10-19) Lab Notebook: OpenVDB installaion with Conda

Warning

This is as a Lab Notebook which describes how to solve a specific problem at a specific time. Please keep this in mind as you read and use the content. Please pay close attention to the date, version information and other details.

Lab Notebook --- Building OpenVDB using a Conda environment (2022-10-19)

Warning

EXTRA WARNING: I'm not even sure I would recommmend this method as of writing. Now that HPCC recognizes the updated (1.21.0) Blosc module all the important modules (Boost, tbb, and blosc) should be available through module load. However, in case that breaks or a conda enviroment is needed, here are the instructions.

OpenVDB is an open source C++ library comprising a novel hierarchical data structure and a large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids. For more information see their Github page

Building the library via a Conda enviroment

First, to setup you conda environment with the necessary dependencies, do:

1
2
conda create -n openvdb_dep cmake gcc gxx boost tbb tbb-devel blosc
conda activate openvdb_dep

Then, in this environment, run the following commands which are a slight modified the install instructions from https://github.com/AcademySoftwareFoundation/openvdb:

1
2
3
4
5
6
git clone https://github.com/AcademySoftwareFoundation/openvdb.git
cd openvdb
mkdir build
cd build
cmake .. -DZLIB_ROOT=<path_to_your_conda_enviroment> -DCMAKE_INSTALL_PREFIX=<path_to_where_you_want_to_install_openvdb>
make -j4 && make install

The file paths to the depedencies, <path_to_your_conda_enviroment>, should be something like /mnt/home/your_netid_name/anaconda3/envs/openvdb_dep/

The install directory <path_to_where_you_want_to_install_openvdb> can be anywhere in your home directory (but its best to make it a folder called 'openvdb' because make will write the bin, include, and lib folders there), just make sure you know where it is so you can point to it/add it to your path as need.