Problems when trying to implement a new lpp option

Asked by Matheus Pereira Coelho

Hi!

I'm using an UFO from ALP-linear model and producing ax a > a and I want to assign a lpp==5 option related to the scalar particle "ax". In order to do that, I have tried to find files which receives the parameter "lpp" to include this new option, as the example of setrun.f at "Source", pdg2pdf.f, pdg2pdf_lhapdf6.f and pdf.f at "Source/PDF", banner.py and common_run_interface.py at "bin/internal" and so on. A new function similar to the epa_lepton at "Source/PDF/photonflux.f" linked to lpp==5 was also included in this same file, just as its reference in some of the forementioned files above (the same for parameters such as the mass and PID of "ax").

An example of the changes done in setrun.f:

      do i=1,2
        if(lpp(i).eq.1.or.lpp(i).eq.2) then
          idbmup(i)=2212
        elseif(lpp(i).eq.-1.or.lpp(i).eq.-2) then
          idbmup(i)=-2212
        elseif(lpp(i).eq.3) then
          idbmup(i)=11
        elseif(lpp(i).eq.-3) then
          idbmup(i)=-11
        elseif(lpp(i).eq.4) then
            idbmup(i)=13
        elseif(lpp(i).eq.-4) then
            idbmup(i)=-13
        elseif(lpp(i).eq.5) then
            idbmup(i)=9000005
         elseif(lpp(i).eq.-5) then
     idbmup(i)=-9000005
        elseif(lpp(i).eq.0) then
          idbmup(i)=idup(i,1,1)
        else
          idbmup(i)=lpp(i)
        endif
      enddo

Where the new part,

        elseif(lpp(i).eq.5) then
            idbmup(i)=9000005
         elseif(lpp(i).eq.-5) then
     idbmup(i)=-9000005

is just an example of the kind of changes done also in other files (just as the ones mentioned above).

Then, when launching the process, the following error is reported:

INFO: Update the dependent parameter of the param_card.dat
Generating 10000 events with run name run_01
survey run_01
INFO: compile directory
compile Source Directory
Using random number seed offset = 102
INFO: Running Survey
Creating Jobs
Working on SubProcesses
INFO: Compiling for process 1/1.
INFO: P1_axa_a
Error detected in "generate_events run_01"
write debug file /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
str : A compilation Error occurs when trying to compile /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/SubProcesses/P1_axa_a.
 The compilation fails with the following output message:
     gfortran -o gensym symmetry.o idenparts.o -L../../lib/ -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib -lbias -lc++
     /usr/bin/ld: cannot find -lc++abi: No such file or directory
     collect2: error: ld returned 1 exit status
     make: *** [makefile:62: gensym] Error 1

 Please try to fix this compilations issue and retry.
 Help might be found at https://answers.launchpad.net/mg5amcnlo.
 If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
quit

And the debug log output

#************************************************************
#* MadGraph5_aMC@NLO/MadEvent *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 3.5.3 2023-12-23 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadEvent *
#* *
#* run as ./bin/madevent.py filename *
#* *
#************************************************************
generate_events run_01
Traceback (most recent call last):
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1546, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
    return func(arg, **opt)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/madevent_interface.py", line 2403, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/common_run_interface.py", line 7701, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/madevent_interface.py", line 2598, in run_generate_events
    postcmd=False)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1575, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
    return func(arg, **opt)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/madevent_interface.py", line 3456, in do_survey
    jobs, P_zero_result = ajobcreator.get_helicity()
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/madevent/gen_ximprove.py", line 149, in get_helicity
    self.cmd.compile(['gensym'], cwd=Pdir)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1641, in compile
    return misc.compile(nb_core=self.options['nb_core'], *args, **opts)
  File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/various/misc.py", line 591, in compile
    raise MadGraph5Error(error_text)
madgraph.MadGraph5Error: A compilation Error occurs when trying to compile /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/SubProcesses/P1_axa_a.
The compilation fails with the following output message:
    gfortran -o gensym symmetry.o idenparts.o -L../../lib/ -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib -lbias -lc++
    /usr/bin/ld: cannot find -lc++abi: No such file or directory
    collect2: error: ld returned 1 exit status
    make: *** [makefile:62: gensym] Error 1

