-
Notifications
You must be signed in to change notification settings - Fork 9
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
Find externals/ compilers #108
Find externals/ compilers #108
Conversation
@white238 Was wondering about the workflow of Were you thinking the user would run uberenv with |
@@ -5,6 +5,7 @@ | |||
"spack_build_mode" : "install", | |||
"spack_configs_path": "spack_configs", | |||
"spack_packages_path": "packages", | |||
"spack_not_buildable_packages": "cmake pkg-config zlib", |
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 don't like this name but can't come up with a better one right now. Let me ponder this.
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.
spack_packages_to_find ?
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.
spack_externals
?
i've noticed [exe: /usr/WS2/meemee/uberenv/repo/.ci/test-project/uberenv_libs/spack/bin/spack -D /usr/WS2/meemee/uberenv/repo/.ci/test-project/uberenv_libs/spack_env compiler find]
==> Added 61 new compilers to /usr/WS2/meemee/uberenv/repo/.ci/test-project/uberenv_libs/spack_env/spack.yaml |
LC machines are very special that they have a million compilers. I don't think this is going to be true on most peoples machines. But we might want to add how to specify a specific family, |
In the past when no config was given, uberenv would look for compilers and a user could ask for the family they wanted as part of the spec passed via command line args (--spec= It would be good to know how to do that easily with the env setup. |
also, running plain the only way i could find the gcc compilers with [meemee@ruby967:test-project]$ spack compiler find /usr/tce/packages/gcc/*
==> Added 7 new compilers to /usr/WS2/meemee/uberenv/repo/.ci/test-project/uberenv_libs/spack_env/spack.yaml
gcc@10.2.1 gcc@9.3.1 gcc@8.3.1 gcc@8.1.0 gcc@7.3.0 gcc@7.1.0 gcc@6.1.0
==> Compilers are defined in the following files:
/usr/WS2/meemee/uberenv/repo/.ci/test-project/uberenv_libs/spack_env/spack.yaml |
as far as i know |
correct, but there was still an easy path to select from what was found. Seems I restated Chris' suggestion. Just need to know how to select. |
There is a way to tell it to search a different prefix. My guess is by default it only searches in |
We can pass a path to the find command, that’s correct. So, here is the work around I can suggest: |
I guess since Spack is meant to install a full software stack on a machine from scratch, they can’t assume modules are already set. I think we can make that assumption. It is true that this may not be portable to machines where modules are not set, but that could be tested by the script. |
I've been having trouble implementing For example: I believe this could be fixed it we switched from OptParse (which has been deprecated since Python 3.2) to ArgParse. Alternatively of course, we can delimit the argument without spaces (with |
Please upgrade to argparse. |
Also, thoughts on new variable names?
|
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 @chapman39 for this nice addition!
We should probably add some new CI tests to ensure this continues to work.
if self.spack_compiler_paths is None: | ||
spack_compiler_find_cmd = "{0} compiler find".format(self.spack_exe()) | ||
else: | ||
spack_compiler_find_cmd = "{0} compiler find {1}".format(self.spack_exe(), self.spack_compiler_paths) |
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.
Meta-question (outside the scope of this PR):
Should we have a spack_command(command, additional_args)
function in uberenv?
That way, this line could be written as something like:
spack_compiler_find_cmd = spack_command("compiler find", self.spack_compiler_paths)
…s://github.com/LLNL/uberenv into feature/chapman39/find_externals_and_compilers
The documentation needs to be updated |
produces the following error:
|
…ub.com:LLNL/uberenv into feature/chapman39/find_externals_and_compilers
Thanks @chapman39 ! |
spack-compiler-paths
: Space delimited string of paths for Spack to search for compilers (if spack_setup_environment is True)spack-externals
: Space delimited string of packages for Spack to search for externals (if spack_setup_environment is True)spack.yaml
, it will automatically create one, search for compilers/ externals, and copy it over topackage_source_dir
.spack.yaml
Misc Notes:
hdf5-1.14.1-2
inconsistently works. It often gets a FetchError, which is why I try to build@1.14.0
in CI.Fixes #105
Fixes #104