-
Notifications
You must be signed in to change notification settings - Fork 317
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
Issue running SystemTests due to "conda activate" error #2042
Comments
I Googled "conda run" vs. "conda activate" and found this article. Which points out that you should use "conda run" for for non-interactive environments -- which is what we are doing. So it sounds like you are correct the way you suggest is a more robust way, and certainly how we should change it. https://www.scivision.dev/conda-run-non-interactive-script/ We talk about using "conda activate" in our documentation, should that also change to say use "conda run"? You could still use a different environment, so I'm not quite sure here... |
Ah okay! In that case, is it okay if I change I might actually add a new module in I'm not sure whats best to do about the documentation; I'd guess it should be a case-by-case basis based on whether we expect the user to run the script interactively or not. |
Yes, I'm good with either solution (current or separate PR). You can just change it in your current PR. Adding a new module sounds useful as well. We might need to look through the documentation to assess what might need to change and what wouldn't. You are probably right maybe the "conda run" syntax is only needed for testing scripts that run the scripts, from within other scripts. |
…vate`. This is a more robust method and is recommended when conda is being used non-interactively. RXCROPMATURITY already used this method, so I introduced a new module in cime_config/SystemTests, systemtests_utils.py, to share the code. * Resolves ESCOMP#2042
…vate`. This is a more robust method and is recommended when conda is being used non-interactively. RXCROPMATURITY already used this method, so I introduced a new module in cime_config/SystemTests, systemtests_utils.py, to share the code. * Resolves ESCOMP#2042
…vate`. This is a more robust method and is recommended when conda is being used non-interactively. RXCROPMATURITY already used this method, so I introduced a new module in cime_config/SystemTests, systemtests_utils.py, to share the code. * Resolves ESCOMP#2042
…vate`. This is a more robust method and is recommended when conda is being used non-interactively. RXCROPMATURITY already used this method, so I introduced a new module in cime_config/SystemTests, systemtests_utils.py, to share the code. * Resolves ESCOMP#2042
The
FSURDATMODIFYCTSM
test fails for me on Cheyenne, withcs.status
sayingSHAREDLIB_BUILD failed to initialize
. Looking at the log, there's a problem usingconda activate
(full error message below). This occurs on my branch for #1863, but also with tagctsm5.1.dev128
.I am able to use
conda activate
in login shells, and my.bashrc
file seems to be set up correctly, with the following at the end:I had the same issue in the custom SystemTest I wrote for #1863, but I worked around it by doing this:
instead of how it's done in FSURDATMODIFYCTSM and other SystemTests:
I'm sure there's something about my setup that's causing this to break, but I'm wondering: Might it be worth just changing all the SystemTests to use this apparently more robust method? I doubt I'll be the last person to run into this issue.
Full error message from
FSURDATMODIFYCTSM
:The text was updated successfully, but these errors were encountered: