Open covarell opened 5 years ago
The issue appears when the extramodel datacard does not contain EOL.
It can be fixed replacing this line:
sed 's:#.*$::g' $CARDSDIR/${name}_extramodels.dat | while read model
with
sed 's:#.*$::g' $CARDSDIR/${name}_extramodels.dat | while read -r model || [ -n "$model" ]
but there is probably even a simpler bash solution...
I see as of today the same issue, can @lviliani make a PR of it please?
Here it is #2449. Do you want the same PR also in UL2019 and mg265?
UL2019 is sufficient, as 265 is now the new master.
Apparently the gridpack_generation.sh script in the mg265 branch does not work properly for the "extramodels" section, probably because of unrecognized or not properly parsed bash syntax.
A simple description of the problem follows (observed at cmsconnect, but also verified by @lviliani at lxplus):
The command: ./submit_cmsconnect_gridpack_generation.sh llll_qcd_cHWB_13TeV cards/llll_qcd_cHWB_13TeV 1 "2 Gb"
fails with an extramodel card which anyway follows the suggested syntax: $ more cards/llll_qcd_cHWB_13TeV/llll_qcd_cHWB_13TeV_extramodels.dat smeft4vbs.tgz
I checked that the model is not downloaded from the web server to the models/ directory of MG as it should be.
However, simplifying the bash as follows (in principle that should be equivalent) everything works:
The problem appears to be in the syntax "sed 's:#.*$::g' $CARDSDIR/${name}_extramodels.dat | while read model" (???) because the first "echo" message is found in the log, the second isn't.