Add bitwise comparison step for FLUXNET test suite#76
Conversation
c7a7876 to
7e39302
Compare
|
TODO
|
3ab85b0 to
d49c329
Compare
d49c329 to
865f41c
Compare
|
Now using Tested for cdo versions 1.7.2, 1.9.8, 1.9.10 and 2.0.5 |
7d82ad7 to
eafacd3
Compare
This change adds the ability for benchcab to run bitwise comparisons between NetCDF output files using the [`nccmp`] command. Comparisons are made between outputs that differ in their realisation and are matching in all other configurations (science configurations and meteorological forcing). Write standard output from comparison tasks on failure to the `runs/site/analysis/bitwise-comparisons` directory. Since multiple realisations can be specified, comparisons are made between all pair wise combinations of realisations. This change removes the `--no-submit` optional argument from `benchcab fluxnet-run-tasks` and instead submit a PBS job only when running `benchcab run` or `benchcab fluxnet`. We do this so that we can run the bitwise comparison step in the same job script used to run CABLE. The comparison step can be run in isolation by executing `benchcab fluxnet-bitwise-cmp`. However, this should ideally be executed on a compute node (inside a PBS job for example). This change also refactors the parallelisation scheme used for running CABLE tasks and comparison tasks so that workers fetch tasks from a `multiprocessing.Queue` object. Previously, if a process had completed the CABLE tasks it was allocated, it will remain idle until all other processes had completed their allocated tasks. This change prevents processes from idling if tasks are still yet to be completed. Fixes #32 [`nccmp`]: https://gitlab.com/remikz/nccmp
eafacd3 to
ed2cad2
Compare
e806471 to
7dc2dca
Compare
ccarouge
left a comment
There was a problem hiding this comment.
It looks great. Just one comment to check for patch to run the comparison.
| run_comparisons(comparisons, verbose=self.args.verbose) | ||
| print("Successfully ran comparison tasks") | ||
|
|
||
| def fluxnet(self): |
There was a problem hiding this comment.
Good idea to move the no-submit option to the fluxnet command.
| for task_b in tasks | ||
| if task_a.met_forcing_file == task_b.met_forcing_file | ||
| and task_a.sci_conf_id == task_b.sci_conf_id | ||
| and task_a.branch_id < task_b.branch_id |
There was a problem hiding this comment.
Should we add a test on branch_patch so we don't run the test if only one of the tasks has a patch applied? Since in this case, we are fairly certain the science configurations are different.
If both branches have a patch, we should keep the comparison as the patches could be identical.
There was a problem hiding this comment.
Yep I agree with those cases where a user does not need to run a regression test. However, I think the best approach would be for the user manually switch off the regression test (we have an issue for this: #77).
It might be counter productive trying to guess when the user wants to switch on/off the regression test. For example, we might want to do a regression test as a sanity check.
This change allows optional steps in the workflow to be skipped by specifying `--skip <cmd>` to composite commands such as `benchcab run` and `benchcab fluxnet`. Fixes #77
045325a to
bfda7c6
Compare
This change adds the ability for benchcab to run bitwise comparisons between NetCDF output files using the
nccmpcommand. Comparisons are made between outputs that differ in their realisation and are matching in all other configurations (science configurations and meteorological forcing). Write standard output from comparison tasks on failure to theruns/site/analysis/bitwise-comparisonsdirectory.Since multiple realisations can be specified, comparisons are made between all pair wise combinations of realisations.
This change removes the
--no-submitoptional argument frombenchcab fluxnet-run-tasksand instead submit a PBS job only when runningbenchcab runorbenchcab fluxnet. We do this so that we can run the bitwise comparison step in the same job script used to run CABLE.The comparison step can be run in isolation by executing
benchcab fluxnet-bitwise-cmp. However, this should ideally be executed on a compute node (inside a PBS job for example).This change also refactors the parallelisation scheme used for running CABLE tasks and comparison tasks so that workers fetch tasks from a
multiprocessing.Queueobject. Previously, if a process had completed the CABLE tasks it was allocated, it will remain idle until all other processes had completed their allocated tasks. This change prevents processes from idling if tasks are still yet to be completed.The comparison step can be skipped by specifying
--skip fluxnet-bitwise-cmpto composite commands such asbenchcab runandbenchcab fluxnet.Fixes #32
Fixes #77