{"id":13314645,"url":"https://github.com/kaschau/PEREGRINE","last_synced_at":"2025-03-10T21:30:37.956Z","repository":{"id":212857872,"uuid":"385063998","full_name":"kaschau/PEREGRINE","owner":"kaschau","description":"3D Multiblock multiphysics finite volume reacting flow solver. Implemented in Python, Kokkos, and MPI for inter- and intra-node performant parallelism. ","archived":false,"fork":false,"pushed_at":"2025-01-09T21:00:35.000Z","size":7980,"stargazers_count":8,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-09T21:32:15.163Z","etag":null,"topics":["cfd","gpu-computing","hdf5","kokkos","parallel-computing","paraview","python","scientific-computing"],"latest_commit_sha":null,"homepage":"https://kaschau.github.io/PEREGRINE/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaschau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-11T22:29:22.000Z","updated_at":"2025-01-09T21:25:15.000Z","dependencies_parsed_at":"2023-12-16T20:28:07.726Z","dependency_job_id":"a77c848d-ecd7-4c33-acb1-03a9488173f6","html_url":"https://github.com/kaschau/PEREGRINE","commit_stats":{"total_commits":1129,"total_committers":2,"mean_commits":564.5,"dds":0.0008857395925597755,"last_synced_commit":"72822cde15c9ba9c72c9df7847ead9a88e321f5d"},"previous_names":["kaschau/peregrine"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaschau%2FPEREGRINE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaschau%2FPEREGRINE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaschau%2FPEREGRINE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaschau%2FPEREGRINE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaschau","download_url":"https://codeload.github.com/kaschau/PEREGRINE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242929977,"owners_count":20208383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfd","gpu-computing","hdf5","kokkos","parallel-computing","paraview","python","scientific-computing"],"created_at":"2024-07-29T18:11:50.555Z","updated_at":"2025-03-10T21:30:37.947Z","avatar_url":"https://github.com/kaschau.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PEREGRINE: Accessible, Performant, Portable Multiphysics CFD\n\n\u003cp align=\"center\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" width=\"800\" srcset=\"docs/images/pgSplashD2.jpg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" width=\"800\" srcset=\"docs/images/pgSplashL2.jpg\"\u003e\n      \u003cimg alt=\"peregrine logo\" width=\"800\" src=\"docs/images/pgSplashL2.jpg\"\u003e\n    \u003c/picture\u003e\n\u003c/p\u003e\n\n## About\n\nPEREGRINE is a second order, multiblock, structured-grid multiphysics, finite volume, 3D CFD solver. The main novelty of PEREGRINE is its implementation in [Python](https://www.python.org) for ease of development and use of [Kokkos](https://www.github.com/kokkos/kokkos) for performance portability. If you are unfamiliar with Kokkos, do a little digging, it is a great project with a healthy community and helpful developers. The TLDR; Kokkos is a C++ library (not a C++ language extension) that exposes useful abstractions for data management (i.e. multidimensional arrays) and kernel execution from CPU-Serial to GPU-Parallel. This allows a single source, multiple architecture, approach in PEREGRINE. In other words, you can run a case with PEREGRINE on your laptop, then without changing a single line of source code, run the same case on a AMD GPU based super computer. PEREGRINE is massively parallel inter-node via MPI communication.\n\n## Installation\n\nYou must first install [Kokkos](https://www.github.com/kokkos/kokkos) and set the environment variable `Kokkos_DIR=/path/to/kokkos/install`. The Kokkos installation controls the Host/Device + Serial/Parallel execution parameters, there are no settings for the python installation.\n\n## Easy Install\nFor editable python installation:\n\n``` pip install -e . ```\n\nNote, installation with pip is hard coded to Debug mode. I can't figure out how to make that an option.\n\n## Recommended Install\nFor development, it is better to set the environment variable `PYTHONPATH` to point to `/path/to/PEREGRINE/src/` followed by manual installation of the C++ `compute` module:\n\n```cd /path/to/PEREGRINE; mkdir build; cd build; ccmake ../; make -j install```\n\nTo generate compile_commands.json, \n\n``` cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../ ```\n\n## Documentation\n\nSee the documentation [here](./docs/documentation.md).\n\n## Profiling GPU via NVTX\nDownload and install the libraries found at [here](https://github.com/kokkos/kokkos-tools). At runtime, ensure the environment variable\n\n    $ export KOKKOS_PROFILE_LIBRARY=/path/to/kokkos-tools/kp_nvprof_connector.so\n\nis set. Finally, run the simulation with nsys enabling cuda,nvtx trace options.\n\n    jsrun -p 1 -g 1 nsys profile -o outPutName --trace cuda,nvtx  -f true --stats=false python -m mpi4py pgScript.py\n\n## Performance\n\nPEREGRINE is pretty fast by default. However, when running a simulation with multiple chemical species, it is recommended to turn on `PEREGRINE_NSCOMPILE` in cmake, and then specify the value of `numSpecies`. This will hard code `ns` at compile time, and gives a considerable performance improvement for EOS/transport calculations.\n\n## Parallel I/O \n\nParallel I/O can be achieved with a parallel capable h5py installation. \n\n    $ export CC=mpicc\n    $ export HDF5_MPI=\"ON\"\n    $ export HDF5_DIR=\"/path/to/parallel/hdf5\"  # If this isn't found by default\n    $ pip install h5py --no-binary=h5py\n    \n`$HDF5_DIR` must point to a parallel enabled HDF5 installation. Parallel I/O is only applicable when running simulations with `config[\"io\"][\"lumpIO\"]=true`.\n\n## Attribution\n\nPlease use the following BibTex to cite PEREGRINE in scientific writing:\n\n```\n@misc{PEREGRINE,\n   author = {Kyle A. Schau},\n   year = {2021},\n   note = {https://github.com/kaschau/PEREGRINE},\n   title = {PEREGRINE: Accessible, Performant, Portable Multiphysics CFD}\n}\n```\n\n## License\n\nPEREGRINE is released under the New BSD License (see the LICENSE file for details).\nDocumentation is made available under a Creative Commons Attribution 4.0\nlicense (see \u003chttp://creativecommons.org/licenses/by/4.0/\u003e).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaschau%2FPEREGRINE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaschau%2FPEREGRINE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaschau%2FPEREGRINE/lists"}