Gridpack NaN Cross Section

Asked by attilio santocchia

Hello

I'd like to produce events for CMS using the standard procedure... my goal is to extend a set of Drell-Yan already produced events for low mll mass. We have already events for mll>50GeV in several HT bins starting from 100GeV in HT and for the interval 5GeV<mll<50GeV. What I'm trying to produce is an equivalent gridpack for 1GeV<mll<5GeV. I choose to have 4 HT Bins: [100-200], [200-400], [400-600] and [600-Inf]. I have a problem whit the gridpack for the first HT Bin. I run the CMS code for all the 4 bins and got no error and the gridpack are ok... at least for the 3 highest HT bins... When I was looking at the log of the first gridpack however I found that the xsection was NaN. So I wonder how can I consider this gridpack... failed? Can I use it for producing events? If you like, you can check the gridpack by yourself (available here: /afs/cern.ch/work/s/santocch/public/DYJets_HT-extralow_mll/) and if you don't have a CERN account let me know and I put the gridpack somewhere else...

Thanks for helping

Attilio

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
attilio santocchia (santocch) said :
#1

Hello
I had a more indepth look at the gridpack... only one process had problems. Its the process P4_qq_llqqqq/G579. I copied the content of the directory here:

/afs/cern.ch/work/s/santocch/public/DYJets_HT-extralow_mll/P4_qq_llqqqq_G579

Any help/advice you can give me is really appreciate

Best

Attilio

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#2

Hi,

Indeed I do not have any lxplus account, if you can put that information in a public space, this would be useful.

Cheers,

Olivier

> On 21 Jun 2017, at 23:14, attilio santocchia <email address hidden> wrote:
>
> Question #644315 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/644315
>
> attilio santocchia gave more information on the question:
> Hello
> I had a more indepth look at the gridpack... only one process had problems. Its the process P4_qq_llqqqq/G579. I copied the content of the directory here:
>
> /afs/cern.ch/work/s/santocch/public/DYJets_HT-
> extralow_mll/P4_qq_llqqqq_G579
>
> Any help/advice you can give me is really appreciate
>
> Best
>
> Attilio
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
attilio santocchia (santocch) said :
#3

No problem. You can find both the gridpack and the specific folder where the NaN appears here:

https://www.dropbox.com/sh/hx05ta179ld5dl3/AABhoeR_Q1kUCU3Z2Eb6cjzNa?dl=0

Thanks for helping

Attilio

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#4

Hi,

Your gridpack is not complete (all .f files are missing), can you create one with those files preserved?
This is impossible for me to debug without the possibility to recompile.

Cheers,

Olivier

> On 22 Jun 2017, at 10:47, attilio santocchia <email address hidden> wrote:
>
> Question #644315 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/644315
>
> attilio santocchia posted a new comment:
> No problem. You can find both the gridpack and the specific folder where
> the NaN appears here:
>
> https://www.dropbox.com/sh/hx05ta179ld5dl3/AABhoeR_Q1kUCU3Z2Eb6cjzNa?dl=0
>
> Thanks for helping
>
> Attilio
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
attilio santocchia (santocch) said :
#5

Hi
In CMS we have a script that prepare the gridpack and delete all the unneeded files... I guess I can edit that script to keep all the files... but it will take a while. I'll be back as soon as I have the full gridpack available (I guess few days).

Thanks

Attilio

Revision history for this message
attilio santocchia (santocch) said :
#6

Hi,
I hope that my "naive" approach is correct... reproducing the problematic gridpack with all the files is a very long job so I thought that the files you need (the .f files) are the seme regardless if I produce Drell-Yan events with 1 jets or 4 jets (the former is not giving any problem and it's quite quick and the latter is very long and it gives the famous NaN xSection). So that is what I did... and you can find in the same dropbox link the pilotrun_gridpack.tar.gz file where in principle you have all the *.f files you need...

To summarize: the new file is the complete gridpack (no files deleted) from the same run_card.dat and a reduced proc_card.dat.
The original proc_card.dat was:
generate p p > l+ l- / h @0
add process p p > l+ l- j / h @1
add process p p > l+ l- j j / h @2
add process p p > l+ l- j j j / h @3
add process p p > l+ l- j j j j / h @4

The proc_card.dat I used has just:
generate p p > l+ l- / h @0
add process p p > l+ l- j / h @1

Am I too naive or is this what you need for trying to reproduce the problem?

Cheers

Attilio

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#7

Unfortunately this is not enough.

On the other hand, you can do the following:
define q = p / g
> generate q q > l+ l- q q q q / h @4

This should allow the generation to be already much faster.

You can also trick the code to generate only the G579
For this you have to edit
1) madgraph/madevent/gen_ximprove.py

