pftools

Parflow is an open-source parallel watershed flow model.

https://github.com/parflow/parflow

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    19 of 51 committers (37.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords from Contributors

mesh hydrology open-science interactive earth-system-model imaging numerical sequences generic projection
Last synced: 10 months ago · JSON representation

Repository

Parflow is an open-source parallel watershed flow model.

Basic Info
  • Host: GitHub
  • Owner: parflow
  • License: other
  • Language: C
  • Default Branch: master
  • Homepage: http://parflow.org
  • Size: 104 MB
Statistics
  • Stars: 189
  • Watchers: 21
  • Forks: 115
  • Open Issues: 97
  • Releases: 15
Created about 10 years ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License

README-GPU.md

Building Parflow with GPU acceleration

WARNING! Parflow GPU support is still in beta and there may be issues with it.

The GPU acceleration is currently compatible only with NVIDIA GPUs either using CUDA directly or using CUDA through the Kokkos library. The minimum supported CUDA compute capability for the hardware is 6.0 (NVIDIA Pascal architecture).

Building with CUDA or Kokkos may improve the performance significantly for large problems but is often slower for test cases and small problems due to initialization overhead associated with the GPU use. Currently, the only preconditioner resulting in a good performance is MGSemi, when applied to spinup problems. Installation reference can be found in Ubuntu recipe, Dockerfile, and linux.yml.

CMake

Building with GPU acceleration requires a CUDA installation, and in case Kokkos is used, Kokkos installation. However, the performance can be further improved by using pool allocation for Unified Memory. Supported memory managers for pool allocation are: RMM v0.10 and Umpire. Note that we are in the process of updating RMM to the newest API, but that should not affect users. Note that you should use only one memory manager, you can't pick both RMM and Umpire. Performance can be improved even more with direct communication between GPUs (requires using a CUDA-Aware MPI library).

The GPU acceleration is activated by specifying either PARFLOWACCELERATORBACKEND=cuda option to the CMake, i.e.,

shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=cuda or PARFLOWACCELERATORBACKEND=kokkos and DKokkos_ROOT=/path/to/Kokkos i.e., shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=kokkos -DKokkos_ROOT=/path/to/Kokkos where DPARFLOWAMPSLAYER=mpi1 leverages GPU-based data packing and unpacking. By default, the packed data is copied to a host staging buffer which is then passed for MPI to avoid special requirements for the MPI library. Direct communication between GPUs (with GPUDirect P2P/RDMA) can be activated by specifying an environment variable PARFLOWUSEGPUDIRECT=1 during runtime in which case the memory copy between CPU and GPU is avoided and a GPU pointer is passed for MPI, but this requires a CUDA-Aware MPI library (support for Unified Memory is not required with the native CUDA backend because the pointers passed to the MPI library point to pinned GPU memory allocations, but is required with the Kokkos backend).

Furthermore, RMM library can be activated by specifying the RMM root directory with -DRMMROOT=/path/to/rmmroot* as follows: shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=cuda -DRMM_ROOT=/path/to/RMM or shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=kokkos -DKokkos_ROOT=/path/to/Kokkos -DRMM_ROOT=/path/to/RMM

Similarly, the Umpire library can be activated by specifying the Umpire root directory with -Dumpire_ROOT=/path/to/umpire/root

shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=cuda -Dumpire_ROOT=/path/to/umpire or shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=kokkos -DKokkos_ROOT=/path/to/Kokkos -Dumpire_ROOT=/path/to/umpire

Note that on some systems, nvcc cannot locate the MPI include files by default, if this is the case, defining the environment variable CUDAHOSTCXX=mpicxx might help.

Finally, you must make sure you are building the code for the correct GPU architecture. First, find the compute capability of your device (e.g. A100 is CC 80, H100 is CC 90, etc). Then, you can specify it as a CMake option with -DCMAKECUDAARCHITECTURES={CC}:

shell cmake ../parflow -DPARFLOW_AMPS_LAYER=mpi1 -DCMAKE_BUILD_TYPE=Release -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DCMAKE_INSTALL_PREFIX=${PARFLOW_DIR} -DPARFLOW_ACCELERATOR_BACKEND=cuda -Dumpire_ROOT=/path/to/umpire -DCMAKE_CUDA_ARCHITECTURES=90

Running Parflow with GPU acceleration

Running Parflow built with GPU support requires that each MPI process has access to a GPU device. Best performance is typically achieved by launching one MPI process per available GPU device. The MPI processes map to the available GPUs by

cudaSetDevice(node_local_rank % local_num_devices);

where nodelocalrank and localnumdevices are the node-local rank of the process and the number of GPUs associated with the corresponding node, respectively. Therefore, launching 4 MPI processes per node that has 4 GPUs automatically means that each process uses a different GPU. Launching more processes (than the number of available GPUs) is only supported when using CUDA Multi-Process Service (MPS), but this typically results in reduced performance.

Any existing input script can be run with GPU acceleration; no changes are necessary. However, it is noted that two subsequent runs of the same input script using the same compiled executable are not guaranteed to produce identical results. This is expected behavior due to atomic operations performed by the GPU device (i.e., the order of floating-point operations may change between two subsequent runs).

Owner

  • Name: Parflow
  • Login: parflow
  • Kind: organization

ParFlow is an integrated, parallel watershed model that makes use of high-performance computing to simulate surface and subsurface fluid flow.

GitHub Events

Total
  • Fork event: 16
  • Create event: 6
  • Release event: 3
  • Issues event: 22
  • Watch event: 22
  • Delete event: 2
  • Member event: 12
  • Issue comment event: 43
  • Push event: 55
  • Gollum event: 11
  • Pull request review event: 77
  • Pull request review comment event: 60
  • Pull request event: 91
Last Year
  • Fork event: 16
  • Create event: 6
  • Release event: 3
  • Issues event: 22
  • Watch event: 22
  • Delete event: 2
  • Member event: 12
  • Issue comment event: 43
  • Push event: 55
  • Gollum event: 11
  • Pull request review event: 77
  • Pull request review comment event: 60
  • Pull request event: 91

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 913
  • Total Committers: 51
  • Avg Commits per committer: 17.902
  • Development Distribution Score (DDS): 0.35
Past Year
  • Commits: 63
  • Committers: 10
  • Avg Commits per committer: 6.3
  • Development Distribution Score (DDS): 0.413
Top Committers
Name Email Commits
Steven Smith s****4@l****v 593
Reed Maxwell r****l@m****u 130
Ian Ferguson i****n@u****v 31
gartavanis 3****s 20
Paul Rigor k****r 12
Nick Engdahl n****l@w****u 9
Fabian Gasper f****r@f****e 8
Jaro Hokkanen j****n@f****e 7
reedmaxwell r****l@p****u 7
Calla Chennault c****t@g****m 7
Patrick Avery p****y@k****m 6
Juan S. Acero Triana 5****t 6
Muhammad Fahad Azeemi m****d@f****e 5
Laura Condon l****n@e****u 5
grapp1 4****1 5
Sebastien Jourdain s****n@k****m 5
Andrew Bennett b****r@g****m 5
Ketan Kulkarni k****i@g****m 3
Vineet Bansal v****l@p****m 3
dependabot[bot] 4****] 3
xy124 x****4 3
DrewLazzeriKitware 7****e 2
David Thompson d****n@k****m 2
Basile Hector b****r@g****m 2
Jackson Swilley 5****m 2
Rob de Rooij r****j@u****u 2
elena-leo 7****o 2
alanquits g****e@g****m 2
Joe Beisman j****n@g****m 2
Laura Condon l****n@m****u 2
and 21 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 224
  • Total pull requests: 490
  • Average time to close issues: 3 months
  • Average time to close pull requests: 21 days
  • Total issue authors: 63
  • Total pull request authors: 46
  • Average comments per issue: 1.44
  • Average comments per pull request: 0.72
  • Merged pull requests: 424
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 21
  • Pull requests: 115
  • Average time to close issues: 20 days
  • Average time to close pull requests: 13 days
  • Issue authors: 10
  • Pull request authors: 12
  • Average comments per issue: 0.57
  • Average comments per pull request: 0.37
  • Merged pull requests: 83
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • smithsg84 (117)
  • jsacerot (11)
  • xy124 (9)
  • elappala (4)
  • vineetbansal (4)
  • alanquits (3)
  • surak (3)
  • cozisco (3)
  • mvhulten (3)
  • kvrigor (2)
  • kulkarni1 (2)
  • wrs827 (2)
  • chrisreidy (2)
  • nbengdahl (2)
  • reedmaxwell (2)