Please try to fix this compilations issue and retry.
Help might be found at https://answers.launchpad.net/mg5amcnlo.
If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
                              Run Options
                              -----------
               stdout_level : 20 (user set)

                         MadEvent Options
                         ----------------
     automatic_html_opening : False (user set)
        notification_center : True
                   run_mode : 2
              cluster_queue : None (user set)
               cluster_time : None (user set)
               cluster_size : 100
             cluster_memory : 100 (user set)
                    nb_core : 4 (user set)
          cluster_temp_path : None

                      Configuration Options
                      ---------------------
               pythia8_path : None (user set)
                  hwpp_path : None (user set)
                thepeg_path : None (user set)
                 hepmc_path : None (user set)
           madanalysis_path : None (user set)
          madanalysis5_path : None (user set)
            pythia-pgs_path : None (user set)
                    td_path : None (user set)
               delphes_path : None (user set)
        exrootanalysis_path : None (user set)
               syscalc_path : None (user set)
                 rivet_path : None
                  yoda_path : None
                     lhapdf : lhapdf-config
                 lhapdf_py2 : None
                 lhapdf_py3 : None
                    timeout : 60
              f2py_compiler : None
          f2py_compiler_py2 : None
          f2py_compiler_py3 : None
                web_browser : None
                 eps_viewer : None
                text_editor : None
           fortran_compiler : None
               cpp_compiler : None
                auto_update : 7 (user set)
               cluster_type : condor
      cluster_status_update : (600, 30)
           cluster_nb_retry : 1
         cluster_local_path : None
         cluster_retry_wait : 300

Apparently the folder SubProcesses/P1_axa_a. fails to compile.

Is there a path to do this kind of implementation? I'm in the right way? Any information will be helpful.

