Apparent installation problem when trying to run loop calculations via MadLoop

Asked by Ali

Hi,

I hope this finds you well. I am working with MG5_aMC_v3_5_2 and am currently tracking down a problem with MadLoop5 which I suspect comes down to my installation. For context, this problem arises already when working with the inbuilt 'loop_sm' model, wherein I want to work with the following process in order to calculate a gluon fusion cross section:

MG5_aMC>generate g g > h / u d c s b aEW<=2 [QCD]

(1) When I 'output' this process, I get the following warning:

MG5_aMC>output
INFO: initialize a new directory: PROC_loop_sm_0
INFO: remove old information in PROC_loop_sm_0
WARNING: [Errno 2] No such file or directory: '/home/USERNAME/MG5_aMC_v3_5_2/Template/loop_material/StandAlone/SubProcesses/MadLoop5_resources'

(2) Launching this process despite the warning gets me:

root: Error while executing ./check in /home/USERNAME/MG5_aMC_v3_5_2/PROC_loop_sm_0/SubProcesses/PV0_0_1_gg_h_no_udcsb
root: Failed at running the process in /home/USERNAME/MG5_aMC_v3_5_2/PROC_loop_sm_0/SubProcesses/PV0_0_1_gg_h_no_udcsb.
Error detected in "generate_events run_01"
write debug file /home/USERNAME/MG5_aMC_v3_5_2/PROC_loop_sm_0/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
str : Failed the initialization of loop-induced matrix element 'PV0_0_1_gg_h_no_udcsb' (trying with a maximum of 18 PS points).
quit
INFO:

(3) The log file run_01_tag_1_debug.log contains the following information, which suggests a failure in initializing the loop-induced matrix element (whatever that means):

