Comment 11 for bug 1218842

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1218842] STDHEP files larger than 4GB are corrupted

Excellent :-)

I will push this fix thanks so so much.

Olivier
On Nov 28, 2013, at 1:06 PM, Pavel Demin <email address hidden> wrote:

> As a fast fix, I've replaced xdr_getpos/xdr_setpos with ftello/fseeko in
> some of the mcfio files and set the type of the position variables to
> off_t.
>
> Now I can generate a 5GB STDHEP file and it does not get corrupted.
>
> Here is a list of modified files in pythia-pgs/libraries/PGS4/src
> /stdhep-dir/mcfio/src:
>
> mcfio_Block.c
> mcfio_Direct.c
> mcfio_Util1.c
> mcf_NTuIOFiles.c
> mcf_xdr.h
>
> You can install the modified files with the following commands:
>
> cd pythia-pgs/libraries/PGS4/src/stdhep-dir/mcfio/src
> wget http://cp3.irmp.ucl.ac.be/downloads/pythia-pgs-mcfio-files.tgz
> tar -vzxf pythia-pgs-mcfio-files.tgz
>
> Could you, please commit these modifications to the pythia-pgs
> repository?
>
> --
> You received this bug notification because you are a member of MadTeam,
> which is subscribed to MadGraph5.
> https://bugs.launchpad.net/bugs/1218842
>
> Title:
> STDHEP files larger than 4GB are corrupted
>
> Status in The MadGraph Matrix Element Generator version 5:
> Confirmed
>
> Bug description:
> I've just tested several STDHEP files produced by MG+HERWIG6.
>
> I've tested 50MB, 3.3GB and 4.0GB files.
>
> The 50MB and 3.3GB files can be read without any problem.
>
> The 4.0GB file can't be read.
>
> In the 4.0GB file, already the 2nd block has a block ID number equal
> 2. Normally, it should be 4 (Event Header). The following blocks have
> completely wrong block ID numbers. So, I'd say that it's corrupted
> from the very beginning.
>
> In some cases, adding the following compilation flag helps:
>
> -D_FILE_OFFSET_BITS=64
>
> Normally, the STDHEP library and maybe the PYTHIA and HERWIG
> interfaces should be compiled with this flag.
>
> If you can tell me where to put this flag, I can redo the test.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/madgraph5/+bug/1218842/+subscriptions