Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting_started/spack.md: provide instructions on updating #817

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions docs/getting_started/spack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,25 @@ These instructions are tailored specifically for _Gadi_. To use _Spack_ on _Gadi

## Set up Spack on Gadi

!!! tip
The steps in this section only need to be done once.

### Create a directory for Spack

Create a directory on the filesystem where _Spack_ will be installed (e.g. `/g/data/$PROJECT/$USER/<myspack>`). This directory shall be referred to as `<myspack>`.
Create a directory on the filesystem where _Spack_ will be installed (e.g. `/g/data/$PROJECT/$USER/spack/0.22`).

```
mkdir <myspack>
cd <myspack>
mkdir -p spack/0.22
cd spack/0.22
```

### Clone the relevant git repositories

!!! info
ACCESS-NRI maintains a [fork of Spack](https://github.com/ACCESS-NRI/spack) to enable back-porting fixes from more recent spack versions. This fork is the one used in these instructions.

```
git clone -c feature.manyFiles=true https://github.com/ACCESS-NRI/spack.git --branch releases/v0.22 --single-branch --depth=100
git clone -c feature.manyFiles=true https://github.com/ACCESS-NRI/spack.git --branch releases/v0.22
git clone https://github.com/ACCESS-NRI/spack-packages.git --branch main
git clone https://github.com/ACCESS-NRI/spack-config.git --branch main
```
Expand All @@ -47,7 +53,7 @@ To test _Spack_ we will create an `ACCESS-TEST` environment and build the releva

```
module purge
cd <myspack>
cd spack/0.22
. spack-config/spack-enable.bash
git clone https://github.com/ACCESS-NRI/ACCESS-TEST.git
spack env create test ACCESS-TEST/spack.yaml
Expand All @@ -61,3 +67,15 @@ spack env deactivate
spack env rm test
rm -rf ACCESS-TEST
```

## Update Spack on Gadi

Keep your Spack instance up-to-date by doing the following:

```
cd spack/0.22
git -C spack fetch --all -Pp
git -C spack reset --hard origin/releases/v0.22
git -C spack-config pull
git -C spack-packages pull
```
Loading