Pythia8 Showering not working correctly

Asked by Sarah

Hi everyone,
I recently switched from Pythia6 to Pythia8, and it won't seem to run with aMC@NLO. I have correctly installed Pythia8, LHAPDF, and HEPMC. I have also correctly linked Pythia8 to both my HEPMC and LHAPDF installations. I have also specified the proper paths to everything in my input/mg5_configuration.txt file.

Unfortunately, every time I try to shower an event file, like so:

./bin/shower run_01

I get the error:

INFO: Compiling MCatNLO for PYTHIA8...
/nv/blue/sarah/private/MG5_aMC_v2_3_0/Pythia8_Hepmc/pythia8210/lib/libpythia8.a(PartonDistributions.o): In function `Pythia8::LHAPDF::symbol(std::string)':
PartonDistributions.cc:(.text+0xe710): undefined reference to `dlerror'
PartonDistributions.cc:(.text+0xe71c): undefined reference to `dlsym'
PartonDistributions.cc:(.text+0xe724): undefined reference to `dlerror'
PartonDistributions.cc:(.text+0xe7d2): undefined reference to `dlerror'
PartonDistributions.cc:(.text+0xPythia8 compilation did not succeed, exiting
Distributions.cc:(.text+0xe805): undefined reference to `dlerror'
/nv/blue/sarah/private/MG5_aMC_v2_3_0/Pythia8_Hepmc/pythia8210/lib/libpythia8.a(PartonDistributions.o): In function `Pythia8::LHAPDF::~LHAPDF()':
PartonDistributions.cc:(.text+0xfb3a): undefined reference to `dlclose'
PartonDistributions.cc:(.text+0xfb41): undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
make: *** [Pythia82] Error 1

Does anyone know what could be happening?

Thanks,Sarah

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
Paolo Torrielli Edit question
Solved by:
marco zaro
Solved:
Last query:
Last reply:
Revision history for this message
Paolo Torrielli (paolo-torrielli) said :
#1

Hi Sarah,

this problem is fixed by setting

EXTRALIBS = dl

in shower_card.dat.
In the next releases of MG5_aMC the code will do this automatically
when using Pythia82xx.

Cheers.
Paolo

Revision history for this message
Sarah (sj1992xy) said :
#2

Hi Paolo,

Thank you so much for your response! This worked perfectly, although now there's a new error. I'm sure this is a simple fix, but I'm new to this and I'm not quite sure how the fine details work. So now when I try to shower I get this error:

INFO: Showering events...
INFO: (Running in /sfs/lustre/scratch/sarah/TTBB/MCatNLO/RUN_PYTHIA8_1)
INFO: Idle: 1, Running: 0, Completed: 0 [ current time: 19h39 ]
mv: cannot stat `Pythia8.hep': No such file or directory
gzip: events.hepmc: No such file or directory
INFO: Idle: 0, Running: 0, Completed: 1 [ 0.038s ]
INFO: Idle: 0, Running: 0, Completed: 0 [ current time: 19h39 ]
Command "shower run_01" interrupted with error:
IOError : [Errno 2] No such file or directory: '/sfs/lustre/scratch/sarah/TTBB/MCatNLO/RUN_PYTHIA8_1/events.hepmc.gz'

Any idea how I would get these "Pythia8.hep" and "events.hepmc" files? All I got when running the event generation (pre-shower) was an "events.lhe" file in the directory Events/run_01/.

Thanks again,
Sarah

Revision history for this message
Paolo Torrielli (paolo-torrielli) said :
#3

Hi Sarah,

> INFO: Showering events...
> INFO: (Running in /sfs/lustre/scratch/sarah/TTBB/MCatNLO/RUN_PYTHIA8_1)
> INFO: Idle: 1, Running: 0, Completed: 0 [ current time: 19h39 ]
> mv: cannot stat `Pythia8.hep': No such file or directory
> gzip: events.hepmc: No such file or directory
> INFO: Idle: 0, Running: 0, Completed: 1 [ 0.038s ]
> INFO: Idle: 0, Running: 0, Completed: 0 [ current time: 19h39 ]
> Command "shower run_01" interrupted with error:
> IOError : [Errno 2] No such file or directory: '/sfs/lustre/scratch/sarah/TTBB/MCatNLO/RUN_PYTHIA8_1/events.hepmc.gz’

