Skip to content

Commit

Permalink
Merge branch 'main' into install-with-ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Aug 28, 2023
2 parents c6833a7 + 829c456 commit bbb806f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 73 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
[[ $(uname) == Linux ]] && sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev
[[ $(uname) == Linux ]] && sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev libgl1-mesa-glx libegl1
[[ $(uname) == Darwin ]] && brew install openmpi
./install.sh
- name: Version info
Expand All @@ -46,6 +46,9 @@ jobs:
./pull-packages.sh -x
- name: Reinstall emirge env with new requirements.txt
run: |
source miniforge3/bin/activate ceesd
conda clean -a
conda deactivate
./install.sh --env-name=reinstall_env --pip-pkgs=req.txt
- name: Reinstall conda env with new env file
run: |
Expand Down
74 changes: 2 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,83 +26,13 @@ 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
# 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
```
13 changes: 13 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ opt_git_ssh=1
# Skip cloning mirgecom
opt_skip_clone=0

opt_py_ver=

while [[ $# -gt 0 ]]; do
arg=$1
shift
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit bbb806f

Please sign in to comment.