MadSTR parameters not properly identified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MadGraph5_aMC@NLO |
New
|
Undecided
|
marco zaro |
Bug Description
Hi Olivier, all,
I think I've tracked down something funny in the handling of parameters from plugins. There are two issues I've run into (one more serious than the other). I'm putting the second at the bottom clearly marked off — it seems like an out of date patch (fine).
As I mentioned, the first is a little more serious, and I'm struggling with how to fix it.
When we run with a plugin like:
MG5_aMC_
import model loop_sm-no_b_mass
generate p p > t w- [QCD]
add process p p > t~ w+ [QCD]
output -f
EOF
some lines get added to banner.py (I have not attempted to figure out where exactly this is happening, but it seems to be done correctly); in the case of MadSTR those lines are:
5352,5354d5348
< self.add_
< self.add_
< self.add_
When we run event generation with:
bin/generate_events
it does:
sys.path.
import amcatnlo_
which then executes this:
try:
import madgraph
except ImportError:
...
import internal.banner as banner_mod
...
else:
# import from madgraph directory
...
import madgraph.
...
Now, one thing we do normally — I don't know whether it's required, and guidance is of course welcome. We include our MadGraph5_aMC@NLO installation in our standard PYTHONPATH. You tell me if that's something we should stop doing in the future (I hope with minimal consequences if that's the recommendation...).
The _appending_ of the executing path means that the PYTHONPATH is the first place that MG looks for modules, and it only falls back to the internal copies. However, because in this case (for MadSTR) the banner.py is modified when it is copied locally, the "central" (original) banner.py doesn't have the relevant parameters defined. This then ends up in an ugly looking crash from parameters being mis-defined in fortran (the error looks very similar to https:/
So what do we do here? Options include:
- stop including MG5_aMC in our standard PYTHONPATH?
- pick up the internal modules by default
- pick up the internal modules by default only in the case a PLUGIN is used
- pick up the right banner specifically in the case a PLUGIN is used
- add parameters to the banner in another way that doesn't run into this PYTHONPATH problem
I'm sure there are other ways around this, but I'm out of gas now having scratched my head over this thing for too long :)
Any help is very welcome!
Now, the other (easy) report:
################# Second report #######
wget https:/
tar -xzf MG5_aMC_
git clone <email address hidden>
mv MadSTR/MadSTR/ MG5_aMC_
MG5_aMC_
import model loop_sm-no_b_mass
generate p p > t w- [QCD]
add process p p > t~ w+ [QCD]
output -f
EOF
In the output -f step we get the error:
patching file SubProcesses/
Hunk #1 FAILED at 3011 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file SubProcesses/
for info, here is the rejected patch:
--- SubProcesses/
+++ /dev/null
@@ -3011,22 +3011,6 @@
endif
- if(wgt.lt.0.d0)then
- icount=icount+1
- if (icount.le.10) then
- write(*,*) 'Warning, numerical problem found in sreal. '/
- $ /'Setting weight to zero',wgt,
- do i=1,nexternal
- write(*,*) 'particle ',i,', ',(pp(j,i),j=0,3)
- enddo
- if (icount.eq.25) then
- write (*,*) 'ERROR 25 problems found... '/
- $ /'stopping the code'
- stop
- endif
- endif
- wgt=0d0
- endif
return
end
Cheers,
Zach
Hi,
Concerning the first error (first thanks for the super detailled and cleaned report),
From 3.6.0 (in principle), the support of plugin that need to tune the launch command and define additional
input in the run_card would have a dedicated API. Soon I'm going to visit Marco, and I can try to push MadSTR to use this new API as well. This should make MadSTR compatible with the launch command from the MG5 executable and therefore could be run without loading any of the duplicated file between bin/internal and madgraph.
While the above method is likely to allow to put madgraph in PYTHONPATH but it is not clear if that it will be enough. This is not first time that we receive bug report from people that put madgraph in their PYTHONPATH (to be exact I remember one case from the docker installation of madgraph --maybe correlated to readonly issue--). And yes this is not something that we recommend (or test). Now, I'm fine to (try) to fix the issue when we face them.
For the second issue, I will assign this directly to Marco.
Olivier