From ec1b5c6f9d54f6c363e91b6927441e50feb2543d Mon Sep 17 00:00:00 2001 From: "Joanna Piper Morgan (jonsey)" Date: Fri, 19 Jan 2024 14:31:00 -0800 Subject: [PATCH] fixing some cite issues --- docs/source/index.rst | 4 +++- docs/source/install.rst | 16 ++++++++++++++-- install.sh | 21 +-------------------- patch_numba.sh | 21 +++++++++++++++++++++ pyproject.toml | 2 +- 5 files changed, 40 insertions(+), 24 deletions(-) create mode 100755 patch_numba.sh diff --git a/docs/source/index.rst b/docs/source/index.rst index 213c64ab..df7587f4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -87,11 +87,13 @@ A full exhaustive list of publications can be found on the `CEMeNT site license + Indices and tables ================== diff --git a/docs/source/install.rst b/docs/source/install.rst index 4d5fc537..caf17c2d 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -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 diff --git a/install.sh b/install.sh index 993a4bf1..e0bbf938 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/patch_numba.sh b/patch_numba.sh new file mode 100755 index 00000000..6f1875f6 --- /dev/null +++ b/patch_numba.sh @@ -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 + diff --git a/pyproject.toml b/pyproject.toml index 48a073b5..5e2893d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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',