MacOsX 10.5.8 pythia sim not working

Asked by Arian Abrahantes

Hi there:

I have a macbook with Leopard 10.5.8. I have latest root version (5.30.3) and a previous (5.26.0b). I had to remake many of my programs to get them compiled with gcc 4.5.2 (full package so I had gcc,g++ and gfortran giving the same --version), both root included. I further set the environment variable FC to gfortran (so any module from madgraph is cmpiled with it)

I have installed the latest madgraph (v5.3.25), I ran the tutorial for process generation so this part works fine.

Then I tried to install pythia-pgs and ExRootAnalysis as is (source of both modules was downloaded from madgraph web site in the process). I tried to generate the events for the example of the tutorial and only making the pythia simulation (no pgs_run), but I get that pythia is unable to run and its log file finishes without any crash (pythia_card is the default one).

This is the event file list at the end,
-rw-r--r-- 1 arian staff 21226 Oct 27 10:40 run_01_banner.txt
-rw-r--r-- 1 arian staff 43 Oct 27 10:40 run_01_beforeveto.tree.gz
-rw-r--r-- 1 arian staff 2058340 Oct 27 10:40 run_01_events.lhe.gz
-rw-r--r-- 1 arian staff 125 Oct 27 10:40 run_01_events.tree.gz
-rw-r--r-- 1 arian staff 990280 Oct 27 10:40 run_01_unweighted_events.lhe.gz
-rw-r--r-- 1 arian staff 2046218 Oct 27 10:40 run_01_unweighted_events.root
-rw-r--r-- 1 arian staff 63 Oct 27 10:40 run_01_xsecs.tree

Apparently there is no error at compiltion. I compiled after set the LIBS2 change on the makefile as recommended pgs in Readme.MacOS) but nochnages.

I tried compilation with both ROOT versions, apparently pythia fails to load the partonic events generated.

I had a second machine with Ubuntu 10.4 where i succeeded on the whole process without any problem so this is something related to mac.

Feel free for asking any other information,

thnaks in advance,

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Johan Alwall (johan-alwall) said :
#1

Hello Arian,

So the pythia-pgs package compiles without any problem? In that case the problem must be during run time. Did you run on the Standard model example, or on the MSSM one? The default MG5 mssm model has a parameter card that is not compatible with Pythia (this will be fixed very soon in a future version), so in order to run Pythia on mssm generations, you need to use
import model_v4 mssm
I have never seen a problem while running on an SM process, so if this is the case, please attach your pythia log here. You can also try running the following set of commands (from the Events directory):
gunzip -c run_01_unweighted_events.lhe.gz > unweighted_events.lhe
export pydir=../../pythia-pgs/src
export PDG_MASS_TBL=$pydir/mass_width_2004.mc
$pydir/pythia

and let us know what happens.

All the best,
Johan

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

Hi,

The other possibilities (it happens to me time to time) is that the LHAPDF library which is load is not the correct one.
If this is the case, you will see in the pythia.log a error message that he didn't found the LHAPDF set (or a similar error).

If this is the case, you should remplace all the "liblhapdf" workd of the pythia-pgs package by "liblhapdflocal".
This should fix the problem.

Cheers,

Olivier

Revision history for this message
Arian Abrahantes (arian-abrahantes) said :
#3

Hi Johan and Oliver:

thanks for your replies, actually Oliver has a good point. At the beginning of the pythia.log (awkward place for an error ;-)) I found

 WRONG LHAPDF set number = 0 given! STOP EXE!

I did as suggested but no luck,

I also tried Johan idea and I got the same result on the screen

=====
nitializing PYR with random seed 23
     MSTP(52) changed from 1 to 2
 Found parameter ickkw 0
 before set_matching
 done with set_matching
     MSTP(98) changed from 0 to 1
 Done UPINIT
 ==== PYTHIA WILL USE LHAPDF ====
 WRONG LHAPDF set number = 0 given! STOP EXE!

=====

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

Hi,

Could you add a write statement in the file
./libraries/lhapdf/src/lhaglue.f

