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

Closed
manodeep opened this issue Dec 5, 2024 · 5 comments
Closed

Error with spack-enable.bash on gadi #848

manodeep opened this issue Dec 5, 2024 · 5 comments

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
@atteggiani
Copy link
Contributor

atteggiani commented Mar 5, 2025

Hi @manodeep,

Would you be able to set a case to reproduce your error?

Unfortunately if I follow the steps I don't get any error and I can't seem to reproduce the error you are getting.
This makes it hard for me to try and debug it.

Thank you!

@manodeep
Copy link
Author

manodeep commented Mar 5, 2025

Thanks @atteggiani! I am pretty sure that this has something to do with my setup - but I am not really sure what it is :(

@atteggiani
Copy link
Contributor

After a debugging session with @manodeep, we figured out the error was caused by a custom setting within his ~/.bashrc. Removing the setting fixed the issue.
Closing this.

@manodeep
Copy link
Author

manodeep commented Mar 5, 2025

Thanks @atteggiani. For anyone else that stumbles on this, my setting was set horizontal-scroll-mode on in my .bashrc and the two arguments getting passed into the bash script was horizontal-scroll-mode and on.

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