Run Error after macOS Monterey update

Asked by Can Süslü


A few days ago I was able to generate events, but after the macOS Monterey update on M1, I now get an error while running the events.
This is the debug file :

#* MadGraph5_aMC@NLO/MadEvent *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 3.2.0 2021-08-22 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* *
#* *
#* *
#* Command File for MadEvent *
#* *
#* run as ./bin/ filename *
#* *
generate_events run_03
Traceback (most recent call last):
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 1544, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 2362, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 7266, in new_fct
    original_fct(obj, *args, **opts)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 2401, in run_generate_events
    self.exec_cmd('survey %s %s' % (self.run_name,' '.join(args)),
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 1573, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 3259, in do_survey
    jobs, P_zero_result = ajobcreator.get_helicity()
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/madevent/", line 148, in get_helicity
    self.cmd.compile(['madevent_forhel'], cwd=Pdir)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/interface/", line 1639, in compile
    return misc.compile(nb_core=self.options['nb_core'], *args, **opts)
  File "/Users/cansuslu/Downloads/MG5_aMC_v3_2_0/madgraph/various/", line 552, in compile
    raise MadGraph5Error(error_text)
madgraph.MadGraph5Error: A compilation Error occurs when trying to compile /Users/cansuslu/Downloads/MG5_aMC_v3_2_0/qqbar/SubProcesses/P1_gg_qq.
The compilation fails with the following output message:
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c driver.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c myamp.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c genps.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c unwgt.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c setcuts.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c get_color.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c cuts.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c cluster.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c reweight.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c initcluster.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c addmothers.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c setscales.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c idenparts.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c dummy_fct.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c auto_dsig.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c auto_dsig1.f -I../../Source/
    gfortran -w -fPIC -O -ffixed-line-length-132 -w -c matrix1_orig.f -I../../Source/
    gfortran -o madevent_forhel driver.o myamp.o genps.o unwgt.o setcuts.o get_color.o cuts.o cluster.o reweight.o initcluster.o addmothers.o setscales.o idenparts.o dummy_fct.o auto_dsig.o auto_dsig1.o matrix1_orig.o -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lcernlib -lbias -lstdc++
    ld: library not found for -lm
    collect2: error: ld returned 1 exit status
    make: *** [madevent_forhel] Error 1

Please try to fix this compilations issue and retry.
Help might be found at
If you think that this is a bug, you can report this at
                              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 : /Users/cansuslu/Downloads/MG5_aMC_v3_2_0/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 : /Users/cansuslu/Downloads/MG5_aMC_v3_2_0/HEPTools/madanalysis5/madanalysis5 (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)
                     lhapdf : /Users/cansuslu/Downloads/MG5_aMC_v3_2_0/HEPTools/lhapdf6_py3/bin/lhapdf-config (user set)
                 lhapdf_py2 : None
                 lhapdf_py3 : /Users/cansuslu/Downloads/MG5_aMC_v3_2_0/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

Question information

English Edit question
MadGraph5_aMC@NLO Edit question
No assignee Edit question
Solved by:
Olivier Mattelaer
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :

Hi we test that OS on a M1 (with one of the public beta) and everything was working fine.
So it is likely a local issue and not an issue within MG5aMC.
Did you check that thread:
Did not fully read it yet but they discuss the issue.



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

So according to that openblas thread the issue is that your gfortran is not compile for the correct version of the CommandLineTools that you have on your machine.
The solution that they propose is to add some environment variable to fix that (and force gfortran to link to the version of the Commandlinetools that you do have install), but the cleanest solution is likely to update both the commandlinetools and gfortran.



Revision history for this message
Can Süslü (can-suslu99) said :

Thanks Olivier Mattelaer, that solved my question.