> Any idea how I would get these "Pythia8.hep" and "events.hepmc" files?
> All I got when running the event generation (pre-shower) was an
> "events.lhe" file in the directory Events/run_01/.

The ‘events.lhe’ file is all you need, and the ‘.hepmc’ should be the output.
Something must have gone wrong at the beginning of the shower phase.
Could you please go in MCatNLO/RUN_PYTHIA8_1 and check the file mcatnlo_run.log?
This is the event record, which should say something about the source of
the error. It would be useful if you could also paste the file in your next
post.

Could you also try and see if you get the same error when using an ‘internal’
fortran (i.e. non HepMC) analysis? This is done by setting for example

ANALYSE = py8an_HwU_rates.o HwU.o

in the shower card.

Let me know.
Cheers.
Paolo

Revision history for this message
Sarah (sj1992xy) said :
#4

Hi Paolo,

So I checked the contents of mcatnlo_run.log and this was all that was there:

./Pythia8.exe: error while loading shared libraries: libHepMC.so.4: cannot open shared object file: No such file or directory

Similarly, I ran using an 'internal' fortran analysis as you suggested, and got the new error:
ReadError : empty header

However the results of mcantnlo_run.log was the same as above:
./Pythia8.exe: error while loading shared libraries: libHepMC.so.4: cannot open shared object file: No such file or directory

So I checked my installation of HEPMC, and there is indeed a copy of libHepMC.so.4 in there. Any idea how I could get aMC@NLO to recognize that?

Thanks,
Sarah

Revision history for this message
Paolo Torrielli (paolo-torrielli) said :
#5

Hi Sarah,
this error is a bit strange to me.

Could you confirm that when installing Pythia8 you specified the hepmc path
through the option —with-hepmc2 = <path/to/hepmc2> ?

I’ll think more about this and discuss in the group to get an answer.

Cheers.
Paolo

On 15 Sep 2015, at 16:37, Sarah <email address hidden> wrote:

> Question #271396 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/271396
>
> Status: Answered => Open
>
> Sarah is still having a problem:
> Hi Paolo,
>
> So I checked the contents of mcatnlo_run.log and this was all that was
> there:
>
> ./Pythia8.exe: error while loading shared libraries: libHepMC.so.4:
> cannot open shared object file: No such file or directory
>
>
> Similarly, I ran using an 'internal' fortran analysis as you suggested, and got the new error:
> ReadError : empty header
>
> However the results of mcantnlo_run.log was the same as above:
> ./Pythia8.exe: error while loading shared libraries: libHepMC.so.4: cannot open shared object file: No such file or directory
>
> So I checked my installation of HEPMC, and there is indeed a copy of
> libHepMC.so.4 in there. Any idea how I could get aMC@NLO to recognize
> that?
>
> Thanks,
> Sarah
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
Sarah (sj1992xy) said :
#6

Hi Paolo,

Yes I believe I did. when running ./configure, I used the following options:

./configure --with-hepmc2=/nv/blue/sarah/private/MG5_aMC_v2_3_0/Pythia8_Hepmc/install/ --with-lhapdf6=/nv/blue/sarah/private/MG5_aMC_v2_3_0/LHAPDF-6.1.5
make

And now inside pythia8/bin, running the commands ./pythia8-config --with-hepmc2 and ./pythia8-config --with-lhapdf6 both give values of "true"

Thanks for your help,
Sarah

Revision history for this message
Paolo Torrielli (paolo-torrielli) said :
#7

Hi Sarah,
could you try and see if it works by exporting the path to hepmc libraries and executables
in your ~/.bash_profile (or ~/.bashrc) file?

Like the following
export PATH=$PATH:path/to/hepmc/installation/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path/to/hepmc/installation/lib

You will have to source that ~/.bash_profile file (or to open a new terminal) for the changes
to be applied (to be sure you can also echo $PATH afterwards).

In addition, could you try and run one of the Pythia8 template programs in order to check
whether the Pythia8-to-HepMC interface is operational in your installation? For example,
examples/main41.cc or similar should test this.

