Running pythia8 in madgraph nlo mode

Asked by Sayan Dasgupta

Hello,

I am trying to shower nlo events using pythia8 installed inside the madgraph interface. The following error is displayed.

INFO: Events generated
reweight -from_cards
decay_events -from_cards
INFO: Preparing MCatNLO run
INFO: Compiling MCatNLO for PYTHIA8...
 USING PYTHIA 8, version >= 8.200
g++ -O -I/home/sayan/MG5_aMC_v2_5_3/HEPTools/pythia8/include \
  -I/home/sayan/MG5_aMC_v2_5_3/ttnlocheck/MCatNLO/include Pythia82.cc -o Pythia8.exe \
  -L/home/sayan/MG5_aMC_v2_5_3/HEPTools/pythia8/lib -lpythia8 \
  -I/home/sayan/MG5_aMC_v2_5_3/HEPTools/hepmc/include -L/home/sayan/MG5_aMC_v2_5_3/HEPTools/hepmc/lib -lHepMC -L../lib -L/home/sayan/MG5_aMC_v2_5_3/HEPTools/pythia8//lib -L/home/sayan/MG5_aMC_v2_5_3/HEPTools/boost/lib -L/home/sayan/MG5_aMC_v2_5_3/HEPTools/zlib/lib -lpythia8 -lboost_iostreams -lz -ldl -lstdc++ \

/usr/bin/ld: cannot find -lboost_iostreams
collect2: error: ld returned 1 exit status
Makefile:49: recipe for target 'Pythia82' failed
make: *** [Pythia82] Error 1
Pythia8 compilation did not succeed, exiting

Can I please get a solution?

Thanks in advance.

Question information

Language:
English Edit question
Status:
Expired
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

Hi

Sorry to look at this only now.
On which os are your running?
As far as i have looked, the problem is related to your OS where boost decide to not create that specific library at install time.

