Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- main
- development

jobs:
paper:
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Minimal

on:
push:
branches:
- development
pull_request:
branches:
- main
Expand All @@ -13,8 +16,27 @@ on:

jobs:

library:
name: "library"
windows:
name: "windows"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip3 install click
pip3 install -r requirements/core.txt
- name: Run setup
run: |
python3 setup.py install --user
- name: Run tests
run: |
python3 tests/container/create.py

ubuntu:
name: "ubuntu"
runs-on: ubuntu-latest
steps:
#- name: Login to Docker Hub
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 UChicago Argonne, LLC and contributors. All rights reserved.
Copyright (c) 2023 UChicago Argonne LLC. All rights reserved.

Title: BoxKit (SF-23-067)

Expand Down
4 changes: 2 additions & 2 deletions bin/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def boost_build():
"cd submodules/boost && ./bootstrap.sh"
+ f" --with-python-version={get_python_version()}"
+ " --with-toolset=gcc"
+ f" --prefix={os.getenv('PWD')}/boxkit/depends/boost && ./b2 install",
+ f" --prefix={os.getcwd()}/boxkit/depends/boost && ./b2 install",
shell=True,
check=True,
executable="/bin/bash",
Expand All @@ -40,7 +40,7 @@ def boost_clean():

def boost_install():
"""Install Boost library"""
if os.path.exists(os.getenv("PWD") + "/boxkit/depends/boost"):
if os.path.exists(os.getcwd() + "/boxkit/depends/boost"):
subprocess.run(
"mkdir -pv build/lib/boxkit/depends/boost/lib",
shell=True,
Expand Down
8 changes: 4 additions & 4 deletions bin/cbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"boost_version": "".join(sysconfig.get_python_version().split(".")),
"python_include_path": sysconfig.get_python_inc(),
"boost_include_path": (
os.getenv("PWD") + "/boxkit/depends/boost/include"
if os.path.exists(os.getenv("PWD") + "/boxkit/depends/boost")
os.getcwd() + "/boxkit/depends/boost/include"
if os.path.exists(os.getcwd() + "/boxkit/depends/boost")
else os.getenv("BOOST_INCLUDE_DIR")
),
"boost_lib_path": (
os.getenv("PWD") + "/boxkit/depends/boost/lib"
if os.path.exists(os.getenv("PWD") + "/boxkit/depends/boost")
os.getcwd() + "/boxkit/depends/boost/lib"
if os.path.exists(os.getcwd() + "/boxkit/depends/boost")
else os.getenv("BOOST_LIB_DIR")
),
}
Expand Down
6 changes: 3 additions & 3 deletions boxkit/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Metadata for BoxKit package"""

__pkgname__ = "BoxKit"
__version__ = "2023.06.7"
__version__ = "2023.9.1"
__authors__ = "Akash Dhruv"
__license__ = "Apache License"
__copyright__ = "Copyright (c) Akash Dhruv 2023. All Rights Reserved."
__license__ = "Apache Software License"
__copyright__ = "Copyright (c) 2023 UChicago Argonne LLC and contributors. All Rights Reserved."
__description__ = "BoxKit utility"
20 changes: 14 additions & 6 deletions paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ @article{DUBEY2022
Pages = {101168},
Year = {2022},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2022.101168},
doi = {10.1016/j.softx.2022.101168},
url = {https://www.sciencedirect.com/science/article/pii/S2352711022001030},
Author = {Anshu Dubey and Klaus Weide and Jared O’Neal and Akash Dhruv and Sean Couch and J. Austin Harris and Tom Klosterman and Rajeev Jain and Johann Rudi and Bronson Messer and Michael Pajkos and Jared Carlson and Ran Chu and Mohamed Wahib and Saurabh Chawdhary and Paul M. Ricker and Dongwook Lee and Katie Antypas and Katherine M. Riley and Christopher Daley and Murali Ganapathy and Francis X. Timmes and Dean M. Townsley and Marcos Vanella and John Bachan and Paul M. Rich and Shravan Kumar and Eirik Endeve and W. Raphael Hix and Anthony Mezzacappa and Thomas Papatheodore}
}

@article{DHRUV2023,
Author = {Akash Dhruv},
Title = {A Vortex Damping Outflow Forcing for Multiphase Flows with Sharp Interfacial Jumps},
Year = {2023},
Journal = {Under Review}
@misc{DHRUV2023,
title={A Vortex Damping Outflow Forcing for Multiphase Flows with Sharp Interfacial Jumps},
author={Akash Dhruv},
year={2023},
eprint={2306.10174},
archivePrefix={arXiv},
primaryClass={physics.flu-dyn},
url={https://arxiv.org/abs/2306.10174}
}

@dataset{HASSAN2023,
Expand Down Expand Up @@ -68,3 +71,8 @@ @misc{summit
year = 2023,
howpublished = {\url{https://www.olcf.ornl.gov/summit/}},
}

@misc{boxkit-performance,
title={{BoxKit Performance}},
howpublished= {\url{https://github.com/akashdhruv/boxkit-performance}},
}
18 changes: 13 additions & 5 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ datasets (~10 GB) can leverage BoxKit to improve performance of offline training
This mechanism is part of a broader workflow to integrate simulations with machine
learning using a Fortran-Python bridge shown with dotted lines. \label{fig:workflow}](../media/workflow.png)

Compared to existing data analysis packages like yt [@yt], BoxKit offers more intuitive
abstraction layers over AMR blocks through its metadata wrappers. This provides raw access
to simulation data allowing users to develop their own low-level methods for spatio-temporal
interpolation and stenciled computations. We aim for this library to complement existing
packages rather than replace them.

BoxKit also offers wrappers to scale the process of deploying workflows on NUMA and distributed
computing architectures by providing decorators that can parallelize Python operations over a
single data structure to operate over a list. This can be understood better using the
Expand All @@ -68,7 +74,8 @@ def operation_on_block(block, *args):
pass

# Call the function with list of blocks as the first argument
operation_on_block((block for block in list_of_blocks), *args)
dset = boxkit.read_datset(...)
operation_on_block((block for block in dset.blocklist), *args)
```

The `Action` wrapper converts the function, `operation_on_block`, into a parallel method which
Expand Down Expand Up @@ -107,16 +114,17 @@ increases.

Mapping of AMR data to contingous arrays becomes important for applications
where global operations in space are required. An example of this is SciKit's
``skimage_measure`` method, which can be used to measure bubble shape and size
``skimage.measure`` method, which can be used to measure bubble shape and size
for Flash-X boiling simulations. BoxKit improves performance of this operation
by ~5x.
by ~5x. Data for these performance studies along with corresponding IPython
notebooks can be found in [@boxkit-performance].

# Ongoing work

Our ongoing work focuses on using BoxKit to improve performance of Scientific
Our ongoing work focuses on developing BoxKit to improve performance of Scientific
Machine Learning (SciML) applications and using it as part of a broader workflow
that integrates Fortran/C++ based applications with state-of-art machine learning
packages available in Python shown by dotted lines in \autoref{fig:workflow}.
packages available in Python as highlighted in \autoref{fig:workflow}.

# Acknowledgements

Expand Down
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import sys
import re
import platform
from setuptools import setup, find_packages

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
Expand Down Expand Up @@ -40,14 +41,19 @@
# Call setup command with necessary arguments
# replace existing build and develop commands
# with custom commands defined in 'bin.cmd'
if platform.system() == "Windows":
PACKAGE_DIR = ".\\"
else:
PACKAGE_DIR = "./"

setup(
name=metadata["__pkgname__"],
version=metadata["__version__"],
author=metadata["__authors__"],
description=metadata["__description__"],
license=metadata["__license__"],
packages=find_packages(where="./"),
package_dir={"": "./"},
packages=find_packages(where=PACKAGE_DIR),
package_dir={"": PACKAGE_DIR},
package_data={
"": [
"options.py",
Expand All @@ -58,7 +64,7 @@
long_description=long_description,
classifiers=[
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Apache Software License",
],
install_requires=DEPENDENCIES,
cmdclass={
Expand Down