Skip to content

Commit

Permalink
Add relay.io.silo to the python interface (#1235)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinPrivitera committed Jan 27, 2024
1 parent a997ed0 commit d1be765
Show file tree
Hide file tree
Showing 9 changed files with 627 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s

#### Relay
- Added ability to read N-dimensional hyperslabs from HDF5 leaf arrays into linear memory arrays.
- Added `conduit.relay.io.silo` to the Python interface.

#### Blueprint
- Added a `conduit::blueprint::mesh::examples::tiled()` function that can generate meshes by repeating a tiled pattern.
Expand Down
1 change: 1 addition & 0 deletions src/libs/conduit/python/py_src/relay/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .conduit_relay_io_python import *

from . import blueprint
from . import silo



14 changes: 14 additions & 0 deletions src/libs/conduit/python/py_src/relay/io/silo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit
# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
# other details. No copyright assignment is required to contribute to Conduit.

###############################################################################
# file: __init__.py
# Purpose: Main init for the conduit relay io module.
###############################################################################

# silo support is optional, so drive on if we can't import
try:
from .conduit_relay_io_silo_python import *
except:
pass
1 change: 1 addition & 0 deletions src/libs/conduit/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def adjust_windows_args_paths():
'conduit.relay',
'conduit.relay.io',
'conduit.relay.io.blueprint',
'conduit.relay.io.silo',
'conduit.relay.mpi',
'conduit.relay.web'],
cmdclass={'install_egg_info': SkipEggInfo})
Expand Down
14 changes: 14 additions & 0 deletions src/libs/relay/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ PYTHON_ADD_COMPILED_MODULE(NAME conduit_relay_io_blueprint_python
# link with the proper libs (beyond python)
target_link_libraries(conduit_relay_io_blueprint_python conduit conduit_relay conduit_blueprint conduit_python_build)

if(SILO_FOUND)

# add relay io silo submodule
PYTHON_ADD_COMPILED_MODULE(NAME conduit_relay_io_silo_python
DEST_DIR python-modules
PY_MODULE_DIR conduit/relay/io/silo
SOURCES conduit_relay_io_silo_python.cpp
${CMAKE_CURRENT_BINARY_DIR}/conduit_relay_python_exports.h
FOLDER libs/python)

# link with the proper libs (beyond python)
target_link_libraries(conduit_relay_io_silo_python conduit conduit_relay conduit_blueprint conduit_python_build)

endif()

if(ENABLE_RELAY_WEBSERVER)
# add relay web submodule
Expand Down

0 comments on commit d1be765

Please sign in to comment.