Monte Carlo / Dynamic Code (MC/DC)
Monte Carlo / Dynamic Code (MC/DC): An accelerated Python package for fully transient neutron transport and rapid methods development - Published in JOSS (2024)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
17 of 28 committers (60.7%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
MC/DC: Monte Carlo Dynamic Code
Basic Info
- Host: GitHub
- Owner: CEMeNT-PSAAP
- License: bsd-3-clause
- Language: Python
- Default Branch: dev
- Homepage: https://mcdc.readthedocs.io/en/latest/
- Size: 28.2 MB
Statistics
- Stars: 43
- Watchers: 5
- Forks: 26
- Open Issues: 56
- Releases: 7
Topics
Metadata Files
README.md
MC/DC: Monte Carlo Dynamic Code
MC/DC is a performant, scalable, and machine-portable Python-based Monte Carlo neutron transport software currently developed in the Center for Exascale Monte Carlo Neutron Transport (CEMeNT).
Our documentation on installation, contribution, and a brief user guide is on Read the Docs.
Installation
We recommend using Python virtual environments (venv) or some other environment manager (e.g. conda) to manage the MC/DC installation.
This avoids the need for admin access when installing MC/DC's dependencies and allows greater configurability for developers.
For most users working in a venv, MC/DC can be installed via pip:
bash
pip install mcdc
For developers or users on HPC machines, mpi4py is often distributed as part of an HPC machines given venv.
Common issues with mpi4py
The pip mpi4py distribution commonly has errors when building due to incompatible local MPI dependencies it builds off of. While pip does have some remedy for this, we recommend the following:
* Mac users: we recommend openmpi is installed via homebrew (note that more reliable mpi4py distribution can also be found on homebrew), alternatively you can use conda if you don't have admin privileges;
* Linux users: we recommend openmpi is installed via a root package manager if possible (e.g. sudo apt install openmpi) or a conda distribution (e.g. conda install openmpi)
* HPC users and developers on any system: On HPC systems that do not supply a suitable venv, mpi4py may need to be built using the system's existing mpi installation. Installing MC/DC using the install script we've included will handle that for you by installing dependencies using conda rather than pip. It also takes care of the Numba patch and can configure the continuous energy data library, if you have access.
Numba Config
Running MC/DC performantly in Numba mode requires a patch to a single Numba file. If you installed MC/DC with the install script, this patch has already been taken care of. If you installed via pip, we have a patch script will make the necessary changes for you:
1. Download the patch.sh file here (If you've cloned MC/DC's GitHub repository, you already have this file in your MCDC/ directory).
2. In your active conda environment, run bash patch_numba.sh.
If you manage your environment with conda, you will not need admin privileges.
Running
MC/DC can be executed in different modes: via pure python or via a jit compiled version (Numba mode).
Both modes have their use cases; in general, running in Numba mode is faster but more restrictive than via pure python.
Pure Python
To run a hypothetical input deck (for example this slab wall problem) in pure python mode run:
bash
python input.py
Simulation output files are saved to the directory that contains input.py.
Numba mode
MC/DC supports transport kernel acceleration via Numba's Just-in-Time compilation (currently only the CPU implementation). The overhead time for compilation when running in Numba mode is about 15 to 80 seconds, depending on the physics and features simulated. Once compiled, the simulation runs MUCH faster than in Python mode.
To run in Numba mode:
bash
python input.py --mode=numba
Running in parallel
MC/DC supports parallel simulation via MPI4Py. As an example, to run on 36 processes in Numba mode with SLURM:
bash
srun -n 36 python input.py --mode=numba
For systems that do not use SLURM (i.e., a local system) try mpiexec or mpirun in its stead.
Contributions
We welcome any contributions to this code base. Please keep in mind that we do take our code of conduct seriously. Our development structure is fork-based: a developer makes a personal fork of this repo, commits contributions to their personal fork, then opens a pull request when they're ready to merge their changes into the main code base. Their contributions will then be reviewed by the primary developers. For more information on how to do this, see our contribution guide.
Bugs and Issues
Our documentation is in the early stages of development, so thank you for bearing with us while we bring it up to snuff. If you find a novel bug or anything else you feel we should be aware of, feel free to open an issue.
Testing
MC/DC uses continuous integration (CI) to run its unit and regression test suite. MC/DC also includes verification and performance tests, which are built and run nightly on internal systems. You can find specifics on how to run these tests locally here.
Cite
To provide proper attribution to MC/DC, please cite
@article{morgan2024mcdc,
title = {Monte {Carlo} / {Dynamic} {Code} ({MC}/{DC}): {An} accelerated {Python} package for fully transient neutron transport and rapid methods development},
author = {Morgan, Joanna Piper and Variansyah, Ilham and Pasmann, Samuel L. and Clements, Kayla B. and Cuneo, Braxton and Mote, Alexander and Goodman, Charles and Shaw, Caleb and Northrop, Jordan and Pankaj, Rohan and Lame, Ethan and Whewell, Benjamin and McClarren, Ryan G. and Palmer, Todd S. and Chen, Lizhong and Anistratov, Dmitriy Y. and Kelley, C. T. and Palmer, Camille J. and Niemeyer, Kyle E.},
journal = {Journal of Open Source Software},
volume = {9},
number = {96},
year = {2024},
pages = {6415},
url = {https://joss.theoj.org/papers/10.21105/joss.06415},
doi = {10.21105/joss.06415},
}
which should render something like this
Morgan et al. (2024). Monte Carlo / Dynamic Code (MC/DC): An accelerated Python package for fully transient neutron transport and rapid methods development. Journal of Open Source Software, 9(96), 6415. https://doi.org/10.21105/joss.06415.
License
MC/DC is licensed under a BSD-3 clause license. We believe in open source software.
Owner
- Name: CEMeNT
- Login: CEMeNT-PSAAP
- Kind: organization
- Location: Corvallis, Oregon, USA
- Website: https://cement-psaap.github.io
- Repositories: 5
- Profile: https://github.com/CEMeNT-PSAAP
Center for Exascale Monte Carlo Neutron Transport
JOSS Publication
Monte Carlo / Dynamic Code (MC/DC): An accelerated Python package for fully transient neutron transport and rapid methods development
Authors
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, University of Notre Dame, South Bend, IN, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, Seattle University, Seattle, WA, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, North Carolina State University, Raleigh, NC, USA
Center for Exascale Monte Carlo Neutron Transport, North Carolina State University, Raleigh, NC, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, Brown University, Providence, RI, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, University of Notre Dame, South Bend, IN, USA
Center for Exascale Monte Carlo Neutron Transport, University of Notre Dame, South Bend, IN, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, Oregon State University, Corvallis, OR, USA
Center for Exascale Monte Carlo Neutron Transport, North Carolina State University, Raleigh, NC, USA
Center for Exascale Monte Carlo Neutron Transport, North Carolina State University, Raleigh, NC, USA
Tags
Monte Carlo nuclear engineering neutron transport reactor analysis numba HPC mpi4py GPUCitation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: 'MC/DC: Monte Carlo Dynamic Code'
message: >-
a pure python high performance Monte Carlo neutronics
package
type: software
authors:
- name: >-
Center for Exascale Monte Carlo Neutron Transport
(CEMeNT)
website: 'https://cement-psaap.github.io/'
- given-names: Ilham
family-names: 'Variansyah '
email: variansi@oregonstate.edu
affiliation: Oregon State University
orcid: 'https://orcid.org/0000-0003-3426-7160'
- given-names: Joanna Piper
family-names: Morgan
email: morgajoa@oregonstate.edu
affiliation: Oregon State University
orcid: 'https://orcid.org/0000-0003-1379-5431'
- given-names: Samuel
family-names: Pasmann
orcid: 'https://orcid.org/0000-0003-1391-1471'
- given-names: Kayla
family-names: Clements
email: clemekay@oregonstate.edu
affiliation: Oregon State University
orcid: 'https://orcid.org/0000-0003-3358-5618'
- given-names: Braxton
family-names: Cuneo
email: bcuneo@seattleu.edu
affiliation: Seattle University
orcid: 'https://orcid.org/0000-0002-6493-0990'
- given-names: Alexander
family-names: Mote
email: motea@oregonstate.edu
orcid: 'https://orcid.org/0000-0001-5099-0223'
affiliation: Oregon State University
- given-names: Caleb
family-names: Shaw
email: cashaw4@ncsu.edu
affiliation: North Carolina State University
- given-names: Jordan
family-names: Northrop
email: northj@oregonstate.edu
affiliation: Oregon State Universtiy
orcid: 'https://orcid.org/0000-0003-0420-9699'
- given-names: Rohan
family-names: Pankaj
orcid: 'https://orcid.org/0009-0005-0445-9323'
- given-names: 'Ryan G. '
family-names: McClarren
email: rmcclarr@nd.edu
affiliation: University of Notre Dame
orcid: 'https://orcid.org/0000-0002-8342-6132'
- given-names: Todd S.
family-names: Palmer
email: palmerts@oregonstate.edu
affiliation: Oregon State Univeristy
orcid: 'https://orcid.org/0000-0003-3310-5258'
- given-names: Lizhong
family-names: Chen
email: chenliz@oregonstate.edu
affiliation: Oregon State University
orcid: 'https://orcid.org/0000-0001-5890-7121'
- given-names: Dmitriy Y.
family-names: Anistratov
email: anistratov@ncsu.edu
affiliation: North Carolina State University
- given-names: C. T.
family-names: Kelley
email: ctk@ncsu.edu
affiliation: North Carolina State University
- given-names: 'Camille '
family-names: Palmer
email: palmecam@oregonstate.edu
orcid: 'https://orcid.org/0000-0002-7573-4215'
affiliation: Oregon State University
- given-names: Kyle E.
family-names: Niemeyer
email: niemeyek@oregonstate.edu
orcid: 'https://orcid.org/0000-0003-4425-7097'
affiliation: Oregon State University
identifiers:
- type: doi
value: 10.5281/zenodo.10576604
description: Zenodo Archive
- type: doi
value: 10.21105/joss.06415
description: Paper description of MC/DC
repository-code: 'https://github.com/CEMeNT-PSAAP/MCDC'
url: 'https://mcdc.readthedocs.io/en/latest/'
abstract: >-
MC/DC is a performant, scalable, and machine-portable
Python-based Monte Carlo neutron transport software
currently developed in the Center for Exascale Monte Carlo
Neutron Transport (CEMeNT).
keywords:
- monte carlo
- numba
- gpu
- neutron transport
- radiation transport
license: BSD-3-Clause
version: 0.9.1
date-released: '2024-04-08'
GitHub Events
Total
- Create event: 3
- Release event: 3
- Issues event: 66
- Watch event: 21
- Delete event: 1
- Issue comment event: 131
- Push event: 67
- Gollum event: 2
- Pull request review event: 14
- Pull request event: 100
- Fork event: 6
Last Year
- Create event: 3
- Release event: 3
- Issues event: 66
- Watch event: 21
- Delete event: 1
- Issue comment event: 131
- Push event: 67
- Gollum event: 2
- Pull request review event: 14
- Pull request event: 100
- Fork event: 6
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ilham Variansyah | v****i@o****u | 283 |
| ilhamv | v****m@g****m | 188 |
| Joanna Piper Morgan (jonsey) | j****8@g****m | 126 |
| Braxton Cuneo | b****o@g****m | 115 |
| Sam Pasmann | s****n@n****u | 103 |
| shac170 | c****4@n****u | 60 |
| Kayla Clements | c****y@o****u | 30 |
| alexandermote | m****a@o****u | 29 |
| Jordan Northrop | 6****j | 24 |
| Ethan Lame | e****4@g****m | 15 |
| Charles Goodman | c****a@n****u | 13 |
| Jackson P. Morgan (XPS) | m****k@o****u | 6 |
| Braxton Cuneo | b****x@p****n | 5 |
| Jackson Morgan | j****n@p****n | 5 |
| Caleb Shaw | c****w@C****l | 4 |
| jpm | j****s@j****n | 4 |
| RohanPankaj | r****1@g****m | 3 |
| Charles Edward Goodman | c****a@q****v | 3 |
| Lham Variansyah Juanda | j****1@q****v | 2 |
| Aaron James Reynolds | r****a@l****v | 1 |
| Aaron James Reynolds | r****a@q****v | 1 |
| Caleb A Shaw | s****0@q****v | 1 |
| Caleb A. Shaw | s****0@q****v | 1 |
| Charles Edward Goodman | c****a@q****v | 1 |
| Charles Edward Goodman | c****a@q****v | 1 |
| Charles Edward Goodman | c****a@q****v | 1 |
| Lham Variansyah Juanda | j****1@q****v | 1 |
| Kyle Niemeyer | k****r@f****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 92
- Total pull requests: 190
- Average time to close issues: 2 months
- Average time to close pull requests: 8 days
- Total issue authors: 14
- Total pull request authors: 13
- Average comments per issue: 0.74
- Average comments per pull request: 1.12
- Merged pull requests: 140
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 50
- Pull requests: 114
- Average time to close issues: 18 days
- Average time to close pull requests: 9 days
- Issue authors: 8
- Pull request authors: 9
- Average comments per issue: 0.38
- Average comments per pull request: 1.15
- Merged pull requests: 83
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jpmorgan98 (25)
- ilhamv (24)
- clemekay (21)
- northroj (4)
- MicahGale (3)
- lewisfish (3)
- melekderman (3)
- spasmann (3)
- alexandermote (1)
- jburz2001 (1)
- yardasol (1)
- shac170 (1)
- goodman17c (1)
- braxtoncuneo (1)
Pull Request Authors
- ilhamv (76)
- jpmorgan98 (40)
- clemekay (21)
- shac170 (10)
- braxtoncuneo (10)
- alexandermote (9)
- ethan-lame (8)
- spasmann (8)
- northroj (4)
- melekderman (1)
- kyleniemeyer (1)
- murrayaidanj (1)
- RohanPankaj (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 64 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
- Total maintainers: 3
pypi.org: mcdc
MC/DC (Monte Carlo Dynamic Code): a performant, scalable, and machine-portable Python-based Monte Carlo neutron transport package
- Homepage: https://cement-psaap.github.io/
- Documentation: https://mcdc.readthedocs.io/en/latest/
- License: BSD 3-Clause License Copyright (c) 2021, CEMeNT All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
Latest release: 0.12.0
published 8 months ago
Rankings
Maintainers (3)
Dependencies
- actions/checkout v2 composite
- psf/black stable composite
- actions/checkout v3 composite
- actions/setup-python v3 composite