Skip to content

Commit

Permalink
Addressed some of Harshula's comments to the PR + further corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
atteggiani committed Sep 17, 2024
1 parent 8192ad3 commit dc8fb89
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<img class="img-contain white-background with-padding" src="https://cdn.jsdelivr.net/gh/spack/spack@develop/share/spack/logo/spack-logo-text.svg" alt="spack">
</div>
<div class="card-text-container">
<span class="bold">Set up Spack for model builds</span>
<span class="bold">Set up Spack for building ACCESS models</span>
<span>
Spack is a flexible package manager used to build ACCESS models.
Spack is a build-from-source package manager that is used to build ACCESS models.
</span>
</div>
</a>
Expand Down
27 changes: 14 additions & 13 deletions docs/getting_started/spack.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Set up Spack for model builds
[spack_environments]: https://spack.readthedocs.io/en/latest/environments.html

# Set up Spack for building ACCESS models

[Spack](https://spack.io/about/) is a build-from-source package manager, specifically designed to simplify the installation of scientific software on supercomputers.

To know more about _Spack_ usage, please familiarise yourself with the [Basic Usage instructions](https://spack.readthedocs.io/en/latest/basic_usage.html) and [Environments][spack_environments].<br>
We also reccommend that you refer to the [Spack 101 Tutorial](https://spack-tutorial.readthedocs.io/en/latest/).


## Prerequisites
To use _Spack_ on _Gadi_, you must have an NCI account.<br>
For instructions on how to set up an account, refer to [Set Up your NCI Account](/getting_started/set_up_nci_account).
These instructions are tailored specifically for _Gadi_. To use _Spack_ on _Gadi_, you must have an NCI account. For instructions on how to set up an account, refer to [Set Up your NCI Account](/getting_started/set_up_nci_account).

## Set up Spack on Gadi

Expand All @@ -13,7 +18,7 @@ For instructions on how to set up an account, refer to [Set Up your NCI Account]
!!! tip
This step is optional, but it is recommended you have a selected directory where to keep your _Spack_ distribution.

The complete _Spack_ distribution is approximately 120 MB in size. For this reason, we reccommend placing its directory somewhere in `/g/data`. An example can be `/g/data/$PROJECT/$USER/spack_distribution`.
The complete _Spack_ distribution is approximately 120 MB in size, with additional space needed for all the packages built. For this reason, we reccommend placing its directory somewhere in `/g/data/`. An example can be `/g/data/$PROJECT/$USER/spack_distribution`.

To create the directory mentioned above and navigate into it, run the following command:
```
Expand Down Expand Up @@ -41,25 +46,21 @@ ln -s -r -v spack-config/v0.22/gadi/* spack/etc/spack/
!!! success
Your _Spack_ setup is complete!

### Test Spack
## Test Spack (OPTIONAL)

To test _Spack_ we will create an environment (in this example it will be the on to build ACCESS-OM2 executables) and build the relevant packages. Then, we will uninstall all the packages and remove the environment.
To test _Spack_ we will create an [environment][spack_environments] (in this example it will be the one used to build [ACCESS-OM2](/models/configurations/access-om#access-om2) executables) and build the relevant packages. Then, we will uninstall all the packages and remove the environment.

All the steps listed above can be performed by running the following commands (where `<spack_distribution_directory>` is the [directory for the Spack distribution](#create-a-directory-for-the-spack-distribution)):
```
. <spack_distribution_directory>/spack-config/spack-enable.bash
curl -L https://raw.githubusercontent.com/ACCESS-NRI/ACCESS-OM2/main/spack.yaml -o access-om2-spack.yaml
spack env create access-om2 access-om2-spack.yaml
git clone https://github.com/ACCESS-NRI/ACCESS-OM2.git
spack env create access-om2 ACCESS-OM2/spack.yaml
spack env activate -p access-om2
spack find
spack install --verbose
spack find
spack uninstall --remove --all -y
spack env deactivate
spack env rm access-om2 -y
rm access-om2-spack.yaml
rm -rf ACCESS-OM2
```

### More information
To know more about _Spack_ usage, please familiarise yourself with the [Basic Usage instructions](https://spack.readthedocs.io/en/latest/basic_usage.html) and [Environments](https://spack.readthedocs.io/en/latest/environments.html).<br>
We also reccommend you check the [Spack 101 Tutorial](https://spack-tutorial.readthedocs.io/en/latest/).
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ nav:
- getting_started/index.md
- Set Up your NCI Account: getting_started/set_up_nci_account.md
- Australian Research Environment (ARE): getting_started/are.md
- Set up spack for model builds: getting_started/spack.md
- Set up Spack for building ACCESS models: getting_started/spack.md

- Models:
- Models: models/index.md
Expand Down

0 comments on commit dc8fb89

Please sign in to comment.