-
Notifications
You must be signed in to change notification settings - Fork 62
Description
The MCPL_output component (all versions, including the McStas, McXtrace, and _noacc) stores a blob in the MCPL header with the key named "mccode_cmd_line".
I expected it to store the command used to invoked the McStas simulation (with the input parameters), but it actually stores a line to invoke the .out file with the DEFAULT values for all input parameter for the instrument. e.g.,
./loki_master_model.out collen=3.0 l_min=3.0 l_max=11.5 ...
For me, this is:
- Confusing because of the default values (rather than the actual values used for the simulation)
- Redundant because the other blob saved (mccode_instr_file) contains the whole instrument file, which includes default input parameters at the beginning ((I haven't checked what happens when the instrument file includes an another one with %include))
Checking the code history, I found that the original implementation (commit message:“command line pars are now packed in a binary header blob”) did in fact store the actual values, but later it was changed to the default values with the message: “fix header blob bug which might prevent merges”.
I am aware of that multiple MCPL files can only be merged if the headers (including the blobs) are the same, but I don't see any reasonable case when the merge could fail for a single simulation if the actually used values of the input parameters would be stored. (If it would fail because the MCPL files to be merged are from simulations with different settings, then the --forcemerge MCPL option could/should be used.)
I could easily be wrong, or miss a specific use case, so could you someone explain why it is the way it is? (Maybe @ebknudsen, who authored both the original commit and the modification?)