Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/upc-ghs/modpath-omp
MODPATH-v7 plus parallel particles processing with OpenMP
https://github.com/upc-ghs/modpath-omp
fortran hydrogeology modflow modpath particle-tracking
Last synced: 2 days ago
JSON representation
MODPATH-v7 plus parallel particles processing with OpenMP
- Host: GitHub
- URL: https://github.com/upc-ghs/modpath-omp
- Owner: upc-ghs
- License: mit
- Created: 2022-12-19T08:53:44.000Z (about 2 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-19T08:55:42.000Z (about 2 years ago)
- Last Synced: 2024-12-04T20:45:21.801Z (about 2 months ago)
- Topics: fortran, hydrogeology, modflow, modpath, particle-tracking
- Language: Fortran
- Homepage:
- Size: 13.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# modpath-omp
MODPATH version 7 with parallel processing of particles implemented with the OpenMP library.Configuration input files are the same that for a normal ``modpath-v7`` simulation, so integration of the parallel version is straightforward.
## Compilation
Download source code and access the `make` folder. Here execute one of the makefiles with```
make -f makefile-gfortran-pc
```This will compile source files and will output a binary, by default with name `mpath7omp.exe`.
Compilation has been verified with ``[email protected]`` and with ``ifort`` from Intel ``[email protected]``.### Note
Compiled binaries in the folder `msvs/bin_PROVISIONAL` are the ones provided by the upstream `modpath-v7` repository, not the parallel version from this repository.## Running parallel simulations
``modpath`` interface has been extended to simplify execution of parallel runs via the command line.
Some alternatives are:- Use the ``-np`` argument to specify the number of processes:
```
mpath7omp example.mpsim -np 4
```- Use the ``-parallel`` argument to run in parallel employing the maximum number of available processors:
```
mpath7omp example.mpsim -parallel
```- Specify the ``OMP_NUM_THREADS`` environment variable:
```
OMP_NUM_THREADS=4 mpath7omp example.mpsim
```
In this last case, if the variable is defined at a system level, it will be employed when submitting a normal run instruction ``mpath7omp example.mpsim``## Parallel output for timeseries
Three different output protocols for timeseries running in parallel have been implemented. The protocol can be selected via the command line argument ``-tsoutput``:- ``-tsoutput 1``: is the default format, output is performed into a single output unit with OpenMP thread exclusive clause (critical). Only difference versus a serial run is that the output file contains non-sorted particle indexes.
- ``-tsoutput 2``: timeseries records are written into thread specific binary units and then consolidated into a single file after each timeseries output time. Timeseries file generated with this format does not contains a file header.
- ``-tsoutput 3``: timeseries records are written into thread specific output units. Timeseries file header is only written to output unit related to the first thread ``1_example.timeseries``. Initial particle positions are also written to the file of the first thread.## License
MIT License## Resources
* [MODPATH](https://www.usgs.gov/software/modpath-particle-tracking-model-modflow)
* [Central modpath-v7 repository](https://github.com/MODFLOW-USGS/modpath-v7)
* [gfortran](https://gcc.gnu.org/wiki/GFortran)
* [OpenMP](https://www.openmp.org/)
* [Intel oneApi HPC toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit.html)
* [MIT License](https://mit-license.org/)## References
[Pérez-Illanes R., Fernàndez-Garcia, D., 2022, Multiprocessing for the Particle Tracking Model MODPATH, Groundwater, doi:10.1111/gwat.13279](https://doi.org/10.1111/gwat.13279)