You have to remove all the following lines:
          # Launch gensym
            p = misc.Popen(['./gensym'], stdout=subprocess.PIPE,
                                 stderr=subprocess.STDOUT, cwd=Pdir)
            #sym_input = "%(points)d %(iterations)d %(accuracy)f \n" % self.opts
            (stdout, _) = p.communicate('')

            if os.path.exists(pjoin(self.me_dir,'error')):
                files.mv(pjoin(self.me_dir,'error'), pjoin(Pdir,'ajob.no_ps.log'))
                P_zero_result.append(subdir)
                continue

            jobs = stdout.split()
And replace those by
     jobs = ['579']

2) SubProcesses/P4_qq_llqqqq/symfact.dat
And remove ALL lines but the ones with 579 (Note that you can not have empty line on that file and therefore you can not have any return symbol on the first line)
If that file does not exists, then you can copy the file symfact_orig.dat to symfact.dat and then doing it.

I never tried the above for gridpack but it should work as well.
Like this you will create a gridpack for only the channel with NAN that you report

Cheers,

Olivier

> On 22 Jun 2017, at 15:04, attilio santocchia <email address hidden> wrote:
>
> Question #644315 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/644315
>
> attilio santocchia posted a new comment:
> Hi,
> I hope that my "naive" approach is correct... reproducing the problematic gridpack with all the files is a very long job so I thought that the files you need (the .f files) are the seme regardless if I produce Drell-Yan events with 1 jets or 4 jets (the former is not giving any problem and it's quite quick and the latter is very long and it gives the famous NaN xSection). So that is what I did... and you can find in the same dropbox link the pilotrun_gridpack.tar.gz file where in principle you have all the *.f files you need...
>
> To summarize: the new file is the complete gridpack (no files deleted) from the same run_card.dat and a reduced proc_card.dat.
> The original proc_card.dat was:
> generate p p > l+ l- / h @0
> add process p p > l+ l- j / h @1
> add process p p > l+ l- j j / h @2
> add process p p > l+ l- j j j / h @3
> add process p p > l+ l- j j j j / h @4
>
> The proc_card.dat I used has just:
> generate p p > l+ l- / h @0
> add process p p > l+ l- j / h @1
>
> Am I too naive or is this what you need for trying to reproduce the
> problem?
>
> Cheers
>
> Attilio
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
attilio santocchia (santocch) said :
#8

Hello,
I have tricked the code to generate only the G579 following your instructions and this time the process didn't end with NaN but the cross-section was calculated correctly. I copied the file pilotrun_gridpack.tar.gz on the same dropbox folder (I renamed the previous file to old_pilotrun_gridpack.tar.gz). Just to double-check I'm just running again the original gridpack generation... to see if the NaN problem can be reproduced...

Cheers

Attilio

Revision history for this message
attilio santocchia (santocch) said :
#9

Hi
I run again the full generation and I believe I was able to keep all files... the xsection is again NaN and the problematic process is the same. The file is again in https://www.dropbox.com/sh/hx05ta179ld5dl3/AABhoeR_Q1kUCU3Z2Eb6cjzNa?dl=0

Cheers

Attilio

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#10

Dear Attilio,

I did not had the time to look at this particular problem so far. But I was investigating a similar bug report (also reporting Nan).
In that case the solution was to add one line in the run_card.dat:
False = mc_grouped_subproc

Can you try it, to see if this fix the problem in your case?

Cheers,

Olivier

Revision history for this message
attilio santocchia (santocch) said :
#11

Hi Oliver,
I added the line to the run_card.dat and it seems that the problem is solved.
Thanks

Attilio

Revision history for this message
attilio santocchia (santocch) said :
#12

Thanks Olivier Mattelaer, that solved my question.