ACCESS-NRI / spack-config

Shared spack configuration
Apache License 2.0
1 stars 0 forks source link

Improved developer experience #5

Open aidanheerdegen opened 1 year ago

aidanheerdegen commented 1 year ago

[Updated 2023/11/24 - by harshula]

We need a good standard method for using spack to build software at NCI, ideally with the following attributes

A general user (read-only):

An advanced user (in addition to a general user's requirements, also needs to be able to write/create new packages):

aidanheerdegen commented 1 year ago

Currently the steps to use spack require a number of steps, including cloning spack

https://github.com/ACCESS-NRI/ACCESS-OM/issues/6#issuecomment-1637387506

aidanheerdegen commented 11 months ago

An example, and possible starting point:

https://forum.access-hive.org.au/t/shared-access-spack-configuration/227

harshula commented 10 months ago

V2 of the Spack config has been merged and should help improve the developer experience: PR https://github.com/ACCESS-NRI/spack_config/pull/6

harshula commented 10 months ago

Improved documentation in PR https://github.com/ACCESS-NRI/spack_config/pull/10

harshula commented 10 months ago

According to the Spack documentation, chaining may not be applicable to us because we have an install_tree outside of the Spack base directory:

https://spack.readthedocs.io/en/latest/chain.html

You can point your Spack installation to another installation to use any packages that are installed there. To register the other Spack instance, you can add it as an entry to upstreams.yaml:

upstreams:
spack-instance-1:
install_tree: /path/to/other/spack/opt/spack
spack-instance-2:
install_tree: /path/to/another/spack/opt/spack

install_tree must point to the opt/spack directory inside of the Spack base directory.

harshula commented 10 months ago

[23/04/2024: Refer to instructions on the ACCESS-Hive Forum] https://forum.access-hive.org.au/t/how-to-build-access-om2-on-gadi/1545

harshula commented 9 months ago

Notes

I've noticed a subtle difference between spack dev-build and spack install. dev-build appears to obtain a stale path for the Spack instance. It's not from ~/.spack.