Allow a configuration.ccl for the flesh

Issue #438 closed
Erik Schnetter created an issue

The mechanism in Cactus that handles configuration.ccl files currently cannot handle a configuration.ccl for the flesh. The enclosed patch corrects this.

This is a prerequisite for moving the MPI configuration code out of the flesh and into a thorn (as we already did for all other external libraries). The flesh will need to know whether MPI is used or not, since MPI needs to be initialized before the parameter file is read.

Keyword:

Comments (10)

  1. Erik Schnetter reporter
    • changed status to open
    • removed comment

    This patch may require a file configuration.ccl to be present in the flesh.

  2. Ian Hinder
    • removed comment

    The patch should be modified to add the empty configuration.ccl file, as it is indeed required. I have tested that an existing ET configuration compiles after the patch is applied, and also after reconfiguring. I have not tested with a full recompile.

    I am puzzled by several aspects of the patch. The change to make.configuration seems fine. The change to CST is skipping adding a thorn to the Makefile if it is Cactus, which I don't fully follow - could you explain this part?. The changes to ConfigurationParser.pl and CreateConfigurationBindings.pl also appear unrelated to this ticket (and should delete lines rather than commenting them out).

    Maybe this could be split into separate patches.

  3. Erik Schnetter reporter
    • removed comment

    Does this mean that you approve of the idea of having an empty configuration.ccl in the flesh?

    I can't produce a patch to add the empty configuration.ccl file; this isn't possible with svn -- you probably mean to ensure that such an empty file is committed if the patch is applied.

    A thorn called "Cactus" is how the flesh is represented internally. The flesh is treated specially in many ways, and this particular loop can't handle the flesh because it determines arrangement and thorn name from a directory name, which doesn't make sense for the flesh. The original if statement only skips two lines, while the next statement also skips the remainder of the loop for the flesh, which needs to be skipped for the same reason as above.

    The change to ConfigurationParser.pl changes debug code that is commented out by default. It could go into a separate patch; however, given the complexity of preparing, submitting, reviewing, and then applying patches, this doesn't seem worthwhile. I'll do it if you think this helps.

    The change to CreateConfigurationBindings corrects an inconsistency; it ensures that each requirement is processed only once.

    The latter two changes can be applied independently of allowing a configuration.ccl for the flesh, but I found them necessary during testing, so I would call them a prerequisite, although I can't recall the exact circumstances under which these changes were required to correct a problem.

  4. Ian Hinder
    • removed comment

    I didn't know that the SVN patch format doesn't support adding empty files. If there is a good reason why it's hard to make the code work without having an empty configuration.ccl file in the flesh, then I'd say this was a minor problem and perfectly fine to apply. If on the other hand it is easy to correct, then by all means do so :)

  5. Frank Löffler
    • removed comment

    Replying to [comment:4 eschnett]:

    I can't produce a patch to add the empty configuration.ccl file; this isn't possible with svn -- you probably mean to ensure that such an empty file is committed if the patch is applied.

    I am curious why that isn't possible. When I try and touch a new file, add it to the repository and do 'svn diff' I get:

    Index: configuration.ccl

    Isn't this indicating a new, empty file in a patch?

  6. Erik Schnetter reporter
    • removed comment

    It is somewhat difficult to allow no configuration.ccl file in the flesh. One needs to write a makefile rule that detects if a configuration.ccl is there and wasn't before, or if it is there and has changed, or if it is not there and more but used to be there, but doesn't complain if it is missing. Makefiles aren't designed for this; if a dependency is missing, this usually leads to an error.

    Cactus introduces a special logic for this, explicitly keeping track of which thorns have a configuration.ccl file and which don't, and since the flesh and the thorns are treated somewhat differently we would have to duplicate this logic for the flesh. I don't think it's worth the effort.

  7. Log in to comment