From 5713e28d6ff2fcd0e35a73291e1999654dabe27f Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Mon, 7 Aug 2023 12:03:32 -0500 Subject: [PATCH 1/2] add --py-ver option to install.sh --- README.md | 1 + install.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index ac64fc0..07c68bb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ In most cases, running `./install.sh` should be sufficient to install all packag - `--git-ssh`: Use SSH-based URL to clone mirgecom. - `--debug`: Show debugging output of this script (set -x). - `--skip-clone`: Skip cloning mirgecom, assume it will be manually copied to the selected installation prefix. +- `--py-ver=VERSION`: Replace the Python version specified in the conda environment file with `VERSION` (e.g., `--py-ver=3.10`). - `--help`: Print this help text. ## Testing the installation diff --git a/install.sh b/install.sh index 767873e..80fd96b 100755 --- a/install.sh +++ b/install.sh @@ -59,6 +59,8 @@ opt_git_ssh=0 # Skip cloning mirgecom opt_skip_clone=0 +opt_py_ver= + while [[ $# -gt 0 ]]; do arg=$1 shift @@ -110,6 +112,10 @@ while [[ $# -gt 0 ]]; do --skip-clone) opt_skip_clone=1 ;; + --py-ver=*) + # Install this python version instead of the version specified in the conda env file. + opt_py_ver=${arg#*=} + ;; --help) usage exit 0 @@ -159,6 +165,13 @@ echo "==== Create $env_name conda environment" [[ -z $conda_env_file ]] && conda_env_file="$mcsrc/conda-env.yml" +if [[ -n $opt_py_ver ]]; then + echo "=== Overriding Python version with $opt_py_ver" + sed -i.bak "s,- python=3[0-9\.]*,- python=$opt_py_ver," "$conda_env_file" +fi + +cat "$conda_env_file" + mamba env create --name "$env_name" --force --file="$conda_env_file" # Avoid a 'frankenconda' env that uses Python from the base env. From 8fc79c78d8e6f92fc19e46129e689fc8c8a79137 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Mon, 7 Aug 2023 12:09:48 -0500 Subject: [PATCH 2/2] Readme: remove outdated manual installation instructions --- README.md | 73 +------------------------------------------------------ 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/README.md b/README.md index 07c68bb..92dac16 100644 --- a/README.md +++ b/README.md @@ -29,81 +29,10 @@ In most cases, running `./install.sh` should be sufficient to install all packag - `--py-ver=VERSION`: Replace the Python version specified in the conda environment file with `VERSION` (e.g., `--py-ver=3.10`). - `--help`: Print this help text. -## Testing the installation +# Testing the installation Testing can be done by: ```bash $ mirgecom/examples/run_examples.sh mirgecom/examples/ ``` - -## Running on systems with lots of nodes (>256) -On large systems, the file system can become a bottleneck for loading Python -packages. On these systems, it is recommended to create a zip file with the -modules to speed up the startup process. This can be done by specifying the -`--modules` parameter to `install.sh`, or by running `makezip.sh` after -installation. - -See https://github.com/illinois-ceesd/planning/issues/26 for more details. - - -# Manual installation - -Please use the instructions above instead. - -## Running wavelet0 - - -### Prerequesites - -#### Install POCL - -##### Installation with conda-miniforge - -```bash -$ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -# For Power8/9: -# $ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-ppc64le.sh -# For MacOS: -# $ wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh - -# Install Miniforge/conda: -$ bash ./Miniforge3-Linux-x86_64.sh - -# Optional: create conda environment -$ export MY_CONDA=/path/to/installed/conda # Default installation path: $HOME/miniforge3 -$ $MY_CONDA/bin/conda create -n ceesd -$ . $MY_CONDA/bin/activate ceesd - -# Install required conda packages: -$ conda install pip pocl numpy pyopencl islpy flake8 mypy pudb - -# Install optional conda packages: -$ conda install clinfo - -# In a new session, you may reactivate this environment using: -. $MY_CONDA/bin/activate ceesd -``` - -##### Installation with Spack - -```bash -$ git clone git@github.com:spack/spack -$ source spack/share/spack/setup-env.sh -# Maybe edit your Spack config -# $ spack config edit packages -$ spack install pocl -``` - -#### Install Python packages - -```bash -$ pip install pyvisfile -$ for m in pytools pymbolic dagrt leap loopy meshmode grudge mirgecom; do cd $m && pip install -e . && cd ..; done -``` - -### Run wavelet0 - -```bash -$ cd mirgecom/examples; python wave-eager.py -```