Kranc icon indicating copy to clipboard operation
Kranc copied to clipboard

Check schedule routine names

Open eschnett opened this issue 13 years ago • 1 comments

Ensure that scheduled routine names are correct C identifiers. I accidentally wrote the following:

Name -> "ML_WaveToyDGFE_RHSFluxes AS ML_WaveToyDGFE_RHS", Schedule -> {"IN MoL_CalcRHS", "AT analysis"},

Of course, the "AS" should go into the Schedule clause instead; name must be a legal C identifier.

eschnett avatar Sep 24 '12 19:09 eschnett

In addition to this, I thought that we might want to automatically add the thorn name as a prefix, to avoid the user having to do this. This avoids most possible name collisions, which might go undetected otherwise. The only downside to this is that when the user refers to the function name in other parts of the schedule, they would have to add the prefix. In the ideal world future, the user would not be providing Cactus schedule strings, and everything would be handled by data dependency information. In light of this, maybe we just want to recommend that the name starts with the thorn name, and warn if this is not the case. This makes the actual name visible to the user, as well as all but forcing them to follow this convention.

ianhinder avatar Sep 24 '12 22:09 ianhinder