Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Sherpa Team
sherpa
Commits
8a6481d6
Commit
8a6481d6
authored
Oct 20, 2013
by
Stefan Hoeche
Browse files
improved memleak detection, set warning threshold to 16MB
parent
946f724a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
ATOOLS/Org/Run_Parameter.C
ATOOLS/Org/Run_Parameter.C
+1
-1
PHASIC++/Main/Phase_Space_Integrator.C
PHASIC++/Main/Phase_Space_Integrator.C
+2
-2
SHERPA/Single_Events/Event_Handler.C
SHERPA/Single_Events/Event_Handler.C
+2
-2
No files found.
ATOOLS/Org/Run_Parameter.C
View file @
8a6481d6
...
...
@@ -276,7 +276,7 @@ void Run_Parameter::Init(std::string path,std::string file,int argc,char* argv[]
gen
.
SetVariable
(
"RNG_SEED"
,
ToString
(
gen
.
m_seeds
[
0
])
+
seedstr
);
gen
.
SetVariable
(
"MEMLEAK_WARNING_THRESHOLD"
,
ToString
(
dr
.
GetValue
<
int
>
(
"MEMLEAK_WARNING_THRESHOLD"
,
1
<<
2
0
)));
ToString
(
dr
.
GetValue
<
int
>
(
"MEMLEAK_WARNING_THRESHOLD"
,
1
<<
2
4
)));
gen
.
m_timeout
=
dr
.
GetValue
<
double
>
(
"TIMEOUT"
,
std
::
numeric_limits
<
double
>::
max
());
if
(
gen
.
m_timeout
<
0
.)
gen
.
m_timeout
=
0
.;
rpa
->
gen
.
m_timer
.
Start
();
...
...
PHASIC++/Main/Phase_Space_Integrator.C
View file @
8a6481d6
...
...
@@ -308,15 +308,15 @@ bool Phase_Space_Integrator::AddPoint(const double value)
<<
" left ) ["
<<
rpa
->
gen
.
Timer
().
StrFTime
(
"%H:%M:%S"
)
<<
"] "
<<
endl
;
#endif
size_t
currentrss
=
GetCurrentRSS
();
if
(
currentrss
-
lastrss
>
ToType
<
int
>
if
(
currentrss
>
lastrss
+
ToType
<
int
>
(
rpa
->
gen
.
Variable
(
"MEMLEAK_WARNING_THRESHOLD"
)))
{
msg_Error
()
<<
METHOD
<<
"() {
\n
"
<<
om
::
bold
<<
" Memory usage increased by "
<<
(
currentrss
-
lastrss
)
/
(
1
<<
20
)
<<
" MB,"
<<
" now "
<<
currentrss
/
(
1
<<
20
)
<<
" MB.
\n
"
<<
om
::
red
<<
" This might indicate a memory leak!
\n
"
<<
" Please monitor this process closely.
\n
"
<<
om
::
reset
<<
"}"
<<
std
::
endl
;
lastrss
=
currentrss
;
}
lastrss
=
currentrss
;
std
::
vector
<
double
>
stats
(
6
);
stats
[
0
]
=
psh
->
Process
()
->
TotalResult
()
*
rpa
->
Picobarn
();
stats
[
1
]
=
psh
->
Process
()
->
TotalVar
()
*
rpa
->
Picobarn
();
...
...
SHERPA/Single_Events/Event_Handler.C
View file @
8a6481d6
...
...
@@ -480,15 +480,15 @@ void Event_Handler::MPISync()
}
#endif
size_t
currentrss
=
GetCurrentRSS
();
if
(
currentrss
-
m_lastrss
>
ToType
<
int
>
if
(
currentrss
>
m_lastrss
+
ToType
<
int
>
(
rpa
->
gen
.
Variable
(
"MEMLEAK_WARNING_THRESHOLD"
)))
{
msg_Error
()
<<
METHOD
<<
"() {
\n
"
<<
om
::
bold
<<
" Memory usage increased by "
<<
(
currentrss
-
m_lastrss
)
/
(
1
<<
20
)
<<
" MB,"
<<
" now "
<<
currentrss
/
(
1
<<
20
)
<<
" MB.
\n
"
<<
om
::
red
<<
" This might indicate a memory leak!
\n
"
<<
" Please monitor this process closely.
\n
"
<<
om
::
reset
<<
"}"
<<
std
::
endl
;
m_lastrss
=
currentrss
;
}
m_lastrss
=
currentrss
;
}
double
Event_Handler
::
TotalXS
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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