Add flexibility to cice.setup for test suites#357
Conversation
mattdturner
left a comment
There was a problem hiding this comment.
The changes look good to me. I like the additional capability of only creating the case directories and also the option to not submit to the queue. Generally I would prefer --setup-only and --build-only, but that's just personal preference.
|
I very much like this new feature. I think I also prefer --setup-only and --build-only as the options. But I would like to propose a slightly different strategy. With the current implementation, we are generating suite.build, suite.run. and suite.submit scripts. These scripts mostly overlap. What if we created a single script that could handle the different options. What I envision is a single suite.submit script that would either have a few command line options or variables set at the top of the script that would be implemented something like as follows There are a few benefits. First, we avoid having to deal with the buildincremental issues. Rather than having each case have to turn on incremental builds for the suite to behave in a reasonable way, the suite.submit script would cleanly handle this and the incremental (or not) build would be purely up to the user whether they want to use it or not for other reasons. Second, we would merge 3 scripts to 1 without the redundancy between scripts. Third, it may provide easier future extensions to have everything in one script. The cice.setup would still take --no-build --no-submit options which would then be converted to defaults in the script and then the suite.submit script would be run with the flags set appropriately. I have suggested and prefer that we use variables in the script to set the flags rather than command line arguments to suite.submit just because the implementation is easier. I also think these features are not going to be used all that much. But I am open to further discussion. Any thoughts on this proposal? |
|
I opted for the easiest implementation. Regarding the fact that we have 3 scripts: since they are not version controlled but simply created by cice.setup, I don't think it creates much redundancy... |
|
@phil-blain, that makes some sense. But one issue I have is how the buildincremental needs to be turned on for all this to work OK. I think that's a complicating factor. Without using that flag, these new scripts don't provide much use. As an alternative, If we had a script that just built, just submitted, or did both, that would remove the buildincremental factor. But then there is also the ability to run interactively or run in batch which you also seem to want to have. Again, I think very few users are going to use any of this which is why I also think it makes sense for it to be somewhat hidden in one big script. If it's not hidden in one script, then I think we need to probably have separate .build (just build), .submit (just submit), .run (just run), .build_run (build and run), and .build_submit (build and submit). I think this is a little over the top. The point of having the build_run and build_submit is so you can build and run/submit interleaved which is how you want to do it in practice if you are doing it together. You don't want to build everything then submit everything as that slows the runs down quite a bit. If it's all in one script, we can support any kinds of modes we want easier. I can see advantages and disadvantages in both approaches. I also understand that these scripts are generated so the redundancy is less of an issue. But that redundancy has to be maintained in the generation of the scripts, so there is some cost there. I still prefer the idea that everything is in one script in large part because I think most people will just run the test suites fully automated and never use the other scripts. But again, that might argue that most folks will never see the scripts anyway. |
|
I see your point. I just don't link having to hand-edit the script to change it's behavior. If we don't want to do argument-handling in this script, would just using environment variables work for you ? for example depending on the options chosen when calling cice.setup we would have setenv SUITE_BUILD=${dobuild}
setenv SUITE_RUN=${dorun}
setenv SUITE_SUBMIT=${dosubmit}
./suite.submitand then suite.submit would just reference these variables and when we want to use the script in other ways we set these variables on the command line: Or go with arguments handling... |
|
I think env variables is a great idea. So, just to suggest a couple other changes.
|
|
See #395, closing now. |
PR checklist
Add --no-submit and --no-build options to cice.setup
Philippe Blain
No changes to code, so I did not perform the full base_suite. I tested to check that the new options work as they should
Yes
https://external-builds.readthedocs.io/html/cice-consortium-cice/357/user_guide/ug_testing.html#test-suites
No, does the documentation need to be updated at a later time?
I added two options to cice.setup (for test suites) that I considered useful for my workflow.
./cice.setupto setup, build and submit the 'baseline' base_suite and then./cice.setup --no-submitto setup and build the 'test' base_suite (I don't want to submit it immediately since the 'baseline' base_suite might not be finished running, so some tests in the 'test' base_suite might run before the corresponding ones in the 'baseline' suite, which would make them fail). The 'test' suite can then be manually submitted with the existing suite.submit script.suite.buildand then submitted withsuite.submit.Do you think that the options would be better named --build-only (instead of --no-submit) and --setup-only (instead of --no-build) ?