-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add utility for single-node parallel installations #891
Add utility for single-node parallel installations #891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the return code from this script? Is it /= 0 if one or more of the parallel install commands fail?
Based on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this utility. It looks quite useful!
util/parallel_install.sh
Outdated
if [[ ! " $(seq -s ' ' 10) " =~ " $n_instances " ]]; then echo "Invalid number of instances" ; exit 1; fi | ||
if [[ ! " $(seq -s ' ' 64) " =~ " $n_threads " ]]; then echo "Invalid number of threads" ; exit 1; fi | ||
|
||
echo "Installing with $n_instances instances and ${n_threads} threads in environment '${SPACK_ENV?"SPACK_ENV not set!"}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to abort if SPACK_ENV is not set, i.e. make it a requirement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's what this will do? If not then I can explicitly set set -a
or whatever to fail on non-zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set -e
I think - I was confused because the notes above say "it is strongly recommended" to do this in an active env.
Also add to doc/source/? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
I resolved the conflict, once the readthedocs page is rendered I'll take a look, if it looks good I'll merge |
Summary
This PR adds a utility for doing single-node parallel installations using backgrounded instances of
spack install
. Mostly suitable for small installations or interactive batch jobs; for larger installations using a batch job along the lines of what we have for Acorn probably makes more sense.Testing
Tested on personal machine.
Applications affected
none
Systems affected
none
Dependencies
none
Issue(s) addressed
none
Checklist