(I'm using madgraph 3.5.3)

thanks,
Matheus.

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Did you check that your code does compile if you do not edit anything.
(like for generate e+ e- > mu+ mu-)?

I'm asking since the error seems more related to a setup of your machine than to the change you are doing.
(but I can be wrong)

Cheers,

Olivier

> On 12 Feb 2024, at 16:55, Matheus Pereira Coelho <email address hidden> wrote:
>
> New question #709268 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/709268
>
> Hi!
>
> I'm using an UFO from ALP-linear model and producing ax a > a and I want to assign a lpp==5 option related to the scalar particle "ax". In order to do that, I have tried to find files which receives the parameter "lpp" to include this new option, as the example of setrun.f at "Source", pdg2pdf.f, pdg2pdf_lhapdf6.f and pdf.f at "Source/PDF", banner.py and common_run_interface.py at "bin/internal" and so on. A new function similar to the epa_lepton at "Source/PDF/photonflux.f" linked to lpp==5 was also included in this same file, just as its reference in some of the forementioned files above (the same for parameters such as the mass and PID of "ax").
>
> An example of the changes done in setrun.f:
>
> do i=1,2
> if(lpp(i).eq.1.or.lpp(i).eq.2) then
> idbmup(i)=2212
> elseif(lpp(i).eq.-1.or.lpp(i).eq.-2) then
> idbmup(i)=-2212
> elseif(lpp(i).eq.3) then
> idbmup(i)=11
> elseif(lpp(i).eq.-3) then
> idbmup(i)=-11
> elseif(lpp(i).eq.4) then
> idbmup(i)=13
> elseif(lpp(i).eq.-4) then
> idbmup(i)=-13
> elseif(lpp(i).eq.5) then
> idbmup(i)=9000005
> elseif(lpp(i).eq.-5) then
> idbmup(i)=-9000005
> elseif(lpp(i).eq.0) then
> idbmup(i)=idup(i,1,1)
> else
> idbmup(i)=lpp(i)
> endif
> enddo
>
> Where the new part,
>
> elseif(lpp(i).eq.5) then
> idbmup(i)=9000005
> elseif(lpp(i).eq.-5) then
> idbmup(i)=-9000005
>
> is just an example of the kind of changes done also in other files (just as the ones mentioned above).
>
>
> Then, when launching the process, the following error is reported:
>
> INFO: Update the dependent parameter of the param_card.dat
> Generating 10000 events with run name run_01
> survey run_01
> INFO: compile directory
> compile Source Directory
> Using random number seed offset = 102
> INFO: Running Survey
> Creating Jobs
> Working on SubProcesses
> INFO: Compiling for process 1/1.
> INFO: P1_axa_a
> Error detected in "generate_events run_01"
> write debug file /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/run_01_tag_1_debug.log
> If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
> str : A compilation Error occurs when trying to compile /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/SubProcesses/P1_axa_a.
> The compilation fails with the following output message:
> gfortran -o gensym symmetry.o idenparts.o -L../../lib/ -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib -lbias -lc++
> /usr/bin/ld: cannot find -lc++abi: No such file or directory
> collect2: error: ld returned 1 exit status
> make: *** [makefile:62: gensym] Error 1
>
> Please try to fix this compilations issue and retry.
> Help might be found at https://answers.launchpad.net/mg5amcnlo.
> If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
> quit
>
>
>
> And the debug log output
>
> #************************************************************
> #* MadGraph5_aMC@NLO/MadEvent *
> #* *
> #* * * *
> #* * * * * *
> #* * * * * 5 * * * * *
> #* * * * * *
> #* * * *
> #* *
> #* *
> #* VERSION 3.5.3 2023-12-23 *
> #* *
> #* The MadGraph5_aMC@NLO Development Team - Find us at *
> #* https://server06.fynu.ucl.ac.be/projects/madgraph *
> #* *
> #************************************************************
> #* *
> #* Command File for MadEvent *
> #* *
> #* run as ./bin/madevent.py filename *
> #* *
> #************************************************************
> generate_events run_01
> Traceback (most recent call last):
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1546, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
> return func(arg, **opt)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/madevent_interface.py", line 2403, in do_generate_events
> self.run_generate_events(switch_mode, args)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/common_run_interface.py", line 7701, in new_fct
> original_fct(obj, *args, **opts)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/madevent_interface.py", line 2598, in run_generate_events
> postcmd=False)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1575, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
> return func(arg, **opt)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/madevent_interface.py", line 3456, in do_survey
> jobs, P_zero_result = ajobcreator.get_helicity()
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/madevent/gen_ximprove.py", line 149, in get_helicity
> self.cmd.compile(['gensym'], cwd=Pdir)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/interface/extended_cmd.py", line 1641, in compile
> return misc.compile(nb_core=self.options['nb_core'], *args, **opts)
> File "/home/matheus/madgraph/MG5_aMC_v3_5_3/madgraph/various/misc.py", line 591, in compile
> raise MadGraph5Error(error_text)
> madgraph.MadGraph5Error: A compilation Error occurs when trying to compile /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/SubProcesses/P1_axa_a.
> The compilation fails with the following output message:
> gfortran -o gensym symmetry.o idenparts.o -L../../lib/ -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib -lbias -lc++
> /usr/bin/ld: cannot find -lc++abi: No such file or directory
> collect2: error: ld returned 1 exit status
> make: *** [makefile:62: gensym] Error 1
>
> Please try to fix this compilations issue and retry.
> Help might be found at https://answers.launchpad.net/mg5amcnlo.
> If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
> Run Options
> -----------
> stdout_level : 20 (user set)
>
> MadEvent Options
> ----------------
> automatic_html_opening : False (user set)
> notification_center : True
> run_mode : 2
> cluster_queue : None (user set)
> cluster_time : None (user set)
> cluster_size : 100
> cluster_memory : 100 (user set)
> nb_core : 4 (user set)
> cluster_temp_path : None
>
> Configuration Options
> ---------------------
> pythia8_path : None (user set)
> hwpp_path : None (user set)
> thepeg_path : None (user set)
> hepmc_path : None (user set)
> madanalysis_path : None (user set)
> madanalysis5_path : None (user set)
> pythia-pgs_path : None (user set)
> td_path : None (user set)
> delphes_path : None (user set)
> exrootanalysis_path : None (user set)
> syscalc_path : None (user set)
> rivet_path : None
> yoda_path : None
> lhapdf : lhapdf-config
> lhapdf_py2 : None
> lhapdf_py3 : None
> timeout : 60
> f2py_compiler : None
> f2py_compiler_py2 : None
> f2py_compiler_py3 : None
> web_browser : None
> eps_viewer : None
> text_editor : None
> fortran_compiler : None
> cpp_compiler : None
> auto_update : 7 (user set)
> cluster_type : condor
> cluster_status_update : (600, 30)
> cluster_nb_retry : 1
> cluster_local_path : None
> cluster_retry_wait : 300
>
>
>
> Apparently the folder SubProcesses/P1_axa_a. fails to compile.
>
> Is there a path to do this kind of implementation? I'm in the right way? Any information will be helpful.
>
> (I'm using madgraph 3.5.3)
>
> thanks,
> Matheus.
>
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Matheus Pereira Coelho (matheus-coelho) said :
#2

Hi,

Yes, it's everything working well. I had also this doubt once the error seems to say that is something wrong with the compiler (?)

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

Then, I'm not sure how I can help.
What is weird is that the issue does not seems to be the compilation but the linking of all the compiled file...

Maybe the best advice that I can give is to ask to your local IT team if they provide some support.

Sorry,

Olivier

Revision history for this message
Matheus Pereira Coelho (matheus-coelho) said :
#4

Hi!

I've fixed this problem. Now, the problem is that there are no events:

INFO: Update the dependent parameter of the param_card.dat
Generating 10000 events with run name run_05
survey run_05
INFO: compile directory
compile Source Directory
Gtk-Message: 20:36:33.702: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
Using random number seed offset = 141
INFO: Running Survey
Creating Jobs
Working on SubProcesses
INFO: Compiling for process 1/1.
INFO: P1_axa_a
[7126, Main Thread] WARNING: GTK+ module /snap/firefox/3779/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187

(firefox:7126): Gtk-WARNING **: 20:36:33.853: GTK+ module /snap/firefox/3779/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 20:36:33.853: Failed to load module "canberra-gtk-module"
[7126, Main Thread] WARNING: GTK+ module /snap/firefox/3779/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:187

(firefox:7126): Gtk-WARNING **: 20:36:33.855: GTK+ module /snap/firefox/3779/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 20:36:33.855: Failed to load module "canberra-gtk-module"
INFO: P1_axa_a
INFO: Idle: 1, Running: 0, Completed: 0 [ current time: 20h36 ]
INFO: Idle: 0, Running: 0, Completed: 1 [ 0.15s ]
INFO: Idle: 0, Running: 0, Completed: 1 [ 0.15s ]
INFO: End survey
refine 10000
Creating Jobs
INFO: Refine results to 10000
INFO: Generating 10000.0 unweighted events.
sum of cpu time of last step: 0 second
INFO: Effective Luminosity nan pb^-1
INFO: need to improve 0 channels
- Current estimate of cross-section: nan +- nan
    P1_axa_a
INFO: Idle: 0, Running: 0, Completed: 0 [ current time: 20h36 ]
INFO: Combining runs
sum of cpu time of last step: 0 second
INFO: finish refine
refine 10000 --treshold=0.9
Creating Jobs
INFO: Refine results to 10000
INFO: Generating 10000.0 unweighted events.
sum of cpu time of last step: 0 second
INFO: Effective Luminosity nan pb^-1
INFO: need to improve 0 channels
- Current estimate of cross-section: nan +- nan
    P1_axa_a
INFO: Idle: 0, Running: 0, Completed: 0 [ current time: 20h36 ]
INFO: Combining runs
sum of cpu time of last step: 0 second
INFO: finish refine
INFO: Combining Events
combination of events done in 0.005326032638549805 s
  === Results Summary for run: run_05 tag: tag_1 ===

     Cross-section : nan +- nan pb
     Nb of events : 0

INFO: No version of lhapdf. Can not run systematics computation
store_events
INFO: Storing parton level results
No event detected. No cleaning performed! This should allow to run:
    cd Subprocesses; ../bin/internal/combine_events
  to have your events if those one are missing.
INFO: End Parton
reweight -from_cards
decay_events -from_cards
INFO: storing files of previous run
INFO: Done
quit
INFO:
more information in /home/matheus/madgraph/MG5_aMC_v3_5_3/ax-a_to_a/index.html
MG5_aMC>ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
writting history and quit on KeyboardInterrupt
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

Cheers,

Matheus

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

Here my suggestion would be to run with gdb to understand and dedicated compiler flag to understand why you got nan for some (or all) phase-space point.

For doing that
1) edit the file Source/make_opts to add the debugging flag (at least -g and the flag that crash on nan)
2) do in the Source directory
make clean
make
3) go to the SubProcesses/P1_axa_a
directory and do
make madevent
4) go to the G1 directory
and run
../madevent < input_app.txt
with gdb if the crash is not usefull enough

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Matheus Pereira Coelho for more information if necessary.

To post a message you must log in.