Let me know..
Cheers.
Paolo

On 15 Sep 2015, at 19:37, Sarah <email address hidden> wrote:

> Question #271396 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/271396
>
> Status: Answered => Open
>
> Sarah is still having a problem:
> Hi Paolo,
>
> Yes I believe I did. when running ./configure, I used the following
> options:
>
> ./configure --with-hepmc2=/nv/blue/sarah/private/MG5_aMC_v2_3_0/Pythia8_Hepmc/install/ --with-lhapdf6=/nv/blue/sarah/private/MG5_aMC_v2_3_0/LHAPDF-6.1.5
> make
>
> And now inside pythia8/bin, running the commands ./pythia8-config
> --with-hepmc2 and ./pythia8-config --with-lhapdf6 both give values of
> "true"
>
> Thanks for your help,
> Sarah
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
Sarah (sj1992xy) said :
#8

Hi Paolo,

So I tried doing what you said and (maybe?) I found what could be causing the issue? I've looked through all of my HEPMC directories, and none of them seem to have a bin/ directory in them. I'm not sure why it wasn't installed with this? All that is in my installation folder is include, lib, and share.

I also tried running some of the example programs, and they all seemed to run fine, despite some smaller warnings (ie "Warning in Pythia::check: not quite matched particle energy/momentum/mass", "Warning in SLHAinterface::initSLHA: empty DECAY table", etc.)

Anyway, I tried exporting just the lib directory, and it wouldn't even let ./shower run ("File "/sfs/lustre/scratch/sarah/TTBB_LesHouches/TTBB_LesHouches_1/bin/internal/amcatnlo_run_interface.py", line 105
    raise aMCatNLOError, 'not correct number of argument'")

Any idea why my hepmc wouldn't have a bin directory?

Thanks,
Sarah

Revision history for this message
Paolo Torrielli (paolo-torrielli) said :
#9

Hi Sarah,

> So I tried doing what you said and (maybe?) I found what could be
> causing the issue? I've looked through all of my HEPMC directories, and
> none of them seem to have a bin/ directory in them. I'm not sure why it
> wasn't installed with this? All that is in my installation folder is
> include, lib, and share.
I’m sorry, I was inaccurate in my latest post: there is no bin directory
in the HepMC installation indeed, so it is fine.

> I also tried running some of the example programs, and they all seemed
> to run fine, despite some smaller warnings (ie "Warning in
> Pythia::check: not quite matched particle energy/momentum/mass",
> "Warning in SLHAinterface::initSLHA: empty DECAY table", etc.)
OK, then your Pythia8-to-Hepmc works fine.

> Anyway, I tried exporting just the lib directory, and it wouldn't even let ./shower run ("File "/sfs/lustre/scratch/sarah/TTBB_LesHouches/TTBB_LesHouches_1/bin/internal/amcatnlo_run_interface.py", line 105
> raise aMCatNLOError, 'not correct number of argument'")
This is weird: is ‘run’ an existing subfolder of Events?
You meant ./bin/shower right?

I’ll think more about your problem and ask around.
Cheers.
Paolo

Revision history for this message
Sarah (sj1992xy) said :
#10

Hi Paolo,

Yes, I'm showering run_03 which is an existing subdirectory in Events. It has an events.lhe file in it (not tarred - aMC@NLO quit due to Pythia errors before the tarring process began: Although I don't think this should be a problem, should it?).

And also yes, I did mean ./bin/shower, sorry.

Anyway, that would be great, thank you so much for your help; I really appreciate it.

Thanks,
Sarah

Revision history for this message
Best marco zaro (marco-zaro) said :
#11

Hi Sarah,
can you please add the
/path/to/hepmc/lib
to extrapath in the shower_card?

That should normally help...
Let us know...

Marco

Revision history for this message
Sarah (sj1992xy) said :
#12

Hi Marco,

I changed extra path to the hepmc lib, and it worked perfectly! Thank you so much to both of you for all of your help. I really appreciate it!

Cheers,
Sarah

Revision history for this message
Sarah (sj1992xy) said :
#13

Thanks marco zaro, that solved my question.