and check if the statement appear when you try to launch pythia.
If not, this means that you don't use the correct library.
Otherwise, this is not the same bug as mine.

Revision history for this message
Johan Alwall (johan-alwall) said :
#5

Hello Arian,
Could you attach your unweighted_events.lhe.gz file here so we can take a look and see if we can reproduce the error?

Thanks,
Johan

Revision history for this message
Arian Abrahantes (arian-abrahantes) said :
#6

Hi oliver:

Indeed I have another set of pdf installed, I didn't recall that. I make the change you suggested and it didn't showed on screen print. so libLHAPDF linked to pythia into MG it is not the one packaged with pythia-pgs. I am checking the configure logs of pythia-pgs configuration to check where this happened. and try to do the appropiate renaming you suggested. I will keep the question updated with the results. Would it be possible to compile pythia-pgs against this(any) external PDF library, it is not my case but people working with pdf itself would find it useful.

best regards,

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

Hi,

> I will keep the question updated with the results.

Thanks in advance for that, if this is indeed working, then we will
make this change in the official version.

> Would it
> be possible to compile pythia-pgs against this(any) external PDF
> library, it is not my case but people working with pdf itself would
> find
> it useful.

That's in fact a question for Johan.
Johan, did you modify this version of lhapdf or is it suppose to be
the standard one (but an old version?)

Cheers,

Olivier

On 28-oct.-11, at 23:55, Arian Abrahantes wrote:

> Question #176542 on MadGraph5 changed:
> https://answers.launchpad.net/madgraph5/+question/176542
>
> Status: Needs information => Open
>
> Arian Abrahantes gave more information on the question:
> Hi oliver:
>
> Indeed I have another set of pdf installed, I didn't recall that. I
> make
> the change you suggested and it didn't showed on screen print. so
> libLHAPDF linked to pythia into MG it is not the one packaged with
> pythia-pgs. I am checking the configure logs of pythia-pgs
> configuration
> to check where this happened. and try to do the appropiate renaming
> you
> suggested. I will keep the question updated with the results. Would it
> be possible to compile pythia-pgs against this(any) external PDF
> library, it is not my case but people working with pdf itself would
> find
> it useful.
>
> best regards,
>
> --
> You received this question notification because you are a member of
> MadTeam, which is an answer contact for MadGraph5.

Revision history for this message
Johan Alwall (johan-alwall) said :
#8

> Johan, did you modify this version of lhapdf or is it suppose to be
> the standard one (but an old version?)

It's the standard one as far as I know, but a (very) old version. We plan at some point to move to Pythia 8, and at that point, it would be natural to also move to the latest version of LHAPDF.

I'm sure, if you prefer to use your pre-installed LHAPDF, that you just need some minor modification to the calls. Please feel free to experiment and let us know what you find!

Best,
Johan

Revision history for this message
Arian Abrahantes (arian-abrahantes) said :
#9

Hi Oliver and Johan

The very first answer from Oliver solved the issue and I am checking it after this post is sent. I believe the reason of all this comes from the way libraries are searched and system library path prevails over local when invoking "-lLHAPDF" in compilation of pythia executable.

I checked compilation logs from my ubuntu machine and my mac, they look exactly the same and I can not figure out from those logs where the call to the external PDF is slip into compilation.