Pull Request Authors
  • smithsg84 (273)
  • gartavanis (39)
  • reedmaxwell (25)
  • kvrigor (19)
  • mfahdaz (10)
  • westb2 (8)
  • callachennault (8)
  • jourdain (8)
  • jsacerot (7)
  • hokkanen (7)
  • psavery (6)
  • arbennett (6)
  • kulkarni1 (5)
  • grapp1 (5)
  • lecondon (5)
Top Labels
Issue Labels
enhancement (12) bug (10) question (2)
Pull Request Labels
dependencies (4) enhancement (2) bug (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 633 last-month
  • Total docker downloads: 64
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 8
    (may contain duplicates)
  • Total versions: 39
  • Total maintainers: 7
proxy.golang.org: github.com/parflow/parflow
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago
pypi.org: pftools

A Python package creating an interface with the ParFlow hydrologic model.

  • Versions: 22
  • Dependent Packages: 2
  • Dependent Repositories: 8
  • Downloads: 633 Last month
  • Docker Downloads: 64
Rankings
Docker downloads count: 3.8%
Forks count: 4.8%
Dependent repos count: 5.3%
Stargazers count: 5.9%
Average: 6.5%
Dependent packages count: 7.3%
Downloads: 11.7%
Last synced: 10 months ago

Dependencies

docs/user_manual/requirements.txt pypi
  • PyYAML ==5.4
  • Sphinx >=4.0.0
  • sphinx-rtd-theme *
  • sphinxcontrib-bibtex *
.github/workflows/linux.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
Dockerfile docker
  • ubuntu 22.04 build
docker/dev/Dockerfile docker
  • ${BASE_IMAGE} latest build
docker/runtime/Dockerfile docker
  • ${BASE_IMAGE} latest build
  • ${DEV_IMAGE} latest build
pf-keys/generators/simput/requirements.txt pypi
  • PyYAML ==5.4.1
  • click ==8.0.1
  • importlib-metadata ==4.4.0
  • typing-extensions ==3.10.0.0
  • zipp ==3.4.1
pftools/python/requirements.txt pypi
  • PyYAML ==5.4
  • dask *
  • numba *
  • numpy *
  • xarray *
pftools/python/requirements_dev.txt pypi
  • twine * development
pftools/python/requirements_pfsol.txt pypi
  • imageio >=2.9.0
pftools/python/setup.py pypi
  • pyyaml >=5.4
pftools/python/requirements_all.txt pypi