Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Pineappl grids being produced by Madgraph #93

Open
ecole41 opened this issue Jan 31, 2025 · 10 comments
Open

No Pineappl grids being produced by Madgraph #93

ecole41 opened this issue Jan 31, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@ecole41
Copy link

ecole41 commented Jan 31, 2025

I am trying to produce some Pineappl grids for the NLO p p > t t~ [QCD] process using madgraph, but am not getting any grids produced after launching.
I have set Pineappl = true in the run card and set the pineappl path to point to the pineappl config file, but after launching, I only get these files produced:
alllogs_0.html alllogs_1.html MADatNLO.gnuplot MADatNLO.HwU MADatNLO.pdf MADatNLO.ps res_0.txt res_1.txt run_10_tag_1_banner.txt RunMaterial.tar.gz summary.txt

and no grids.

I don't get any errors but I do get this warning:
WARNING: Compilation of the Subprocesses failed
which could possibly be causing an issue?

@felixhekhorn
Copy link
Contributor

I'm not an mg5 expert so let me ping @ramonpeter (and maybe @scarlehoff ?)

In any case a relevant piece of information is: what was the exact madgraph version?

WARNING: Compilation of the Subprocesses failed

as far as I understand is magraph actually a compiler (i.e. it writes the true program on the fly) and this makes me think there might have been an issue already with madgraph itself, i.e. before the interface (e.g. some channels are missing). Did mg5 actually run? i.e. did it consume CPU or are the output files not empty?

@ecole41
Copy link
Author

ecole41 commented Feb 3, 2025

The version is 3.5.7.

Madgraph does run, I get plots after that follow expected distributions and I get HwU files produced. I've found that the WARNING: Compilation of the Subprocesses failed only shows after I change lhapdf = pdlabel in the run card, which you need for Pineappl to work.

@felixhekhorn
Copy link
Contributor

Mmm then I've no more ideas and we need help from someone else 🙃

The version is 3.5.7.

just to say: this may or may not be the same problem as in #13

@scarlehoff
Copy link
Member

@ramonpeter is the right person to ask. He was looking into upgrading the interface to the latest madgraph, I'm not sure what the status of that is.

But in any case, there are pinecards with TTB, does the problem persist if you use pinefarm as you run with this pinecard: https://github.com/NNPDF/pinecards/tree/master/CMS_TTB_13TEV_2L_TPT ?

@felixhekhorn felixhekhorn added the bug Something isn't working label Feb 4, 2025
@ramonpeter
Copy link
Member

ramonpeter commented Feb 5, 2025

Hi @ecole41 ,
interesting, I have not seen this before. Would you mind sharing your exact process and run cards so I can try to reproduce the error/warning myself? And could you share the full logfile madgraph generated? Also, on what system are you running (iOS, Linux,..)?

@felixhekhorn, the error mentioned in #13 is of a different kind and is linked to custom cuts being implemented from outside.
This is due to a changes in the cut functions on the MG5 side and misalignment with the patches Christopher wrote.
This is not fixed yet, but I this is an error occuring on run time, while the compilation error happens at an earlier stage.

@ecole41
Copy link
Author

ecole41 commented Feb 5, 2025

Hello,

I have now managed to get grids produced with some help. I believe that it was a complier issue and some editing to madgraph was needed in MG5_aMC_v3_5_7/Template/NLO/SubProcesses:

qcd / 2 -> (unsigned int) (qcd / 2)
qed / 2 -> (unsigned int) (qed / 2)

Let me know if it would be helpful to send over the installation instructions which worked for me.

Thanks

@scarlehoff
Copy link
Member

scarlehoff commented Feb 6, 2025

Thanks!

It would be very useful to add a "known issues" section to the Madgraph-pinefarm documentation indeed: https://pinefarm.readthedocs.io/en/latest/external/mg5.html which is here https://github.com/NNPDF/pinefarm/blob/main/docs/source/external/mg5.rst

@ramonpeter
Copy link
Member

Hi @ecole41 ,
yes, it would indeed be helpful to know what your solution was.

Thanks

@ecole41
Copy link
Author

ecole41 commented Feb 7, 2025

These are the instructions that I followed to get the grids produced on my laptop. If I remember correctly, I also had to install the pineapple-cli

How to "properly" install Madgraph & all its friends on macOS arm64

Install MG5_aMC_v3_5_7, LHAPDF, and pineappl on macOS arm64:

  1. Install conda

  2. Create the conda environment and install the needed packages with

conda create -n mg5 python=3.9 six -y
conda activate mg5

Note: do not install any C++ or Fortran compiler in the environment, it is not a good solution, but they are not suited for the job (WEIRD).

  1. Download and extract MG5_aMC_v3_5_7 with
wget https://launchpad.net/mg5amcnlo/3.0/3.6.x/+download/MG5_aMC_v3.5.7.tar.gz && tar -xf MG5_aMC_v3.5.7.tar.gz
  1. Let's do it fancy (credits to Luca Mantani):
mkdir -p $CONDA_PREFIX/etc/conda/activate.d && echo "alias mg5=<path-to-madgraph>" > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
mkdir -p $CONDA_PREFIX/etc/conda/deactivate.d && echo "unalias mg5" > $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
  1. Download and extract LHAPDF-6.5.4 with
wget https://lhapdf.hepforge.org/downloads/LHAPDF-6.5.4.tar.gz && tar -xf LHAPDF-6.5.4.tar.gz
  1. Install LHAPDF-6.5.4 with
cd LHAPDF-6.5.4
./configure --prefix=$CONDA_PREFIX --disable-python
make -j4
make install
  1. Download and install pineappl-capi with
mkdir pineappl_capi
curl --proto '=https' --tlsv1.2 -sSf https://nnpdf.github.io/pineappl/install-capi.sh | sh -s -- --prefix <user-defined-path>

where <user-defined-path> is the one chosen by the user, and it must be written the absolute path.

  1. Link this <user-defined-path> to /usr/local/lib with
sudo ln -s <user-defined-path>/lib/libpineappl_capi.0.8.7.dylib /usr/local/lib/libpineappl_capi.0.8.dylib
  1. Fix the errors in the pineappl_interface.cc code in MG5_aMC_v3_5_7/Template/NLO/SubProcesses (which obviously MG5 does not tell you)
qcd / 2 -> (unsigned int) (qcd / 2)
qed / 2 -> (unsigned int) (qed / 2)

@felixhekhorn
Copy link
Contributor

Thanks! I'd say this can go into a discussion here on the repo, so we can reference it

It would be very useful to add a "known issues" section to the Madgraph-pinefarm documentation indeed: https://pinefarm.readthedocs.io/en/latest/external/mg5.html which is here https://github.com/NNPDF/pinefarm/blob/main/docs/source/external/mg5.rst

also, as @scarlehoff said, we should add your point 8 (and only that) explicitly to our documentation (the other points are not directly related to the interface)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants