Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
7a1bcf3b
Commit
7a1bcf3b
authored
Sep 03, 2020
by
Ewelina Maria Lobodzinska
Browse files
Merge branch '21.6_LogFileDumping' into '21.6'
Improving log dumping for MadGraphControl See merge request
atlas/athena!36131
parents
e19e2d4f
a6a5a12e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Generators/MadGraphControl/python/MadGraphUtils.py
View file @
7a1bcf3b
...
...
@@ -51,6 +51,7 @@ def error_check(errors):
if
not
MADGRAPH_CATCH_ERRORS
:
return
unmasked_error
=
False
my_debug_file
=
None
if
len
(
errors
):
mglog
.
info
(
'Some errors detected by MadGraphControl - checking for serious errors'
)
for
err
in
errors
.
split
(
'
\n
'
):
...
...
@@ -78,20 +79,23 @@ def error_check(errors):
# https://answers.launchpad.net/mg5amcnlo/+question/690004
mglog
.
info
(
err
)
continue
if
'More information is found in'
in
err
:
my_debug_file
=
err
.
split
(
"'"
)[
1
]
if
err
.
startswith
(
'tar'
):
mglog
.
info
(
err
)
continue
mglog
.
error
(
err
)
unmasked_error
=
True
# This is a bit clunky, but needed because we could be several places when we get here
my_debug_file
=
None
debug_files
=
glob
.
glob
(
'*debug.log'
)
+
glob
.
glob
(
'*/*debug.log'
)
for
debug_file
in
debug_files
:
# This protects against somebody piping their output to my_debug.log and it being caught here
has_subproc
=
os
.
access
(
os
.
path
.
dirname
(
debug_file
)
+
'/SubProcesses'
,
os
.
R_OK
)
if
has_subproc
:
my_debug_file
=
debug_file
break
if
my_debug_file
is
None
:
debug_files
=
glob
.
glob
(
'*debug.log'
)
+
glob
.
glob
(
'*/*debug.log'
)
for
debug_file
in
debug_files
:
# This protects against somebody piping their output to my_debug.log and it being caught here
has_subproc
=
os
.
access
(
os
.
path
.
dirname
(
debug_file
)
+
'/SubProcesses'
,
os
.
R_OK
)
if
has_subproc
:
my_debug_file
=
debug_file
break
if
my_debug_file
is
not
None
:
if
not
unmasked_error
:
mglog
.
warning
(
'Found a debug file at '
+
my_debug_file
+
' but no apparent error. Will terminate.'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment