Skip to content

Add a script for loading the compass conda env - #482

Merged
mark-petersen merged 4 commits into
MPAS-Dev:ocean/developfrom
xylar:add_load_compass_env_script
Mar 24, 2020
Merged

mark-petersen merged 4 commits into
MPAS-Dev:ocean/developfrom
xylar:add_load_compass_env_script

Conversation

@xylar

@xylar xylar commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator

Many supported machines are included in this script, and more can be added as needed.

Many supported machines are included in this script, and more
can be added as needed.
@xylar

xylar commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator Author

We would need to update the version of the compass env that gets loaded here each time the requirements for COMPASS change. While we should keep README_ocean.md in sync, presumably this new script would serve as the "official" indication of which compass env is compatible with the current code.

@pwolfram pwolfram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by inspection.

@sbrus89 sbrus89 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xylar, this looks great and I verified it works for me on Grizzly.

One comment:
We could consider automatically linking this script to the work_dir or in the case (or test) directory so that the conda environment can be easily loaded before running a case.

@xylar

xylar commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator Author

We could consider automatically linking this script to the work_dir or in the case (or test) directory so that the conda environment can be easily loaded before running a case.

I'm trying to decide how I feel about that. COMPASS should ideally work fine on unsupported machines where load_compass_env.sh won't work. In such cases, it would be potentially distracting to have it. Also, should it be in every step of every test case?

Anyway, happy to keep discussing it but maybe premature to add that in this PR until we have a sense of how we would use it.

@xylar

xylar commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator Author

@sbrus89, let me know if you notice any other issues.

@sbrus89

sbrus89 commented Mar 23, 2020

Copy link
Copy Markdown

@xylar, I don't see any additional issues. You took care of everything with the last set of commits.

@sbrus89

sbrus89 commented Mar 23, 2020

Copy link
Copy Markdown

@xylar, I see your point about non-supported machines. I agree that something to address that point doesn't belong in this PR.

@sbrus89

sbrus89 commented Mar 23, 2020

Copy link
Copy Markdown

I just brought it up because I find myself reverse searching my history a lot to find the right source command to load the conda environment (which isn't a huge deal). Making the file available somewhere in the work_dir would make it easier to load on supported machines.

Maybe the best answer is for me to make an alias.

@sbrus89 sbrus89 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good!

@xylar

xylar commented Mar 23, 2020

Copy link
Copy Markdown
Collaborator Author

Maybe the best answer is for me to make an alias.

That wouldn't work well for me at least because the environment to load might be different for different MPAS-Model branches (therefore different directories for the script to source). So I see the value of an "idiot-proof" (no offense to anyone, I would benefit from this, too) version where your test case tells you which env to load.

I generally find myself wanting to put a job script in the case directory (one up from the individual steps) so this would be an appropriate place to put a link to the load_compass_env.sh script. I guess if someone tries to source it and it doesn't work, they will get a message telling them why... Easy enough to add in a future PR.

@mark-petersen mark-petersen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved based on test by @xylar and @sbrus89

@mark-petersen
mark-petersen merged commit 63a0afa into MPAS-Dev:ocean/develop Mar 24, 2020
@xylar
xylar deleted the add_load_compass_env_script branch March 24, 2020 14:21
caozd999 pushed a commit to caozd999/MPAS-Model that referenced this pull request Jan 14, 2021
Add a script for loading the compass conda env. Many supported machines are included in this script, and more can be added as needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants