- changed status to open
- removed comment
parameters to reverse un-enforced Cactus schedule ordering
the attached patch adds two new parameters to the flesh:
- schedule_sort_mode - which affects the order of schedule items before enforcing BEFORE/AFTER
- schedule_sort_warnings - which outputs warnings if a schedule item refers to a non-existing item in its BEFORE/AFTER modifiers
Neither one is intended to be used in production runs but they are useful for debugging a schedule. schedule_sort_warnings is intended to catch typos in dependency names and when one tries to order with respect to items hidden within a group. It will find a number of false positives for items that are only scheduled based on parameter settings. Eg. MoL's RHS NaN checker. schedule_sort_mode can be used to ensure that the schedule order does not depend on the (semi-random) order that Cactus generates for non-enforced ordering.
Keyword:
Comments (4)
-
reporter -
- removed comment
SchedulePreSort does not explain how it sorts. Is this some kind of shell sort? Why not use qsort instead?
param.ccl: alphabetically order -> alphabetical order
Why is there a FIXME in ScheduleTranslateSortOrder? It doesn't say what should be fixed.
Instead of strcmp(order, please use CCTK_EQUALS which is case-independent.
Please apply.
-
reporter - removed comment
It's a Shell sort, or so I understand. qsort (plus the comparison function it requires) would also work (I had forgotten that the std C library qsort only requires a compare function and not also a swap function). There is no good reason not to use it. I expect the Shell sort to be slightly faster since the number of items is usually very small and almost sorted (which is the bad case for qsort I believe). But speed really does not matter here and I much prefer using library functions than writing my own. The strcmp is likely there because I copied ScheduleTranslateModifierType, same for the FIXME I assume. I'll take care of all of these. Thanks for the detailed review.
-
reporter - changed status to resolved
- removed comment
Applied as rev 4845 of the flesh.
- Log in to comment