Skip to content

Commit

Permalink
Refs #4472: take out some old/excessive debug logging
Browse files Browse the repository at this point in the history
Also refs #4808, fix StartLiveDataTest
  • Loading branch information
Janik Zikovsky committed Feb 24, 2012
1 parent 515f8b1 commit 5f0d3e9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 0 additions & 2 deletions Code/Mantid/Framework/API/src/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ namespace Mantid
// no logging of input if a child algorithm (except for python child algos)
if (!m_isChildAlgorithm || m_alwaysStoreInADS) logAlgorithmInfo();

g_log.debug() << this->name() << " is executing with isChild = " << this->isChild() << std::endl;

// Check all properties for validity
if ( !validateProperties() )
{
Expand Down
13 changes: 7 additions & 6 deletions Code/Mantid/Framework/API/src/MemoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ bool MemoryManagerImpl::goForManagedWorkspace(std::size_t NVectors, std::size_t
else
wsSize = NVectors * (YLength * 2 + XLength) / 1024;

g_log.debug() << "Requested memory: " << wsSize * sizeof(double) << " KB.\n";
g_log.debug() << "Available memory: " << mi.availMemory << " KB.\n";
g_log.debug() << "MWS trigger memory: " << triggerSize * sizeof(double) << " KB.\n";
// g_log.debug() << "Requested memory: " << (wsSize * sizeof(double))/1024 << " MB. " << std::endl;
// g_log.debug() << "Available memory: " << mi.availMemory << " KB.\n";
// g_log.debug() << "MWS trigger memory: " << triggerSize * sizeof(double) << " KB.\n";

bool goManaged = (wsSize > triggerSize);
// If we're on the cusp of going managed, add in the reserved but unused memory
Expand All @@ -103,13 +103,14 @@ bool MemoryManagerImpl::goForManagedWorkspace(std::size_t NVectors, std::size_t
// See Kernel/src/Memory.cpp - reservedMem() for more details
Kernel::MemoryStats mem_stats;
const size_t reserved = mem_stats.reservedMem();
g_log.debug() << "Windows - Adding reserved but unused memory of " << reserved << " KB\n";
// g_log.debug() << "Windows - Adding reserved but unused memory of " << reserved << " KB\n";
mi.availMemory += reserved;
triggerSize += reserved / 100 * availPercent / sizeof(double);
goManaged = (wsSize > triggerSize);

g_log.debug() << "Available memory: " << mi.availMemory << " KB.\n";
g_log.debug() << "MWS trigger memory: " << triggerSize * sizeof(double) << " KB.\n";
g_log.debug() << "Requested memory: " << (wsSize * sizeof(double))/1024 << " MB." << std::endl;
g_log.debug() << "Available memory: " << (mi.availMemory)/1024 << " MB." << std::endl;
g_log.debug() << "ManagedWS trigger memory: " << (triggerSize * sizeof(double))/1024 << " MB." << std::endl;
}

if (isCompressedOK)
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/DataHandling/test/StartLiveDataTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <cxxtest/TestSuite.h>
#include <iomanip>
#include <iostream>
#include "MantidKernel/SingletonHolder.h"

using namespace Mantid;
using namespace Mantid::DataHandling;
Expand Down Expand Up @@ -68,6 +69,8 @@ class StartLiveDataTest : public CxxTest::TestSuite
* This checks that the properties are copied to LoadLiveData */
void test_start_with_processChunk()
{
// Declare all algorithms, e.g. Rebin
FrameworkManager::Instance();
EventWorkspace_sptr ws;
ws = doExecEvent("Replace", 0, "Rebin", "Params=40e3, 1e3, 60e3");
TS_ASSERT_EQUALS(ws->getNumberHistograms(), 2);
Expand Down
7 changes: 3 additions & 4 deletions Code/Mantid/Framework/Kernel/inc/MantidKernel/DataService.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ class DLLExport DataService
// Don't permit an empty name for the workspace
if (name.empty())
{
std::string error=" add Data Object with empty name";
g_log.error(error);
std::string error="Add Data Object with empty name";
g_log.debug() << error << std::endl;
throw std::runtime_error(error);
}

Expand All @@ -198,8 +198,7 @@ class DLLExport DataService
}
else
{
std::string information=" add Data Object '"+name+"' successful\n";
g_log.debug(information);
g_log.debug() << "Add Data Object " << name << " successful" << std::endl;

//check the workspace invisible option set
std::string name_startswith=name.substr(0,2);
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Kernel/src/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void MemoryStats::process_mem_system(size_t & sys_avail, size_t & sys_total)
}
// Can get the info on the memory that we've already obtained but aren't using right now
const int unusedReserved = mallinfo().fordblks/1024;
g_log.debug() << "Linux - Adding reserved but unused memory of " << unusedReserved << " KB\n";
//g_log.debug() << "Linux - Adding reserved but unused memory of " << unusedReserved << " KB\n";
sys_avail += unusedReserved;
#elif __APPLE__
// Get the total RAM of the system
Expand Down

0 comments on commit 5f0d3e9

Please sign in to comment.