From 469817b6dfbc963e4f44ed5726aec28697d59ae9 Mon Sep 17 00:00:00 2001 From: Kayla Clements Date: Tue, 27 Feb 2024 13:09:32 -0800 Subject: [PATCH 1/3] Added conda install mpi4py back to install script. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 90ab5a4f..e0bbf938 100755 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ bash patch_numba.sh # Install or build mpi4py if [ $# -eq 0 ]; then - conda mpi4py <<< "y" + conda install mpi4py <<< "y" fi while [ $# -gt 0 ]; do case $1 in From 3381e6c3c5b73bfb21e0efb9a4c342c302ac6b09 Mon Sep 17 00:00:00 2001 From: Kayla Clements Date: Tue, 27 Feb 2024 13:41:55 -0800 Subject: [PATCH 2/3] Added python version check to install script --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index e0bbf938..66963ced 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Check python version +if ! { python3 -c 'import sys; assert sys.version_info < (3,12)' > /dev/null 2>&1 && python3 -c 'import sys; assert sys.version_info >= (3,9)' > /dev/null 2>&1; }; then + v=$(python3 --version) + p=$(which python) + echo "ERROR: Python version must be < 3.12 and >= 3.9." + echo " Found $v at $p." + echo "ERROR: Installation failed." + exit 1 +fi # Install MC/DC module pip install -e . From c46c8e256ba833e07060cb7074ea4e079294be3a Mon Sep 17 00:00:00 2001 From: Kayla Clements Date: Tue, 27 Feb 2024 14:23:25 -0800 Subject: [PATCH 3/3] Re-arranged installation script. When using the script, Caleb was having the issue that pip was trying to install mpi4py and was unable to do so, therefore being unable to finish the mcdc installation. Installing pip with conda first made it so pip no longer tried to install mpi4py. Possibly an issue exclusive to osx-arm64 machines. --- install.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 66963ced..6abce072 100755 --- a/install.sh +++ b/install.sh @@ -10,18 +10,6 @@ if ! { python3 -c 'import sys; assert sys.version_info < (3,12)' > /dev/null 2>& exit 1 fi -# Install MC/DC module -pip install -e . - - -# Install MC/DC dependencies, reply "y" to conda prompt -conda install numpy numba matplotlib scipy h5py pytest colorama <<< "y" - -# Installing visualization dependencies (required via pip for osx-arm64) -pip install ngsolve distinctipy - -bash patch_numba.sh - # Install or build mpi4py if [ $# -eq 0 ]; then conda install mpi4py <<< "y" @@ -53,3 +41,15 @@ while [ $# -gt 0 ]; do shift done +# Install MC/DC module +pip install -e . + + +# Install MC/DC dependencies, reply "y" to conda prompt +conda install numpy numba matplotlib scipy h5py pytest colorama <<< "y" + +# Installing visualization dependencies (required via pip for osx-arm64) +pip install ngsolve distinctipy + +bash patch_numba.sh +