Thanks Benj for the explanation and Liang for the help.
So in attachment you will find the patch which solves such problem.
Thanks,
Olivier
=== modified file 'madgraph/interface/common_run_interface.py'
--- madgraph/interface/common_run_interface.py 2017-04-28 12:41:49 +0000
+++ madgraph/interface/common_run_interface.py 2017-05-12 23:16:08 +0000
@@ -2672,9 +2672,15 @@
else: target = pjoin(self.me_dir,'MA5_%s_ANALYSIS_%s'\ %(mode.upper(),MA5_runtag),'PDF','main.pdf')
+
if not os.path.isfile(target):
- raise MadGraph5Error, "MadAnalysis5 failed to produced "+\
+ target = pjoin(self.me_dir,'MA5_%s_ANALYSIS_%s'\
+ %(mode.upper(),MA5_runtag),'HTML','index.html')
+ if MA5_runtag.upper()=='RECASTING' or not os.path.isfile(target):
+ raise MadGraph5Error, "MadAnalysis5 failed to produced "+\ "an output for the analysis '%s' in\n %s"%(MA5_runtag,target)
+ else:
+ target = None
# Copy the PDF report or CLs in the Events/run directory.
if MA5_runtag.upper()=='RECASTING':
@@ -2682,7 +2688,8 @@
else: carboncopy_name = '%s_MA5_%s_analysis_%s.pdf'%( self.run_tag,mode,MA5_runtag)
- shutil.copy(target, pjoin(self.me_dir,'Events',self.run_name,carboncopy_name))
+ if target:
+ shutil.copy(target, pjoin(self.me_dir,'Events',self.run_name,carboncopy_name))
if MA5_runtag!='default': logger.info("MadAnalysis5 successfully completed the "+ "%s. Reported results are placed in:"%("analysis '%s'"%MA5_runtag
Thanks Benj for the explanation and Liang for the help.
So in attachment you will find the patch which solves such problem.
Thanks,
Olivier
=== modified file 'madgraph/ interface/ common_ run_interface. py' interface/ common_ run_interface. py 2017-04-28 12:41:49 +0000 interface/ common_ run_interface. py 2017-05-12 23:16:08 +0000
target = pjoin(self. me_dir, 'MA5_%s_ ANALYSIS_ %s'\
%(mode. upper() ,MA5_runtag) ,'PDF', 'main.pdf' ) isfile( target) : me_dir, 'MA5_%s_ ANALYSIS_ %s'\ upper() ,MA5_runtag) ,'HTML' ,'index. html') upper() =='RECASTING' or not os.path. isfile( target) :
"an output for the analysis '%s' in\n %s"%(MA5_ runtag, target)
--- madgraph/
+++ madgraph/
@@ -2672,9 +2672,15 @@
else:
+
if not os.path.
- raise MadGraph5Error, "MadAnalysis5 failed to produced "+\
+ target = pjoin(self.
+ %(mode.
+ if MA5_runtag.
+ raise MadGraph5Error, "MadAnalysis5 failed to produced "+\
+ else:
+ target = None
# Copy the PDF report or CLs in the Events/run directory. upper() =='RECASTING' :
carboncopy_ name = '%s_MA5_ %s_analysis_ %s.pdf' %(
self. run_tag, mode,MA5_ runtag) me_dir, 'Events' ,self.run_ name,carboncopy _name)) me_dir, 'Events' ,self.run_ name,carboncopy _name)) ='default' :
logger. info("MadAnalys is5 successfully completed the "+
"% s. Reported results are placed in:"%("analysis '%s'"%MA5_runtag
if MA5_runtag.
@@ -2682,7 +2688,8 @@
else:
- shutil.copy(target, pjoin(self.
+ if target:
+ shutil.copy(target, pjoin(self.
if MA5_runtag!