It is probably since you do not need it, but I need to create a VM with your exact OS in order to try to reproduce this and investigate who decide to add that line "-lboost_iostreams" inside the makefile (I'm worry that this is a decision of pythia8 and that I can not do anything about it, except complain to py8 autor)

Cheers,

Olivier

Revision history for this message
Sayan Dasgupta (sayandg) said :
#3

Hi Olivier,

I am working in an Ubuntu machine. Can you please check?

Thank you.

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

Can you be more specific (which version of Ubuntu)

Olivier

Revision history for this message
Sayan Dasgupta (sayandg) said :
#5

Ubuntu 16.04

On Wed, 31 Oct 2018, 14:42 Olivier Mattelaer, <
<email address hidden>> wrote:

> Your question #674984 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/674984
>
> Status: Open => Answered
>
> Olivier Mattelaer proposed the following answer:
> Can you be more specific (which version of Ubuntu)
>
> Olivier
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/mg5amcnlo/+question/674984/+confirm?answer_id=3
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/mg5amcnlo/+question/674984
>
> You received this question notification because you asked the question.
>

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

Thanks,

I'm lucky I have installed such VM recently for a lecture that I'm giving this afternoon.
I do not want to mess with this VM before my lecture, so I will take a look tomorow (or tonight)

vagrant@vagrant:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Cheers,

Olivier

Revision history for this message
Sayan Dasgupta (sayandg) said :
#7

Ok thanks Olivier.

On Wed, 31 Oct 2018, 14:57 Olivier Mattelaer, <
<email address hidden>> wrote:

> Your question #674984 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/674984
>
> Olivier Mattelaer posted a new comment:
> Thanks,
>
> I'm lucky I have installed such VM recently for a lecture that I'm giving
> this afternoon.
> I do not want to mess with this VM before my lecture, so I will take a
> look tomorow (or tonight)
>
> vagrant@vagrant:~$ cat /etc/os-release
> NAME="Ubuntu"
> VERSION="16.04.3 LTS (Xenial Xerus)"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu 16.04.3 LTS"
> VERSION_ID="16.04"
> HOME_URL="http://www.ubuntu.com/"
> SUPPORT_URL="http://help.ubuntu.com/"
> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
> VERSION_CODENAME=xenial
> UBUNTU_CODENAME=xenial
>
> Cheers,
>
> Olivier
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

Hi,

Here is a work-around the pythia8 bug. It will be include in 2.6.5 (but if py8 author corrects that bug themself)

Cheers,

Olivier

=== modified file 'madgraph/interface/common_run_interface.py'
--- madgraph/interface/common_run_interface.py 2018-11-15 22:48:20 +0000
+++ madgraph/interface/common_run_interface.py 2018-11-16 13:25:13 +0000
@@ -5808,15 +5846,21 @@
                 supports_HEPMCHACK = '-DHEPMC2HACK' in stdout

                 #3. ensure that those flag are in the shower card
- for l in libs:
- if l not in extralibs:
- modify_extralibs = True
- extralibs.append(l)
                 for L in paths:
                     if L not in extrapaths:
                         modify_extrapaths = True
                         extrapaths.append(L)
-
+ for l in libs:
+ if l == 'boost_iostreams':
+ #this one is problematic handles it.
+ for L in paths + extrapaths:
+ if misc.glob('*boost_iostreams*', L):
+ break
+ else:
+ continue
+ if l not in extralibs:
+ modify_extralibs = True
+ extralibs.append(l)
             # Apply the required modification
             if modify_extralibs:
                 if extralibs:

Revision history for this message
Mike Hance (mhance) said :
#10

Hi All,

I ran across the same issue in 2.6.4, and tried Olivier's fix... his patch didn't quite work for me, but the following block did, just in case others have the same problem:

                #3. ensure that those flag are in the shower card
                for l in libs:
                    if l == 'boost_iostreams':
                        for L in paths + extrapaths:
                            if misc.glob('*boost_iostreams*', L):
                                modify_extralibs = True
                                extralibs.append(l)
                            else:
                                continue
                    elif l not in extralibs:
                        modify_extralibs = True
                        extralibs.append(l)
                for L in paths:
                    if L not in extrapaths:
                        modify_extrapaths = True
                        extrapaths.append(L)

Cheers!

-Mike

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

Hi,

I have confirmed report of 10+ people that my patch was working (not including myself).
I guess that the issue is that patch formatting are not preserve by questions.
(you should have open a bug report since they can handle patch).
My guess is that you put the "else" statement at the wrong indentation.
You can find the correct one on this link:
https://bazaar.launchpad.net/~mg5core1/mg5amcnlo/2.6.5/revision/283

Cheers,

Olivier

On 4 Jan 2019, at 20:47, Mike Hance <<email address hidden><mailto:<email address hidden>>> wrote:

Question #674984 on MadGraph5_aMC@NLO changed:
https://answers.launchpad.net/mg5amcnlo/+question/674984

Mike Hance posted a new comment:
Hi All,

I ran across the same issue in 2.6.4, and tried Olivier's fix... his
patch didn't quite work for me, but the following block did, just in
case others have the same problem:

               #3. ensure that those flag are in the shower card
               for l in libs:
                   if l == 'boost_iostreams':
                       for L in paths + extrapaths:
                           if misc.glob('*boost_iostreams*', L):
                               modify_extralibs = True
                               extralibs.append(l)
                           else:
                               continue
                   elif l not in extralibs:
                       modify_extralibs = True
                       extralibs.append(l)
               for L in paths:
                   if L not in extrapaths:
                       modify_extrapaths = True
                       extrapaths.append(L)

Cheers!

-Mike

--
You received this question notification because you are an answer
contact for MadGraph5_aMC@NLO.

Revision history for this message
Mike Hance (mhance) said :
#12

Hi Olivier,

The patch was indeed difficult to parse in this launchpad thread, and I didn't see a link to an actual diff, so you're probably right that my indentation was wrong. Since I assumed you had this solved in code somewhere, I wasn't intending to open a bug report, just give others some insight into what might still be failing if they had the same problems I did.

Best wishes,

-Mike