MadGraph is showing error after MAC OS update to Ventura 13.4

Bug #2024904 reported by Chayan Majumdar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
New
Undecided
Unassigned

Bug Description

Hi,

I have recently updated my MAC OS to Ventura 13.4 (before that the Madgraph version 3.4.2 was working perfectly fine). Now if I try to generate some process, it will end up showing the error :

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
Error detected in "generate_events run_01"
write debug file /Users/chayan/Downloads/MG5_aMC_v3_4_2/try/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 /Users/chayan/Downloads/MG5_aMC_v2_9_15/try/Source.
 The compilation fails with the following output message:
     /bin/sh: /usr/local/bin/gfortran: Bad CPU type in executable
     gfortran -w -fPIC -O -ffixed-line-length-132 -c -o StringCast.o StringCast.f
     make: gfortran: Bad CPU type in executable
     gfortran -w -fPIC -O -ffixed-line-length-132 -c -o ranmar.o ranmar.f
     make: gfortran: Bad CPU type in executable
     gfortran -w -fPIC -O -ffixed-line-length-132 -c -o alfas_functions.o alfas_functions.f
     make: gfortran: Bad CPU type in executable
     gfortran -w -fPIC -O -ffixed-line-length-132 -c -o transpole.o transpole.f
     make: gfortran: Bad CPU type in executable
     make: *** [StringCast.o] Error 1
     make: *** Waiting for unfinished jobs....
     make: *** [ranmar.o] Error 1
     make: *** [alfas_functions.o] Error 1
     make: *** [transpole.o] 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

I have tried to reinstall the xcode as well as gcc compiler, but the same problem still persists. Can you please help me regarding this. I am also attaching the corresponding bug report here. Thanks in advance,

Chayan

Tags: bug report
Revision history for this message
Chayan Majumdar (chayan12345) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 2024904] [NEW] MadGraph is showing error after MAC OS update to Ventura 13.4
Download full text (6.4 KiB)

Hi,

Yes Update to Ventura is extremely problematic and it took me ~8 months to have a setup that seems to fully work with that OS. Which (I hope) is the case now.

So I have tested so many stuff in that period that it would be difficult to explain the full stuff that I did.
But basically
1) remove gcc from brew (or equivalent)
2) install gfortran AND gcc from https://hpc.sourceforge.net/
3) be sure that you always use those
4) install with brew python3.11
5) remove all previous installation/compiled library/... (so in case of MG5aMC, the best is to remove the directory and do a full re-install including ).
6) be sure to use the gcc compiler installed by sourceforge within MG5aMC (so include cpp_compiler = g++ in the mg5_configuration.txt)
6) I think that LHAPDF installation was still problematic since it had issue with the python version.
So my advise is to first compile it without python and then when you have figure it out, then add python (I might have need to hack the installation of lhapdf to do it but not sure anymore)

The main issue with Venturra is that MacOS move a lot of code to arm based while before it was intel based so any code linking to one of such code is now forced to use ARM format while before it was forced to used INTEL format.
So you need to clean (A LOT) of library and re-compile them.

As said, after 8 months, I finally succeed to do it locally (I hope) thanks to https://hpc.sourceforge.net/
that provide a dedicated gcc and gfortran routine that fixed such type of issue (was not the case with those from brew).

Good luck,

Olivier

> On 23 Jun 2023, at 16:05, Chayan Majumdar <email address hidden> wrote:
>
> Public bug reported:
>
> Hi,
>
> I have recently updated my MAC OS to Ventura 13.4 (before that the
> Madgraph version 3.4.2 was working perfectly fine). Now if I try to
> generate some process, it will end up showing the error :
>
> 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
> Error detected in "generate_events run_01"
> write debug file /Users/chayan/Downloads/MG5_aMC_v3_4_2/try/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 /Users/chayan/Downloads/MG5_aMC_v2_9_15/try/Source.
> The compilation fails with the following output message:
> /bin/sh: /usr/local/bin/gfortran: Bad CPU type in executable
> gfortran -w -fPIC -O -ffixed-line-length-132 -c -o StringCast.o StringCast.f
> make: gfortran: Bad CPU type in executable
> gfortran -w -fPIC -O -ffixed-line-length-132 -c -o ranmar.o ranmar.f
> make: gfortran: Bad CPU type in executable
> gfortran -w -fPIC -O -ffixed-line-length-132 -c -o alfas_functions.o alfas_functions.f
> make: gfortran: Bad CPU type in executable
> gfortran -w -fPIC -O -ffixed-line-length-132 -c -o transpole.o transpole.f
> make: gfortran: Bad CPU type in executable
> make: *** [StringCast.o] Error 1
> make: *** Waiting for unfinished jobs....
> make: *** ...

Read more...

Revision history for this message
Chayan Majumdar (chayan12345) wrote :
Download full text (7.7 KiB)

Hi Olivier,

Thanks for the detailed reply. I have tried the steps according to your suggestions, but still I am getting error message :

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 = 21
INFO: Running Survey
Creating Jobs
Working on SubProcesses
INFO: Compiling for process 1/1.
INFO: P1_ll_vlvl
Error detected in "generate_events run_01"
write debug file /Users/chayan/Applications/software/MG5_aMC_v3_5_0/try/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 /Users/chayan/Applications/software/MG5_aMC_v3_5_0/try/SubProcesses/P1_ll_vlvl.
 The compilation fails with the following output message:
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaconda3/include -O -ffixed-line-length-132 -w -c driver.f -I../../Source/ -I../../Source/PDF/gammaUPC
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaconda3/include -O -ffixed-line-length-132 -w -c myamp.f -I../../Source/ -I../../Source/PDF/gammaUPC
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaconda3/include -O -ffixed-line-length-132 -w -c genps.f -I../../Source/ -I../../Source/PDF/gammaUPC
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaconda3/include -O -ffixed-line-length-132 -w -c unwgt.f -I../../Source/ -I../../Source/PDF/gammaUPC
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaconda3/include -O -ffixed-line-length-132 -w -c setcuts.f -I../../Source/ -I../../Source/PDF/gammaUPC
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaconda3/include -O -ffixed-line-length-132 -w -c get_color.f -I../../Source/ -I../../Source/PDF/gammaUPC
     x86_64-apple-darwin13.4.0-gfortran: warning: could not understand version 13.04.00
     /opt/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /opt/anaco...

Read more...

Revision history for this message
Chayan Majumdar (chayan12345) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi,

I see that you use anaconda. Are you sure that anaconda is going to provide solution optimized for MAC?
If you have an intel chip, this might be working but if you have an apple chip, then it might be problematic.

Even if you are on intel, it seems that your compiler does not support Mac compatibility version flag and then the code fail to compile due to ... some compatibility issue when trying to compile for old version of MaxOSX.

Now as I told you it took me 8 months to have something working on my own machine, so trying to fix your issue on your machine where I have much more partial information is currently irrealistic for me (at least for the moment).

Actually for mac user, my advise is now to run on unix if they have installation issue.
Now that I have finally succeed on one machine, I can try to see if I can automate some of the step but official support for the latest OS is not yet possible.

Cheers,

Olivier

Revision history for this message
Chayan Majumdar (chayan12345) wrote :

Hi,

Thanks for the suggestion, I will try to run Madgraph on Unix.

Best,
Chayan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.