generate_events run_01
Traceback (most recent call last):
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1546, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
    return func(arg, **opt)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 2403, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/common_run_interface.py", line 7668, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 2597, in run_generate_events
    self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)),
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1575, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
    return func(arg, **opt)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 3420, in do_survey
    self.configure_directory()
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 5898, in configure_directory
    self.do_treatcards('')
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 3397, in do_treatcards
    self.exec_cmd('initMadLoop -r -f')
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1575, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
    return func(arg, **opt)
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 2751, in do_initMadLoop
    MadLoopInitializer.init_MadLoop(self.me_dir,n_PS=options['nPS'],
  File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 7325, in init_MadLoop
    raise MadGraph5Error('Failed the initialization of'+\
madgraph.MadGraph5Error: Failed the initialization of loop-induced matrix element 'PV0_0_1_gg_h_no_udcsb' (trying with a maximum of 18 PS points).

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 : 8 (user set)
          cluster_temp_path : None

                      Configuration Options
                      ---------------------
               pythia8_path : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/pythia8 (user set)
                  hwpp_path : None (user set)
                thepeg_path : None (user set)
                 hepmc_path : None (user set)
           madanalysis_path : None (user set)
          madanalysis5_path : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/madanalysis5/madanalysis5 (user set)
            pythia-pgs_path : None (user set)
                    td_path : None (user set)
               delphes_path : /home/USERNAME/MG5_aMC_v3_5_2/Delphes (user set)
        exrootanalysis_path : /home/USERNAME/MG5_aMC_v3_5_2/ExRootAnalysis (user set)
               syscalc_path : None (user set)
                 rivet_path : None
                  yoda_path : None
                     lhapdf : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/lhapdf6_py3/bin/lhapdf-config (user set)
                 lhapdf_py2 : None
                 lhapdf_py3 : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/lhapdf6_py3/bin/lhapdf-config (user set)
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

Now, I do not exactly know what I am looking for within the PV0_0_1_gg_h_no_udcsb directory in order to solve this issue, as I find no .log file to inspect. Ultimately, I suspect this all goes back to the warning at point (1), see above. However, if that is the case, I really do not know how to install those MadLoop5_resources, as they do not belong to the default options for installation under the 'install' command. I would greatly appreciate any thoughts on this. Thank you very much in advance!

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
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

I do reproduce the warning and indeed this file does not exists in our installation (will need to check if that file was existing in some old version of the code).
But this is not related to your "real" issue.

This is an intermittent issue that is inherent to loop induced processes where it is sometimes difficult to initialize madloop code if the seed select badly the first few event (to deterimine the zero helicity /...)
The typical solution is to relaunch the code, but I will also take a look to see if we can increase the number of trial to try to limit such issue.

Cheers,

Olivier

> On 19 Dec 2023, at 18:20, Álvaro <email address hidden> wrote:
>
> New question #708758 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/708758
>
> Hi,
>
> I hope this finds you well. I am working with MG5_aMC_v3_5_2 and am currently tracking down a problem with MadLoop5 which I suspect comes down to my installation. For context, this problem arises already when working with the inbuilt 'loop_sm' model, wherein I want to work with the following process in order to calculate a gluon fusion cross section:
>
> MG5_aMC>generate g g > h / u d c s b aEW<=2 [QCD]
>
> (1) When I 'output' this process, I get the following warning:
>
> MG5_aMC>output
> INFO: initialize a new directory: PROC_loop_sm_0
> INFO: remove old information in PROC_loop_sm_0
> WARNING: [Errno 2] No such file or directory: '/home/USERNAME/MG5_aMC_v3_5_2/Template/loop_material/StandAlone/SubProcesses/MadLoop5_resources'
>
> (2) Launching this process despite the warning gets me:
>
> root: Error while executing ./check in /home/USERNAME/MG5_aMC_v3_5_2/PROC_loop_sm_0/SubProcesses/PV0_0_1_gg_h_no_udcsb
> root: Failed at running the process in /home/USERNAME/MG5_aMC_v3_5_2/PROC_loop_sm_0/SubProcesses/PV0_0_1_gg_h_no_udcsb.
> Error detected in "generate_events run_01"
> write debug file /home/USERNAME/MG5_aMC_v3_5_2/PROC_loop_sm_0/run_01_tag_1_debug.log
> If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
> str : Failed the initialization of loop-induced matrix element 'PV0_0_1_gg_h_no_udcsb' (trying with a maximum of 18 PS points).
> quit
> INFO:
>
>
> (3) The log file run_01_tag_1_debug.log contains the following information, which suggests a failure in initializing the loop-induced matrix element (whatever that means):
>
>
> generate_events run_01
> Traceback (most recent call last):
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1546, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
> return func(arg, **opt)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 2403, in do_generate_events
> self.run_generate_events(switch_mode, args)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/common_run_interface.py", line 7668, in new_fct
> original_fct(obj, *args, **opts)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 2597, in run_generate_events
> self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)),
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1575, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
> return func(arg, **opt)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 3420, in do_survey
> self.configure_directory()
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 5898, in configure_directory
> self.do_treatcards('')
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 3397, in do_treatcards
> self.exec_cmd('initMadLoop -r -f')
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1575, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/extended_cmd.py", line 1495, in onecmd_orig
> return func(arg, **opt)
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 2751, in do_initMadLoop
> MadLoopInitializer.init_MadLoop(self.me_dir,n_PS=options['nPS'],
> File "/home/USERNAME/MG5_aMC_v3_5_2/madgraph/interface/madevent_interface.py", line 7325, in init_MadLoop
> raise MadGraph5Error('Failed the initialization of'+\
> madgraph.MadGraph5Error: Failed the initialization of loop-induced matrix element 'PV0_0_1_gg_h_no_udcsb' (trying with a maximum of 18 PS points).
>
> 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 : 8 (user set)
> cluster_temp_path : None
>
> Configuration Options
> ---------------------
> pythia8_path : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/pythia8 (user set)
> hwpp_path : None (user set)
> thepeg_path : None (user set)
> hepmc_path : None (user set)
> madanalysis_path : None (user set)
> madanalysis5_path : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/madanalysis5/madanalysis5 (user set)
> pythia-pgs_path : None (user set)
> td_path : None (user set)
> delphes_path : /home/USERNAME/MG5_aMC_v3_5_2/Delphes (user set)
> exrootanalysis_path : /home/USERNAME/MG5_aMC_v3_5_2/ExRootAnalysis (user set)
> syscalc_path : None (user set)
> rivet_path : None
> yoda_path : None
> lhapdf : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/lhapdf6_py3/bin/lhapdf-config (user set)
> lhapdf_py2 : None
> lhapdf_py3 : /home/USERNAME/MG5_aMC_v3_5_2/HEPTools/lhapdf6_py3/bin/lhapdf-config (user set)
> 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
>
> Now, I do not exactly know what I am looking for within the PV0_0_1_gg_h_no_udcsb directory in order to solve this issue, as I find no .log file to inspect. Ultimately, I suspect this all goes back to the warning at point (1), see above. However, if that is the case, I really do not know how to install those MadLoop5_resources, as they do not belong to the default options for installation under the 'install' command. I would greatly appreciate any thoughts on this. Thank you very much in advance!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Ali (nabokovian) said :
#2

Hi Olivier,

Thank you for the prompt response. Glad to see what I asked was somewhat justified and not entirely trivial.

I am afraid though that I have a question on semantics now. When you say "the typical solution is to relaunch the code", do you literally mean executing the 'launch' command a second time after it fails the first time? I.e.

> generate g g > h / u d c s b aEW<=2 [QCD]
> output
> launch (setting the cards, etc.)
> get error messages
> launch

Perhaps this isn't what you mean - and, perhaps unsurprisingly, this just gives me the same error twice. As an alternative, and since you mentioned problems with the seeding, I tried tweaking the seed in the param card, yet this doesn't seem to do the trick either. (At least not the change of "0 = iseed" to any other integer that I have attempted.)

In that sense, I'd be very thankful if you could clarify the notion of 'relaunching' the code.

Cheers!

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

Yes for me just redo a "launch" was solving the issue in most cases.

I did have tested your process on my laptop and it did not trigger the issue...

> On 19 Dec 2023, at 23:35, Ali <email address hidden> wrote:
>
> Question #708758 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/708758
>
> Status: Answered => Open
>
> Ali is still having a problem:
> Hi Olivier,
>
> Thank you for the prompt response. Glad to see what I asked was somewhat
> justified and not entirely trivial.
>
> I am afraid though that I have a question on semantics now. When you say
> "the typical solution is to relaunch the code", do you literally mean
> executing the 'launch' command a second time after it fails the first
> time? I.e.
>
>> generate g g > h / u d c s b aEW<=2 [QCD]
>> output
>> launch (setting the cards, etc.)
>> get error messages
>> launch
>
> Perhaps this isn't what you mean - and, perhaps unsurprisingly, this
> just gives me the same error twice. As an alternative, and since you
> mentioned problems with the seeding, I tried tweaking the seed in the
> param card, yet this doesn't seem to do the trick either. (At least not
> the change of "0 = iseed" to any other integer that I have attempted.)
>
> In that sense, I'd be very thankful if you could clarify the notion of
> 'relaunching' the code.
>
> Cheers!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Ali (nabokovian) said (last edit ):
#4

Hi Olivier (and happy new year),

Thank you for the response and apologies for my own delay in advancing this thread.

Unfortunately, redoing "launch" does not seem to work with me and neither with some colleagues who have the same or another recent installation (yet a different computer, etc.). On the off chance that this is a problem of recent versions, would you mind sharing which version of the code you tried this with successfully? Of course, any further feedback as to where I could try to look into would be very much welcome. At any rate, I'll try to keep looking into this issue and post a solution if I were to find any myself. Thank you in advance!

Cheers

Revision history for this message
Ali (nabokovian) said :
#5
Revision history for this message
Ali (nabokovian) said (last edit ):
#6

Hi again, Olivier:

I've been trying out a few more things regarding this issue. The last thing was a simple attempt to run the aMCatNLO tutorial responsible for the 'generate ... [QCD]' processes. I do in fact get an error here which looks like

Command "launch auto " interrupted with error:
Exception : program /home/ali/MG5_aMC_v3_5_2/bin/MY_FIRST_AMCATNLO_RUN/SubProcesses/P0_udx_veep/ajob1 1.0 F 0 0 launch ends with non zero status: 127. Stop all computation
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/home/ali/MG5_aMC_v3_5_2/bin/MY_FIRST_AMCATNLO_RUN/run_01_tag_1_debug.log'.
Please attach this file to your report.

Could this be related to my issues and if yes, do you have any suggestion as to how to go about it? Will be glad to share the .log file if needed.

Cheers

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

Error code 127 is the typical error code (from script) when a binary is not available.
So some executable called from this file is not available on your system:
/home/ali/MG5_aMC_v3_5_2/bin/MY_FIRST_AMCATNLO_RUN/SubProcesses/P0_udx_veep/ajob1

in that file everything is standard bash command,
the only non trivial executable is
/home/ali/MG5_aMC_v3_5_2/bin/MY_FIRST_AMCATNLO_RUN/SubProcesses/P0_udx_veep/madevent_mintMC
can you check that you do have that file (and that it has execution permission).

If this sounds working, then the next things to check is to run the following two commands:
cd /home/ali/MG5_aMC_v3_5_2/bin/MY_FIRST_AMCATNLO_RUN/SubProcesses/P0_udx_veep/GF1.0
../madevent_mintMC < input_app.txt

If those are working as well, then the issue is likely with the bash interpreter.
That script is actually assuming that /bin/bash does exists (it is the case on your machine?)

Cheers,

Olivier

Revision history for this message
Ali (nabokovian) said (last edit ):
#8

Hi again Olivier,

Thank you. I have checked your three suggestions. The madevent_mintMC file does exist, as well as a /bin/bash. Apparently, the problem lies in executing your suggested consecutive commands

cd /home/ali/MG5_aMC_v3_5_2/bin/MY_FIRST_AMCATNLO_RUN/SubProcesses/P0_udx_veep/GF1.0
../madevent_mintMC < input_app.txt

which gives me the following error message:

../madevent_mintMC: error while loading shared libraries: libgolem.so.0: cannot open shared object file: No such file or directory

This is... odd. I should have successfully installed Golem95, as I have a /home/ali/MG5_aMC_v3_5_2/golem95 directory which happens to contain the files

.../golem95/.libs/libgolem.so.0
.../golem95/lib/libgolem.so.0

If anything, it seems like these are not found when executing your suggested commands, not sure why. I suppose it's possible that I have installed things in a wrong location; yet, since some colleagues are experiencing the same issues on an independent system, I suspect there could be more to it than that. Be it as it may, would you happen to have any suggestions for a fix? Thank you in advance!

Cheers

PS: I am addressing this latter issue originating with the aMCatNLO tutorial in the hopes that it is at least tangentially related to the original issue of this post. Naively, that would seem to be the case. Yet if it is not, apologies for making a mess of this thread... and thank you for taking a look at all of this.

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

Hi,

I do believe that it can be a linked error, since this might explains why the initialization of the loop-induced processes never works (if it is also failing to link to some dynamical library).

From here, you can try two directions:
1) remove golem installation and re-generate the code (so re-run the tutorial) since golem is not needed for such type of computation.
2) try to keep golem installation but then update your LD_LIBRARY_PATH to ensure that the path of .../golem95/lib/ is included in that environment variable.

Cheers,

Olivier

Revision history for this message
Ali (nabokovian) said :
#10

Hi again Olivier,

Thank you very much! Direction 2) seems to have solved the original problem of this thread. I can certainly run the aMCatNLO tutorial as well as the "g g > h aEW<=2 [QCD]" process. Will have to try it out on the model I want to study, but this is promising already.

Cheers

Revision history for this message
Ali (nabokovian) said :
#11

Thanks Olivier Mattelaer, that solved my question.