Giter VIP home page Giter VIP logo

pressio4py's Introduction

Overview

Pressio is an open-source computational framework aimed at advancing the field of reduced-order models (ROMs) for dynamical systems in science and engineering. We employ generic programming, and target shared and distributed-memory applications using arbitrary data-types and diverse programming models.

We believe that the key to develop such a capability from the ground up is to properly identify the building blocks and modularize them accordingly. This is the approach adopted here: the library is composed of several components that can be used independently and in a self-contained fashion, but as a whole constitute the stack foundation of the rom component. One of the main outcome of this is that regardless of your interest in ROMs, you might find useful some of the components of the library.

Click below to checkout the documentation:

Development, versioning and backward compatibility

Until we reach a stable 1.0, please be patient and do not be surprised if the API and functionalities somewhat rapidly change from one 0.x version to the next, thus affecting backward compability. Some components of pressio are more mature and stable than others, but until we can claim the same stability level for all, please keep this mind.

Questions?

Find us on Slack: https://pressioteam.slack.com and/or open an issue on github.

License and Citation

License

The full license is available here.

At some point we plan to publish this, for now we have an arXiv preprint at: https://arxiv.org/abs/2003.07798.

pressio4py's People

Contributors

fnrizzi avatar kennychowdhary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pressio4py's Issues

cmake: automate creation of regression tests

Currently we have a non-scalable way to create regression tests, see the cmakelists inside the tests/regression.
Need to automate the creation so that we don't add each test individually.
But we need to come up with a convention to name them .

masked MLP ROMs

Is it possible to create masked MLP based ROMs by replacing the linearDecoder in runMaskedLSPG from the unsteady_masked_galerkin_vs_lspg_advdiff1d_pod example with a decoder obtained from an autoencoder network? fomInitialState and romState will have to be set corrrectly; and finally romState will have to be decoded correctly and returned. Please let me know if I'm thinking in the correct direction.

fix CI using the new pip command

@kennychowdhary
Now that pressio4py can be installed using pip (see this: https://pypi.org/project/pressio4py/) we need to change the github action commands. To do so, the new action should be updated to include the following steps:

export CXX=path-to-c++-compiler
cd <the-current-branch-to-run-action-on>
cd pressio/; git pull; git checkout develop; cd -

# build pressio4py
python setup.py build
# run unit tests
cd build; pytest; cd -

python setup.py install 
# run regression tests
pytest 

(2) Also, we need to verify that the build works for several c++ compiler versions.

(3) python3 setup.py sdist bdist_wheel

setup.py: prepare for pip

@kennychowdhary
some specific things to figure out:

  • where to put the init.py?
  • what else to add to setup.py?
  • more checks to do inside setup.py: e.g. cmake version and if CXX is found in environemtn with maybe more detailed message as to what version to use ideally
  • what does install do? does it copy just the library? if so, what other "regular" files we need to tell setup.py to install?
    e.g. licence, etc
  • if I do python setup.py build I know the build directory is created inside the pressio4py repo. Is. there a way to put the build directory outside the source? I don't like to have builds inside source tree.
  • also, if I do pip install pressio4py, where is the build directory created?

proper build structure of tests

Right now we have to copy the python test files into the same directory as the .so file so we can easily import pressio4py into the python test files. We want to place the test files in the correct subfolders. One option is to add a temporary python path in the beginning of the .py test file so that the python file doesn’t have to be in the same directory as the python .so file. Alternatively, we need to look for a method to somehow temporarily add a path to the python file (similar to the addpath functionality) but using a cmake directive in case we might need to change the directory structure.

Right now, when you build you get this structure (subdirectories are marked with *):

*burgers1d_galerkin
*burgers1d_lspg
burgers1d_sparse_jacobian.py
cmake_install.cmake
CMakeCache.txt
*CMakeFiles
Makefile
pressio4py.cpython-36m-darwin.so
test_burgers1d_galerkin.py
test_burgers1d_lspg.py
test_decoder.py
test_wrapper_module.cpython-36m-darwin.so
test_wrapper.py
*tests

what I would like is to have all tests inside tests, which means tests should have the same structure that is has in the source as follows:

tests
  /regression
    /burgers1d_galerkin
    /burgers1d_lapg
  /unit
    test_decoder.py
    test_wrapper.py 
    test_wrapper_module.cpython-36m-darwin.so

and the top-level build then looks like this:

cmake_install.cmake
CMakeCache.txt
*CMakeFiles
Makefile
pressio4py.cpython-36m-darwin.so
*tests

CXX env var missing!

As the project mentioned, I defined the environment variable CXX referring to /usr/bin/g++, but the project raises the following runtime error at the installation process:

RuntimeError: CXX env var missing, needs to point to your target C++ compiler

The error is raised both in the pip install pressio4py and GitHub source code building commands.

export CXX=$(which g++) && sudo pip3 install pressio4py
export CXX=$(which g++) && sudo pip3 install ./pressio4py # build from souce

Finally, the problem has been solved by editing setup.py file, adding os.environ['CXX'] = '/usr/bin/g++' at line 110.

OS: Manjaro,
Python: 3.9,
pip: versions 20 and 21.

logging level

Need to fix logic for logging levels.

  • when built in release mode, set min to info.
  • for debug mode, turn on auotmatically PRESSIO_DEBUG_PRINT and set min level to debug

questions about hyper-reduction and masking

Hello,

  1. What is the difference between hyper-reduction and masking? Which one is more efficient? I think it is hyper-reduction.

  2. Is there a demo of hyper-reduction available? I'm interested in a demo corresponding to the following link

https://pressio.github.io/pressio4py/html/md_pages_components_rom_lspg_hypred.html

  1. Where can I browse the source? I can't find source corresponding to , let's say,
    pressio4py.rom.lspg.unsteady.HypredProblem

Thanks in advance,

Nachiket

miniapp with multiple fields

We need a miniapp, similar to the adv-diffusion, that has multiple fields.
For example we use the adv-diffusion to evolve multiple concentrations.
This is needed to test/show the tensor galerkin formulation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.