mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hadrons: more scheduler optimizations
This commit is contained in:
parent
d604580e5a
commit
29dfe99e7c
@ -316,20 +316,29 @@ unsigned int Environment::executeProgram(const std::vector<unsigned int> &p)
|
|||||||
for (unsigned int i = 0; i < p.size(); ++i)
|
for (unsigned int i = 0; i < p.size(); ++i)
|
||||||
{
|
{
|
||||||
// execute module
|
// execute module
|
||||||
LOG(Message) << SEP << " Measurement step " << i+1 << "/"
|
if (!isDryRun())
|
||||||
<< p.size() << " (module '" << moduleName_[p[i]] << "') "
|
{
|
||||||
<< SEP << std::endl;
|
LOG(Message) << SEP << " Measurement step " << i+1 << "/"
|
||||||
|
<< p.size() << " (module '" << moduleName_[p[i]]
|
||||||
|
<< "') " << SEP << std::endl;
|
||||||
|
}
|
||||||
(*module_[p[i]])();
|
(*module_[p[i]])();
|
||||||
sizeBefore = getTotalSize();
|
sizeBefore = getTotalSize();
|
||||||
// print used memory after execution
|
// print used memory after execution
|
||||||
LOG(Message) << "Allocated objects: " << MEM_MSG(sizeBefore)
|
if (!isDryRun())
|
||||||
<< std::endl;
|
{
|
||||||
|
LOG(Message) << "Allocated objects: " << MEM_MSG(sizeBefore)
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
if (sizeBefore > memPeak)
|
if (sizeBefore > memPeak)
|
||||||
{
|
{
|
||||||
memPeak = sizeBefore;
|
memPeak = sizeBefore;
|
||||||
}
|
}
|
||||||
// garbage collection for step i
|
// garbage collection for step i
|
||||||
LOG(Message) << "Garbage collection..." << std::endl;
|
if (!isDryRun())
|
||||||
|
{
|
||||||
|
LOG(Message) << "Garbage collection..." << std::endl;
|
||||||
|
}
|
||||||
nothingFreed = true;
|
nothingFreed = true;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -360,14 +369,17 @@ unsigned int Environment::executeProgram(const std::vector<unsigned int> &p)
|
|||||||
}
|
}
|
||||||
// print used memory after garbage collection if necessary
|
// print used memory after garbage collection if necessary
|
||||||
sizeAfter = getTotalSize();
|
sizeAfter = getTotalSize();
|
||||||
if (sizeBefore != sizeAfter)
|
if (!isDryRun())
|
||||||
{
|
{
|
||||||
LOG(Message) << "Allocated objects: " << MEM_MSG(sizeAfter)
|
if (sizeBefore != sizeAfter)
|
||||||
<< std::endl;
|
{
|
||||||
}
|
LOG(Message) << "Allocated objects: " << MEM_MSG(sizeAfter)
|
||||||
else
|
<< std::endl;
|
||||||
{
|
}
|
||||||
LOG(Message) << "Nothing to free" << std::endl;
|
else
|
||||||
|
{
|
||||||
|
LOG(Message) << "Nothing to free" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user