本文整理汇总了C++中LOG4CXX_TRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG4CXX_TRACE函数的具体用法?C++ LOG4CXX_TRACE怎么用?C++ LOG4CXX_TRACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LOG4CXX_TRACE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LOG4CXX_TRACE
void Simulator::plotParticles(int iteration) {
outputWriter::VTKWriter vtkWriter;
outputWriter::XYZWriter xyzWriter;
#ifndef NOGLVISUALIZER
if(Settings::show3DVisual) {
outputWriter::RenderOutputWriter openglView;
LOG4CXX_TRACE(logger,"Plotting Particles");
openglView.plotParticles(*particleContainer, Settings::outputFilePrefix, iteration);
}
#endif
if(Settings::disableOutput) return;
switch (Settings::outputFileType) {
case OutputFileType::xyz:
xyzWriter.plotParticles(*particleContainer, Settings::outputFilePrefix, iteration);
break;
case OutputFileType::vtk:
vtkWriter.initializeOutput(particleContainer->getSize());
particleContainer->each([&] (Particle& p) {
#ifdef _OPENMP
#pragma omp critical (plot_particle)
#endif
vtkWriter.plotParticle(p);
});
vtkWriter.writeFile(Settings::outputFilePrefix, iteration);
break;
}
LOG4CXX_TRACE(logger,"Plotted \t"<< iteration << "\t Particles" );
}
开发者ID:TheHugeManatee,项目名称:MolSim,代码行数:30,代码来源:Simulator.cpp
示例2: LOG4CXX_TRACE
std::shared_ptr<Module<Impl>>
Module_scanner<Impl>::instantiate_module_template(Label inst_name,
ast::Module_def const* node,
std::map<Label,std::shared_ptr<Type<Impl>>> const& args) {
LOG4CXX_TRACE(this->m_logger, "creating module '"
<< inst_name << "' from template");
auto existing = m_mod.modules.find(inst_name);
if( existing != m_mod.modules.end() )
return existing->second;
auto m = std::make_shared<Module<Impl>>(inst_name);
m->enclosing_ns = &m_mod;
m->enclosing_library = m_mod.enclosing_library;
// inject type arguments
for(auto ty : args) {
LOG4CXX_TRACE(this->m_logger, "overriding type parameters '"
<< ty.first << "' with type '"
<< ty.second->name << "'");
m->types[ty.first] = ty.second;
}
Module_scanner<Impl> scanner(*m);
node->accept(scanner);
m_mod.modules[m->name] = m;
return m;
}
开发者ID:five-elephants,项目名称:cell,代码行数:29,代码来源:module_scanner.cpp
示例3: assert
void ReplicationManager::handleConnectionStatus(Notification<NetworkManager::ConnectionStatus>::MessageTypePtr connStatus)
{
assert(connStatus->getPhysicalInstanceId() != INVALID_INSTANCE);
LOG4CXX_TRACE(logger, "ReplicationManager::handleConnectionStatus: notification for instance="
<< connStatus->getPhysicalInstanceId()
<< ", remote receive queue size="
<< connStatus->getAvailabeQueueSize());
if (connStatus->getQueueType() != NetworkManager::mqtReplication)
{
return;
}
if (connStatus->getAvailabeQueueSize() <= 0)
{
return;
}
ScopedMutexLock cs(_repMutex);
RepQueue::iterator iter = _repQueue.find(connStatus->getPhysicalInstanceId());
if (iter == _repQueue.end()) {
return;
}
LOG4CXX_TRACE(logger, "ReplicationManager::handleConnectionStatus: notification for instance="
<< connStatus->getPhysicalInstanceId()
<< ", local replication queue size="<< iter->second->size()
<< ", remote receive queue size="<< connStatus->getAvailabeQueueSize());
_repEvent.signal();
}
开发者ID:suhailrehman,项目名称:scidb,代码行数:30,代码来源:ReplicationManager.cpp
示例4: LOG4CXX_DEBUG
// XXX TODO: consider returning std::vector<scidb::SharedMemoryPtr>
// XXX TODO: which would require supporting different types of memory (double, char etc.)
std::vector<MPIPhysical::SMIptr_t> MPIPhysical::allocateMPISharedMemory(size_t numBufs,
size_t elemSizes[],
size_t numElems[],
string dbgNames[])
{
LOG4CXX_DEBUG(logger, "MPIPhysical::allocateMPISharedMemory(numBufs "<<numBufs<<",,,)");
if(logger->isTraceEnabled()) {
LOG4CXX_TRACE(logger, "MPIPhysical::allocateMPISharedMemory(): allocations are: ");
for(size_t ii=0; ii< numBufs; ii++) {
LOG4CXX_TRACE(logger, "MPIPhysical::allocateMPISharedMemory():"
<< " elemSizes["<<ii<<"] "<< dbgNames[ii] << " len " << numElems[ii]);
}
}
std::vector<SMIptr_t> shmIpc(numBufs);
bool preallocate = Config::getInstance()->getOption<bool>(CONFIG_PREALLOCATE_SHM);
for(size_t ii=0; ii<numBufs; ii++) {
std::stringstream suffix;
suffix << "." << ii ;
std::string ipcNameFull= _ipcName + suffix.str();
LOG4CXX_TRACE(logger, "IPC name = " << ipcNameFull);
shmIpc[ii] = SMIptr_t(mpi::newSharedMemoryIpc(ipcNameFull, preallocate)); // can I get 'em off ctx instead?
_ctx->addSharedMemoryIpc(_launchId, shmIpc[ii]);
char* ptr = MpiLauncher::initIpcForWrite(shmIpc[ii].get(), (elemSizes[ii] * numElems[ii]));
assert(ptr); ptr=ptr;
}
return shmIpc;
}
开发者ID:Myasuka,项目名称:scidb,代码行数:32,代码来源:MPIPhysical.cpp
示例5: DetourWeCreateProcessA
BOOL WINAPI DetourWeCreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
{
//LOG4CXX_TRACE(NYDWE::gInjectLogger, boost::format("ApplicationName: %1%") % lpApplicationName);
//LOG4CXX_TRACE(NYDWE::gInjectLogger, boost::format("CommandLine: %1%") % lpCommandLine);
std::cmatch matcher;
if (lpCommandLine && std::regex_match(lpCommandLine, matcher, gRegexCommandLine))
{
std::string currentWarcraftMap = (ydwe::path::get(ydwe::path::DIR_EXE).remove_filename() / matcher.str(1)).string();
LOG4CXX_TRACE(NYDWE::gInjectLogger, boost::format("Executing map %1%") % currentWarcraftMap);
CYDWEEventData eventData;
if (gIsInCompileProcess)
{
LOG4CXX_TRACE(NYDWE::gInjectLogger, "Need to compile...");
eventData.setEventData("map_path", currentWarcraftMap);
const std::vector<int> &results = event_array[EVENT_SAVE_MAP](eventData);
gIsInCompileProcess = false;
if (results_is_failed(results))
{
LOG4CXX_TRACE(NYDWE::gInjectLogger, "Save failed. Abort testing.");
memset(lpProcessInformation, 0, sizeof(PROCESS_INFORMATION));
return FALSE;
}
}
else
{
LOG4CXX_TRACE(NYDWE::gInjectLogger, "No need to compile.");
}
eventData.getDataStore().clear();
eventData.setEventData("map_path", currentWarcraftMap);
if (lpApplicationName)
eventData.setEventData("application_name", std::string(lpApplicationName));
if (lpCommandLine)
eventData.setEventData("command_line", std::string(lpCommandLine));
const std::vector<int> &results = event_array[EVENT_TEST_MAP](eventData);
return (!results_is_failed(results));
}
else
{
// Retain original
return aero::std_call<BOOL>(pgTrueCreateProcessA,
lpApplicationName,
lpCommandLine,
lpProcessAttributes,
lpThreadAttributes,
bInheritHandles,
dwCreationFlags,
lpEnvironment,
lpCurrentDirectory,
lpStartupInfo,
lpProcessInformation
);
}
}
开发者ID:myeang1,项目名称:YDWE,代码行数:59,代码来源:LuaEvent.cpp
示例6: sScope
bool RemoteMergedArray::proceedChunkMsg(size_t stream, AttributeID attId, MemChunk* chunk)
{
boost::shared_ptr<MessageDesc> chunkDesc = _messages[attId][stream];
_messages[attId][stream].reset();
boost::shared_ptr<scidb_msg::Chunk> chunkMsg = chunkDesc->getRecord<scidb_msg::Chunk>();
StatisticsScope sScope(_statistics);
currentStatistics->receivedSize += chunkDesc->getMessageSize();
currentStatistics->receivedMessages++;
_nextPositions[attId][stream].clear();
if (!chunkMsg->eof())
{
LOG4CXX_TRACE(logger, "RemoteMergedArray received next chunk message");
if (chunkDesc->getBinary() && chunk != NULL)
{
const int compMethod = chunkMsg->compression_method();
const size_t decompressedSize = chunkMsg->decompressed_size();
Address firstElem;
firstElem.attId = attId;
firstElem.arrId = getArrayDesc().getId();
for (int i = 0; i < chunkMsg->coordinates_size(); i++) {
firstElem.coords.push_back(chunkMsg->coordinates(i));
}
chunk->initialize(this, &desc, firstElem, compMethod);
chunk->setSparse(chunkMsg->sparse());
chunk->setRLE(chunkMsg->rle());
chunk->setCount(chunkMsg->count());
boost::shared_ptr<CompressedBuffer> compressedBuffer = dynamic_pointer_cast<CompressedBuffer>(chunkDesc->getBinary());
compressedBuffer->setCompressionMethod(compMethod);
compressedBuffer->setDecompressedSize(decompressedSize);
chunk->decompress(*compressedBuffer);
assert(checkChunkMagic(*chunk));
LOG4CXX_TRACE(logger, "RemoteMergedArray initializes next chunk");
}
LOG4CXX_TRACE(logger, "RemoteMergedArray initializes next position");
if (chunkMsg->has_next())
{
for (int i = 0; i < chunkMsg->next_coordinates_size(); i++) {
_nextPositions[attId][stream].push_back(chunkMsg->next_coordinates(i));
}
requestNextChunk(stream, attId, false);
}
return true;
}
else
{
LOG4CXX_TRACE(logger, "RemoteMergedArray has no new chunks");
return false;
}
}
开发者ID:tshead,项目名称:scidb-osx-12.3-snow-leopard,代码行数:56,代码来源:RemoteArray.cpp
示例7: LOG4CXX_ERROR
/* Clear all datastore files from the basepath
*/
void
DataStores::clearAllDataStores()
{
/* Try to open the base dir
*/
DIR* dirp = ::opendir(_basePath.c_str());
if (dirp == NULL)
{
LOG4CXX_ERROR(logger, "DataStores::clearAllDataStores: failed to open base dir, aborting clearAll");
return;
}
boost::function<int()> f = boost::bind(&File::closeDir, _basePath.c_str(), dirp, false);
scidb::Destructor<boost::function<int()> > dirCloser(f);
struct dirent entry;
memset(&entry, 0, sizeof(entry));
/* For each entry in the base dir
*/
while (true)
{
struct dirent *result(NULL);
int rc = ::readdir_r(dirp, &entry, &result);
if (rc != 0 || result == NULL)
{
return;
}
assert(result == &entry);
LOG4CXX_TRACE(logger, "DataStores::clearAllDataStores: found entry " << entry.d_name);
/* If its a datastore or fl file, go ahead and try to remove it
*/
size_t entrylen = strlen(entry.d_name);
size_t fllen = strlen(".fl");
size_t datalen = strlen(".data");
const char* entryend = entry.d_name + entrylen;
/* Check if entry ends in ".fl" or ".data"
*/
if (((entrylen > fllen) &&
(strcmp(entryend - fllen, ".fl") == 0)) ||
((entrylen > datalen) &&
(strcmp(entryend - datalen, ".data") == 0))
)
{
LOG4CXX_TRACE(logger, "DataStores::clearAllDataStores: deleting entry " << entry.d_name);
std::string fullpath = _basePath + "/" + entry.d_name;
File::remove(fullpath.c_str(), false);
}
}
}
开发者ID:Myasuka,项目名称:scidb,代码行数:57,代码来源:DataStore.cpp
示例8: LOG4CXX_TRACE
void Resources::fileExists(const string &path, map<InstanceID, bool> &instancesMap, const shared_ptr<Query> &query)
{
LOG4CXX_TRACE(logger, "Resources::fileExists. Checking file '" << path << "'");
NetworkManager* networkManager = NetworkManager::getInstance();
FileExistsResourcesCollector* collector = new FileExistsResourcesCollector();
uint64_t id = 0;
{
ScopedMutexLock lock(_lock);
id = ++_lastResourceCollectorId;
_resourcesCollectors[id] = collector;
collector->collect(query->getInstanceID(), checkFileExists(path), false);
}
shared_ptr<MessageDesc> msg = make_shared<MessageDesc>(mtResourcesFileExistsRequest);
shared_ptr<scidb_msg::ResourcesFileExistsRequest> request =
msg->getRecord<scidb_msg::ResourcesFileExistsRequest>();
msg->setQueryID(0);
request->set_resource_request_id(id);
request->set_file_path(path);
networkManager->broadcast(msg);
LOG4CXX_TRACE(logger, "Resources::fileExists. Waiting while instances return result for collector " << id);
try
{
Semaphore::ErrorChecker errorChecker = bind(&Query::validateQueryPtr, query);
collector->_collectorSem.enter(query->getInstancesCount() - 1, errorChecker);
}
catch (...)
{
LOG4CXX_TRACE(logger, "Resources::fileExists. Waiting for result of collector " << id <<
" interrupter by error");
{
ScopedMutexLock lock(_lock);
delete _resourcesCollectors[id];
_resourcesCollectors.erase(id);
}
throw;
}
LOG4CXX_TRACE(logger, "Resources::fileExists. Returning result of collector " << id);
{
ScopedMutexLock lock(_lock);
instancesMap = ((FileExistsResourcesCollector*) _resourcesCollectors[id])->_instancesMap;
delete _resourcesCollectors[id];
_resourcesCollectors.erase(id);
}
}
开发者ID:tshead,项目名称:scidb-osx-12.3-snow-leopard,代码行数:51,代码来源:Resources.cpp
示例9: test6
void test6()
{
log4cxx::PropertyConfigurator::configure("log4cxx.properties");
log4cxx::LoggerPtr loggerA(log4cxx::Logger::getLogger("aaa"));
log4cxx::LoggerPtr loggerB(log4cxx::Logger::getLogger("bbb"));
LOG_F("\n");
LOG4CXX_INFO(loggerA, "this is log4cxx test");
LOG4CXX_INFO(loggerB, "this is log4cxx test");
log4cxx::LoggerPtr logger0(log4cxx::Logger::getLogger("logger0"));
LOG4CXX_DEBUG(logger0, "hello");
LOG4CXX_TRACE(logger0, "hello");
LOG4CXX_INFO(logger0, "hello");
LOG4CXX_WARN(logger0, "hello");
LOG4CXX_ERROR(logger0, "hello");
LOG4CXX_FATAL(logger0, "hello");
// std::set<int> cList;
// LOG4CXX_INFO(logger0, cList);
//log4j.logger.logger0 = INFO, ap0
// INFO 23:02:03 -- hello
// WARN 23:02:04 -- hello
// ERROR 23:02:04 -- hello
// FATAL 23:02:04 -- hello
LOG_F("\n");
}
开发者ID:QC-git,项目名称:MyLab,代码行数:30,代码来源:test1_util.cpp
示例10: Graph_read
static bool Graph_read(Graph& graph, std::istream& stream) {
if (!stream) {
return false;
}
// s.t. con3122 : x_2250 - x_2866 + e_2866_2250 = 190;
static boost::regex reg("s\\.t\\. con(\\d+)\\s*:\\s*x_(\\d+)\\s*-\\s*x_(\\d+)\\s*\\+\\s*e_(\\d+)_(\\d+)\\s*=\\s*((\\+|-)?\\d+)\\s*;");
std::string line;
while (std::getline(stream, line)) {
boost::algorithm::trim(line);
boost::smatch what;
if (boost::regex_match(line, what, reg)) {
size_t xj = boost::lexical_cast< size_t >(what[2]);
size_t xi = boost::lexical_cast< size_t >(what[3]);
int err = boost::lexical_cast< int >(what[6]);
LOG4CXX_TRACE(logger, boost::format("regex: %d %d %d %s") % xi % xj % err % line);
Graph_addEdge(graph, xi, xj, err);
}
}
return true;
}
开发者ID:zhujianwei31415,项目名称:ARCS,代码行数:25,代码来源:lp_solver.cpp
示例11: _dsm
/* Construct a new DataStore object
*/
DataStore::DataStore(char const* filename, Guid guid, DataStores& parent) :
_dsm(&parent),
_dslock(),
_guid(guid),
_largestFreeChunk(0),
_dirty(false),
_fldirty(false)
{
/* Open the file
*/
string filenamestr = filename;
_file = FileManager::getInstance()->openFileObj(filenamestr.c_str(), O_LARGEFILE | O_RDWR | O_CREAT);
if (_file.get() == NULL)
{
throw SYSTEM_EXCEPTION(SCIDB_SE_STORAGE,
SCIDB_LE_CANT_OPEN_FILE)
<< filenamestr << errno;
}
LOG4CXX_TRACE(logger, "datastore: new ds opened file " << filenamestr);
/* Try to initialize the free lists from the free-list file.
*/
initializeFreelist();
}
开发者ID:Myasuka,项目名称:scidb,代码行数:28,代码来源:DataStore.cpp
示例12: cs
bool ReplicationManager::sendItem(RepItems& ri)
{
ScopedMutexLock cs(_repMutex);
const std::shared_ptr<Item>& item = ri.front();
if (item->isDone()) {
ri.pop_front();
return true;
}
try {
std::shared_ptr<Query> q(Query::getValidQueryPtr(item->getQuery()));
std::shared_ptr<MessageDesc> chunkMsg(item->getChunkMsg());
NetworkManager::getInstance()->sendPhysical(item->getInstanceId(), chunkMsg,
NetworkManager::mqtReplication);
LOG4CXX_TRACE(logger, "ReplicationManager::sendItem: successful replica chunk send to instance="
<< item->getInstanceId()
<< ", size=" << item->getChunkMsg()->getMessageSize()
<< ", query (" << q->getQueryID()<<")"
<< ", queue size="<< ri.size());
InjectedErrorListener<ReplicaSendInjectedError>::check();
item->setDone();
} catch (NetworkManager::OverflowException& e) {
assert(e.getQueueType() == NetworkManager::mqtReplication);
return false;
} catch (Exception& e) {
item->setDone(e.copy());
}
ri.pop_front();
return true;
}
开发者ID:suhailrehman,项目名称:scidb,代码行数:32,代码来源:ReplicationManager.cpp
示例13: LOG4CXX_TRACE
/* Invalidate the free-list file on disk
@pre caller has locked the DataStore
*/
void
DataStore::invalidateFreelistFile()
{
if (!_fldirty)
{
File::FilePtr flfile;
std::string filename;
size_t nbuckets = 0;
LOG4CXX_TRACE(logger, "datastore: invalidating freelist for " << _file->getPath());
filename = _file->getPath() + ".fl";
flfile = FileManager::getInstance()->openFileObj(filename, O_CREAT | O_TRUNC | O_RDWR);
if (!flfile)
{
throw SYSTEM_EXCEPTION(SCIDB_SE_STORAGE, SCIDB_LE_CANT_OPEN_PATH)
<< filename;
}
/* This is one vulnerable spot... after truncate, but before we write the zero byte
*/
_dsm->getErrorListener().check();
flfile->writeAll((void*)&nbuckets, sizeof(size_t), 0);
flfile->fsync();
_fldirty = true;
_dsm->getFlusher().add(_guid);
}
}
开发者ID:Myasuka,项目名称:scidb,代码行数:32,代码来源:DataStore.cpp
示例14: LOG4CXX_TRACE
void VTKWriter::plotParticle(Particle& p) {
if (vtkFile->UnstructuredGrid().present()) {
LOG4CXX_TRACE(iolog, "UnstructuredGrid is present");
} else {
LOG4CXX_ERROR(iolog, "No UnstructuredGrid present");
}
PointData::DataArray_sequence& pointDataSequence = vtkFile->UnstructuredGrid()->Piece().PointData().DataArray();
PointData::DataArray_iterator dataIterator = pointDataSequence.begin();
dataIterator->push_back(p.getM());
//cout << "Appended mass data in: " << dataIterator->Name();
dataIterator++;
dataIterator->push_back(p.getV()[0]);
dataIterator->push_back(p.getV()[1]);
dataIterator->push_back(p.getV()[2]);
//cout << "Appended velocity data in: " << dataIterator->Name();
dataIterator++;
dataIterator->push_back(p.getOldF()[0]);
dataIterator->push_back(p.getOldF()[1]);
dataIterator->push_back(p.getOldF()[2]);
//cout << "Appended force data in: " << dataIterator->Name();
dataIterator++;
dataIterator->push_back(p.getType());
Points::DataArray_sequence& pointsSequence = vtkFile->UnstructuredGrid()->Piece().Points().DataArray();
Points::DataArray_iterator pointsIterator = pointsSequence.begin();
pointsIterator->push_back(p.getX()[0]);
pointsIterator->push_back(p.getX()[1]);
pointsIterator->push_back(p.getX()[2]);
}
开发者ID:Gruppe3,项目名称:MolSimGR3,代码行数:34,代码来源:VTKWriter.cpp
示例15: LOG4CXX_DEBUG
void CuboidInitializer::initialize(ParticleContainer& container) {
double x[] = {0,0,0};
double m = _config.getMaterialConfig().getM();
double epsilon = _config.getMaterialConfig().getEpsilon();
double sigma = _config.getMaterialConfig().getSigma();
LOG4CXX_DEBUG(logger, "SphereInitializer material: m=" << m << " epsilon=" << epsilon << " sigma=" << sigma);
const utils::Vector<double,3>& v = _config.getV();
const utils::Vector<int, 3>& n = _config.getN();
LOG4CXX_DEBUG(logger, "Initializing CUBE at " << _config.getX().toString());
for (int i = 0; i < n[0]; i++) {
for (int j = 0; j < n[1]; j++) {
for (int k = 0; k < n[2]; k++) {
x[0] = _config.getX()[0] + ((double)i) * _config.getH();
x[1] = _config.getX()[1] + ((double)j) * _config.getH();
x[2] = _config.getX()[2] + ((double)k) * _config.getH();
LOG4CXX_TRACE(logger, "creating (x,y,z): (" << x[i] << "," << x[j] << "," << x[k] << ")");
Particle p(x, v, m, epsilon, sigma, _type_id);
//MaxwellBoltzmannDistribution(p, 0.1, dim);
container.addParticle(p);
}
}
}
}
开发者ID:p-hoffmann,项目名称:madpac,代码行数:26,代码来源:CuboidInitializer.cpp
示例16: LOG4CXX_DEBUG
void PanguAppendStore::CreateDirs(const std::string& root)
{
if (CreateDirectory(root))
{
LOG4CXX_DEBUG(logger_, "CreateDirectory : " << root);
}
std::string index_path = root+ std::string(Defaults::IDX_DIR);
if (CreateDirectory(index_path.c_str()))
{
LOG4CXX_DEBUG(logger_, "CreateDirectory : " << index_path);
}
std::string data_path = root+ std::string(Defaults::DAT_DIR);
if (CreateDirectory(data_path.c_str()))
{
LOG4CXX_DEBUG(logger_, "CreateDirectory : " << data_path);
}
std::string log_path = root + std::string(Defaults::LOG_DIR);
if (CreateDirectory(log_path.c_str()))
{
LOG4CXX_DEBUG(logger_, "CreateDirectory : " << log_path);
}
LOG4CXX_TRACE(logger_, "Store::Directories Created" );
}
开发者ID:ChenHuge,项目名称:bigarchive,代码行数:29,代码来源:append_store.cpp
示例17: LOG4CXX_TRACE
void
Vcd_instrumenter::initial(ir::Time const& t) {
LOG4CXX_TRACE(m_logger, "initial dump");
m_os << "$enddefinitions\n";
write_dump_all(m_os);
}
开发者ID:five-elephants,项目名称:cell,代码行数:7,代码来源:vcd_instrumenter.cpp
示例18: shmIpc
// XXX TODO: consider returning std::vector<scidb::SharedMemoryPtr>
// XXX TODO: which would require supporting different types of memory (double, char etc.)
std::vector<MPIPhysical::SMIptr_t> MPIPhysical::allocateMPISharedMemory(size_t numBufs,
size_t elemSizes[],
size_t numElems[],
string dbgNames[])
{
if(DBG) {
std::cerr << "SHM ALLOCATIONS:@@@@@@@@@@@@@@@@@@@" << std::endl ;
for(size_t ii=0; ii< numBufs; ii++) {
std::cerr << "numElems["<<ii<<"] "<< dbgNames[ii] << " len = " << numElems[0] << std::endl;
}
}
std::vector<SMIptr_t> shmIpc(numBufs);
for(size_t ii=0; ii<numBufs; ii++) {
std::stringstream suffix;
suffix << "." << ii ;
std::string ipcNameFull= _ipcName + suffix.str();
LOG4CXX_TRACE(logger, "IPC name = " << ipcNameFull);
shmIpc[ii] = SMIptr_t(mpi::newSharedMemoryIpc(ipcNameFull)); // can I get 'em off ctx instead?
_ctx->addSharedMemoryIpc(_launchId, shmIpc[ii]);
try {
shmIpc[ii]->create(SharedMemoryIpc::RDWR);
shmIpc[ii]->truncate(elemSizes[ii] * numElems[ii]);
} catch(SharedMemoryIpc::SystemErrorException& e) {
std::stringstream ss; ss << "shared_memory_mmap " << e.what();
throw (SYSTEM_EXCEPTION(SCIDB_SE_INTERNAL, SCIDB_LE_OPERATION_FAILED) << ss.str()) ;
} catch(SharedMemoryIpc::InvalidStateException& e) {
throw (SYSTEM_EXCEPTION(SCIDB_SE_INTERNAL, SCIDB_LE_UNKNOWN_ERROR) << e.what());
}
}
return shmIpc;
}
开发者ID:hansmire,项目名称:scidb-osx-12.10-mountain-lion,代码行数:36,代码来源:MPIPhysical.cpp
示例19: Chunk
Chunk* PanguAppendStore::LoadRandomChunk(ChunkIDType id)
{
if (ValidChunkID(id) == false)
{
return 0;
}
// first look at the current reading chunk
if(mCurrentRandomChunk.get() != 0) {
if(mCurrentRandomChunk.get()->GetID() == id) {
return mCurrentRandomChunk.get();
}
}
// then search the opened chunks
ChunkMapType::const_iterator it = mChunkMap.find(id);
if (it != mChunkMap.end())
{
return it->second.get();
}
// still not found, have to open the chunk for read
mCurrentRandomChunk.reset(new Chunk(mRoot, id, mMeta.maxChunkSize, false, mCodec, mCache));
assert(mCurrentRandomChunk.get());
mChunkMap.insert(std::make_pair(id, mCurrentRandomChunk));
LOG4CXX_TRACE(logger_, "Store::LoadedRandomChunk" );
return mCurrentRandomChunk.get();
}
开发者ID:ChenHuge,项目名称:bigarchive,代码行数:28,代码来源:append_store.cpp
示例20: lock
void MpiLauncher::handleKillTimeout(boost::shared_ptr<boost::asio::deadline_timer>& killTimer,
const boost::system::error_code& error)
{
ScopedMutexLock lock(_mutex);
if (error == boost::asio::error::operation_aborted) {
assert(_pid < 0);
LOG4CXX_TRACE(logger, " MPI launcher kill timer cancelled");
return;
}
if (error) {
assert(false);
LOG4CXX_WARN(logger, "MPI launcher kill timer encountered error"<<error);
}
if (_pid <= 0) {
LOG4CXX_WARN(logger, "MPI launcher kill timer cannot kill pid="<<_pid);
return;
}
if (!_waiting) {
assert(false);
LOG4CXX_ERROR(logger, "MPI launcher kill timer cannot kill pid="<<_pid);
throw InvalidStateException(REL_FILE, __FUNCTION__, __LINE__)
<< " MPI launcher process cannot be killed";
}
LOG4CXX_WARN(logger, "MPI launcher is about to kill group pid="<<_pid);
// kill launcher's proc group
MpiErrorHandler::killProc(_installPath, -_pid);
}
开发者ID:hansmire,项目名称:scidb-osx-12.10-mountain-lion,代码行数:29,代码来源:MPILauncher.cpp
注:本文中的LOG4CXX_TRACE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论