I am not able to solve the intrinsic issue however I am posting a short script (copy-paste into file shell script what's betwwn the ####), resuming Oliver's reply, that might help others to overcome this issue, which at the end is not a Mac problem and may arise in other platforms. I untarred original code of pythia-pgs package and run this script and run the tutorial swiftly until the LHC Olympics. Thanks a lot to those who replied

best regards and keep the great work,

#######################

#if you have installed a PDF set in your machine run this into pythia-src folder
#apply changes to PDF makefiles. Rename libraries to be compiled (suggested by Oliver Mattlelaer)

sed 's/libLHAPDF\.a/libLHAPDFlocal\.a/' libraries/lhapdf/src/Makefile.in > libraries/lhapdf/src/Makefile.in.changed
mv libraries/lhapdf/src/Makefile.in libraries/lhapdf/src/Makefile.in.original
cp libraries/lhapdf/src/Makefile.in.changed libraries/lhapdf/src/Makefile.in

sed 's/libLHAPDF\.a/libLHAPDFlocal\.a/' libraries/lhapdf/src/Makefile.am > libraries/lhapdf/src/Makefile.am.changed
mv libraries/lhapdf/src/Makefile.am libraries/lhapdf/src/Makefile.am.original
cp libraries/lhapdf/src/Makefile.am.changed libraries/lhapdf/src/Makefile.am

#link pythia to these libraries
sed 's/libLHAPDF/libLHAPDFlocal/' src/makefile > src/makefile.changed
sed 's/lLHAPDF/lLHAPDFlocal/' src/makefile.changed > src/makefile.changed.1
mv src/makefile src/makefile.original
cp src/makefile.changed.1 src/makefile
#do sme cleaning
rm src/makefile.changed; mv src/makefile.changed.1 src/makefile.changed

#######################

Revision history for this message
Arian Abrahantes (arian-abrahantes) said :
#10

Thanks Olivier Mattelaer, that solved my question.

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

Thanks a lot, for this script.

This is very helpful.

Thanks,

Olivier

On 31-oct.-11, at 03:41, Arian Abrahantes wrote:

> Question #176542 on MadGraph5 changed:
> https://answers.launchpad.net/madgraph5/+question/176542
>
> Status: Answered => Solved
>
> Arian Abrahantes confirmed that the question is solved:
> Hi Oliver and Johan
>
> The very first answer from Oliver solved the issue and I am checking
> it
> after this post is sent. I believe the reason of all this comes from
> the
> way libraries are searched and system library path prevails over local
> when invoking "-lLHAPDF" in compilation of pythia executable.
>
> I checked compilation logs from my ubuntu machine and my mac, they
> look
> exactly the same and I can not figure out from those logs where the
> call
> to the external PDF is slip into compilation.
>
> I am not able to solve the intrinsic issue however I am posting a
> short
> script (copy-paste into file shell script what's betwwn the ####),
> resuming Oliver's reply, that might help others to overcome this
> issue,
> which at the end is not a Mac problem and may arise in other
> platforms.
> I untarred original code of pythia-pgs package and run this script and
> run the tutorial swiftly until the LHC Olympics. Thanks a lot to those
> who replied
>
> best regards and keep the great work,
>
> #######################
>
> #if you have installed a PDF set in your machine run this into
> pythia-src folder
> #apply changes to PDF makefiles. Rename libraries to be compiled
> (suggested by Oliver Mattlelaer)
>
> sed 's/libLHAPDF\.a/libLHAPDFlocal\.a/' libraries/lhapdf/src/
> Makefile.in > libraries/lhapdf/src/Makefile.in.changed
> mv libraries/lhapdf/src/Makefile.in libraries/lhapdf/src/
> Makefile.in.original
> cp libraries/lhapdf/src/Makefile.in.changed libraries/lhapdf/src/
> Makefile.in
>
> sed 's/libLHAPDF\.a/libLHAPDFlocal\.a/' libraries/lhapdf/src/
> Makefile.am > libraries/lhapdf/src/Makefile.am.changed
> mv libraries/lhapdf/src/Makefile.am libraries/lhapdf/src/
> Makefile.am.original
> cp libraries/lhapdf/src/Makefile.am.changed libraries/lhapdf/src/
> Makefile.am
>
> #link pythia to these libraries
> sed 's/libLHAPDF/libLHAPDFlocal/' src/makefile > src/makefile.changed
> sed 's/lLHAPDF/lLHAPDFlocal/' src/makefile.changed > src/
> makefile.changed.1
> mv src/makefile src/makefile.original
> cp src/makefile.changed.1 src/makefile
> #do sme cleaning
> rm src/makefile.changed; mv src/makefile.changed.1 src/
> makefile.changed
>
>
> #######################
>
> --
> You received this question notification because you are a member of
> MadTeam, which is an answer contact for MadGraph5.