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

Error with spack-enable.bash on gadi #848

Open
manodeep opened this issue Dec 5, 2024 · 1 comment
Open

Error with spack-enable.bash on gadi #848

manodeep opened this issue Dec 5, 2024 · 1 comment

Comments

@manodeep
Copy link

manodeep commented Dec 5, 2024

Description

When following the docs for setting up spack here, I ran into an error with the spack-enable.bash step

[/g/data/tm70/ms2335/spack/0.22 @gadi09] . spack-config/spack-enable.bash
Usage: .  [<spack-version>/{ci,gadi}]

Why

To debug why I was hitting the error, I added an echo statement to the script:

echo "\$# = '${#}'"

if [ "$#" -eq 0 ]
then
...

With this echo statement, the output becomes

[/g/data/tm70/ms2335/spack/0.22 @gadi09] . spack-config/spack-enable.bash
$# = '2'
Usage: .  [<spack-version>/{ci,gadi}]

My bash version is (presumably the same for everyone):

[/g/data/tm70/ms2335/spack/0.22 @gadi09] bash --version
GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I have changed my version such that the if conditions to 2 (for gadi, i.e., no extra arguments) and elif to 3 for ci (presumably one extra command-line argument). Not sure why I am hitting this error - presumably others haven't.

Close Criteria

A new user can follow the steps for setting up spack in the docs without hitting an error.

@manodeep
Copy link
Author

manodeep commented Dec 5, 2024

And if I keep following the steps (with my fix), then I get the following error

[test] [/g/data/tm70/ms2335/spack/0.22 @gadi09] spack concretize -f --fresh
==> Error: 2024.11.15 is not a valid git ref for access-test

@atteggiani atteggiani assigned atteggiani and unassigned atteggiani Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants