diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index 04dc44bc..c9c700cd 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -2,6 +2,7 @@ on: push: branches: - main + - development jobs: paper: diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index f4e0c601..1a2afc9d 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -1,6 +1,9 @@ name: Minimal on: + push: + branches: + - development pull_request: branches: - main @@ -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 diff --git a/NOTICE b/NOTICE index ffa3992c..6835e0f8 100644 --- a/NOTICE +++ b/NOTICE @@ -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) diff --git a/bin/boost.py b/bin/boost.py index efda962d..1978f4e5 100644 --- a/bin/boost.py +++ b/bin/boost.py @@ -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", @@ -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, diff --git a/bin/cbox.py b/bin/cbox.py index 7e860df3..a3dadbc8 100644 --- a/bin/cbox.py +++ b/bin/cbox.py @@ -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") ), } diff --git a/boxkit/__meta__.py b/boxkit/__meta__.py index 9b4a7235..c574b6e5 100644 --- a/boxkit/__meta__.py +++ b/boxkit/__meta__.py @@ -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" diff --git a/paper/paper.bib b/paper/paper.bib index 36a0b4e0..9ea09df1 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -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, @@ -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}}, +} diff --git a/paper/paper.md b/paper/paper.md index 2280adc0..2bc55e95 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -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 @@ -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 @@ -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 diff --git a/setup.py b/setup.py index 66015a57..3e0b6e4e 100644 --- a/setup.py +++ b/setup.py @@ -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__))) @@ -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", @@ -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={