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

PFS tests should always save timing #4487

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

jgfouca
Copy link
Contributor

@jgfouca jgfouca commented Sep 18, 2023

Test suite: pre-commit
Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]

Fixes [CIME Github issue #]

User interface changes?:

Update gh-pages html (Y/N)?:

@jgfouca jgfouca self-assigned this Sep 18, 2023
@jgfouca
Copy link
Contributor Author

jgfouca commented Sep 18, 2023

I couldn't think of any reason why you'd ever want to run a PFS test and not save the timings.

@jedwards4b
Copy link
Contributor

I can actually - I frequently use the PFS test for load balancing and don't want to save or compare to a baseline.

@jgfouca
Copy link
Contributor Author

jgfouca commented Sep 18, 2023

@jedwards4b , ah ok. Should I abort this PR?

@jedwards4b
Copy link
Contributor

I'm not sure - if I create a PFS test and don't specify a baseline directory with --generate what happens?

@rljacob
Copy link
Member

rljacob commented Sep 18, 2023

I'm looking at pfs.py and can't tell what its doing. Are the actual test mechanics somewhere else in CIME?

@jedwards4b
Copy link
Contributor

That's the place to look - all it does is run a case for 20 days. It saves the timing files and software_environment.txt file for each run. It can save them to a baseline directory but most often I use it as a standalone tool to load balance configurations.

@jedwards4b
Copy link
Contributor

I should add that it turns off history and restart to minimize IO for the run.

@jgfouca
Copy link
Contributor Author

jgfouca commented Sep 18, 2023

I think SAVE_TIMING should work fine with or without baselines. @rljacob , the mechanics of the test are very simple, basically the same as SMS, so the only interesting stuff is in CIME/data/config/config_tests.xml

@rljacob
Copy link
Member

rljacob commented Sep 18, 2023

Yes SAVE_TIMING just saves the timing info to another directory. It doesn't reference any other runs.

@rljacob
Copy link
Member

rljacob commented Sep 18, 2023

This is off topic but it seems like turning off history and setting the run length to 20 days should be in pfs.py. Same for other tests. Why even have CIME/data/config/config_tests.xml ?

@jgfouca
Copy link
Contributor Author

jgfouca commented Sep 18, 2023

@rljacob , test parameters are kept separate from test python mechanics. I think this approach makes sense since create_test parses the test options and handles the XML creation before the test-specific python code is run.

@billsacks
Copy link
Member

Does this address #2918 or is this somewhat separate from what I was asking there?

Regarding the tangential discussion of config_tests.xml: I have to say that I agree with @rljacob here: I have always found it confusing that I need to look in two places to see the full picture of how a test is defined. Maybe there are a handful of things that truly can't be handled in the python, but it seems like most of what we do in config_tests.xml could be done with a case.set_value early in the test, and then we could have everything in one place.

@rljacob
Copy link
Member

rljacob commented Sep 18, 2023

I happened to be looking at ert.py which DOES use case.set_value and thought it was easy to follow. Then I went to pfs.py and wondered how it was set to do 20 days.

@jgfouca
Copy link
Contributor Author

jgfouca commented Sep 19, 2023

@billsacks , separate, but we (E3SM) are interesting in the topic you raised in that ticket.

@jgfouca jgfouca merged commit b10d452 into master Sep 19, 2023
@jgfouca jgfouca deleted the jgfouca/better_pfs_support branch September 19, 2023 15:15
@rljacob
Copy link
Member

rljacob commented Sep 19, 2023

How does the PFS test determine pass/fail without a baseline?

@jedwards4b
Copy link
Contributor

It does not - you need a baseline.
I use PFS mostly for loadbalancing fully coupled configurations.

@rljacob
Copy link
Member

rljacob commented Sep 19, 2023

What does your workflow look like when you're loadbalancing? I would build PFS once and then go to the test casedir and do cycles of edit pelayout-submit-look at timings.

@jedwards4b
Copy link
Contributor

Yes, that's exactly it and the env_mach_pes.xml and software_environment.txt are saved for each run.

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

Successfully merging this pull request may close these issues.

4 participants