Events not zipped even with .gz

Bug #1697656 reported by Stefan von Buddenbrock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Dear MG5_aMC@NLO team

I believe I have found a bug in the new version (2.5.5).

When I make events using the normal procedure (bin/generate_events), the resulting unweighted_events.lhe.gz is not zipped, even though it is given the .gz file extension. I mean, gunzip doesn't work, and I can already read the file using a text editor.

This happens when using an LCG environment on LX Plus, but not when I run on my MacBook Pro.

I have attached a sample p p > j j log file for inspection.

Cheers
Stefan

Revision history for this message
Stefan von Buddenbrock (stefvonb) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Stefan,

Thanks for pointing this to us. I have found a linux machine on which I reproduce the problem.
and here is the associate fix:

=== modified file 'madgraph/various/lhe_parser.py'
--- madgraph/various/lhe_parser.py 2017-05-03 09:21:01 +0000
+++ madgraph/various/lhe_parser.py 2017-06-15 12:06:35 +0000
@@ -174,6 +174,10 @@
     def __init__(self, path, mode='r', *args, **opt):
         """open file and read the banner [if in read mode]"""

+ if path.endswith('.gz') and mode == 'w' and\
+ isinstance(self, EventFileNoGzip):
+ path = path[:-3]
+
         self.parsing = True # check if/when we need to parse the event.
         self.eventgroup = False
         try:

Thanks,

Olivier

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.