Skip to content

Commit

Permalink
fixing some cite issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmorgan98 committed Jan 19, 2024
1 parent 8ccd41f commit ec1b5c6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 24 deletions.
4 changes: 3 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ A full exhaustive list of publications can be found on the `CEMeNT site <https:/

.. sidebar-links::
:caption: Links
:github:
:pypi: mcdc
:github:

CEMeNT <https://cement-psaap.github.io>
license <https://github.com/CEMeNT-PSAAP/MCDC/blob/main/LICENSE>


Indices and tables
==================

Expand Down
16 changes: 14 additions & 2 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@
Installation Guide
===================

This outlines the basic steps to install MC/DC on a local
machine or on HPC machine.
Most users should be able to install MC/DC using,
.. code-block:: sh
pip install mcdc
provided they have,

#. a working version of openMPI (from sources like conda, brew, or apt)
#. have administrator privileges or are using environment managers like conda
#. are using a `unix` based (`macOS`, `linux`, etc.)
#. are not trying to develope

The rest of this guide outlines the basic steps to install MC/DC for development, on a local
machine, or on HPC machine. The is the most resilient way to get the dependencies configured properly.

-----------------------------------
Creating an MC/DC Conda environment
Expand Down
21 changes: 1 addition & 20 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,7 @@ conda install numpy numba matplotlib scipy h5py pytest colorama <<< "y"
# Installing visualization dependencies (required via pip for osx-arm64)
pip install ngsolve distinctipy

# Patch numba
s=$(python -c 'import numba; print(numba.__path__[0])')
s+='/core/types/scalars.py'

line=$(grep -n 'class Boolean(Hashable):' $s | cut -f1 -d:)

head -n $line $s > tmp-scalars.py
cat >> tmp-scalars.py << EOF
def __init__(self, name):
super(Boolean, self).__init__(name)
self.bitwidth = 8
EOF

length=$(wc -l < $s)
let "length -= line"
tail -n $length $s >> tmp-scalars.py

mv tmp-scalars.py $s


bash patch_numba.sh

# Install or build mpi4py
if [ $# -eq 0 ]; then
Expand Down
21 changes: 21 additions & 0 deletions patch_numba.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Patch numba
s=$(python -c 'import numba; print(numba.__path__[0])')
s+='/core/types/scalars.py'

line=$(grep -n 'class Boolean(Hashable):' $s | cut -f1 -d:)

head -n $line $s > tmp-scalars.py
cat >> tmp-scalars.py << EOF
def __init__(self, name):
super(Boolean, self).__init__(name)
self.bitwidth = 8
EOF

length=$(wc -l < $s)
let "length -= line"
tail -n $length $s >> tmp-scalars.py

mv tmp-scalars.py $s

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description = "Monte Carlo / Dynamic Code, a pure python high preofmrance Monte
readme = "README.md"
requires-python = ">=3.9, <=3.11.7"
license = {file = "LICENSE"}
keywords = ["egg", "bacon", "sausage", "tomatoes", "Lobster Thermidor"]
keywords = ["Monte Carlo", "Nuclear", "GPU", "numba", "mpi4py", "neutron transport", "neutronics", "HPC"]
classifiers = [
"Programming Language :: Python :: 3",
'License :: OSI Approved :: BSD License',
Expand Down

0 comments on commit ec1b5c6

Please sign in to comment.