Definition at line 360 of file DistributedAccess.h. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Append(), Impala::Util::Broadcast(), Impala::Core::Database::RawDataSet::GetDatabase(), Impala::Core::Database::RawDataSet::GetFilePathPrecomputedKernels(), Impala::Core::Database::RawDataSet::GetSetName(), Impala::MakeString(), mColumnQuids, mColumns, mRowQuids, mRows, Impala::Core::Matrix::DistributedAccess::IndexConverter::PartCount(), Impala::Core::Table::Read(), Impala::Core::Table::Table::Size(), Impala::Core::Matrix::DistributedAccess::IndexConverter::TotalSize(), Impala::Util::IOBuffer::Valid(), and Impala::Core::Table::Write(). Referenced by DistributedAccess(). 00362 { 00363 //ILOG_DEBUG_NODE("starting LoadQuids"); 00364 mRowQuids = new Table::QuidTable(); 00365 mColumnQuids = new Table::QuidTable(); 00366 int id = Link::Mpi::MyId(); 00367 if(id == 0) 00368 { 00369 Util::Database* db = (set2) ? set2->GetDatabase() 00370 : set->GetDatabase(); 00371 for(int r=0 ; r<mRows->PartCount() ; ++r) 00372 { 00373 ILOG_DEBUG_NODE("loading row quids part " << r); 00374 Table::QuidTable* temp = new Table::QuidTable(); 00375 String filename = filenamebase + ".rowindices" + MakeString(r) 00376 + "of" + MakeString(mRows->PartCount()) + ".quids"; 00377 if (set2) 00378 { 00379 filename = set2->GetFilePathPrecomputedKernels 00380 (filename, set->GetSetName(), false, false); 00381 } 00382 else 00383 { 00384 filename = set->GetFilePathPrecomputedKernels 00385 (filename, "", false, false); 00386 } 00387 Read(temp, filename, db); 00388 mRowQuids->Append(temp); 00389 delete temp; 00390 } 00391 for (int c=0 ; c<mColumns->PartCount() ; ++c) 00392 { 00393 ILOG_DEBUG_NODE("loading column quids part " << c); 00394 Table::QuidTable* temp = new Table::QuidTable(); 00395 String filename = filenamebase + ".columnindices" + MakeString(c) 00396 + "of" + MakeString(mColumns->PartCount()) + ".quids"; 00397 if (set2) 00398 { 00399 filename = set2->GetFilePathPrecomputedKernels 00400 (filename, set->GetSetName(), false, false); 00401 } 00402 else 00403 { 00404 filename = set->GetFilePathPrecomputedKernels 00405 (filename, "", false, false); 00406 } 00407 Read(temp, filename, db); 00408 mColumnQuids->Append(temp); 00409 delete temp; 00410 } 00411 if (mRowQuids->Size() != mRows->TotalSize()) 00412 ILOG_ERROR_NODE("number of row quids doesn't match totalrows " 00413 << mRows->TotalSize() << " != " 00414 << mRowQuids->Size()); 00415 if (mColumnQuids->Size() != mColumns->TotalSize()) 00416 ILOG_ERROR_NODE("number of column quids doesn't match total " 00417 << mColumns->TotalSize() << " != " 00418 << mColumnQuids->Size()); 00419 Util::IOBuffer* buf = new Util::IOBuffer(mRows->TotalSize()* 00420 sizeof(Quid) + 0x1000); 00421 Write(mRowQuids, buf, true); 00422 //ILOG_DEBUG_NODE("broadcasting..."); 00423 Broadcast(buf); 00424 //ILOG_DEBUG_NODE("done"); 00425 delete buf; 00426 buf = new Util::IOBuffer(mColumns->TotalSize()*sizeof(Quid) + 0x1000); 00427 Write(mColumnQuids, buf, true); 00428 Broadcast(buf); 00429 delete buf; 00430 } 00431 else 00432 { 00433 Util::IOBuffer* buf = new Util::IOBuffer(); 00434 //ILOG_DEBUG_NODE("broadcasting..."); 00435 Broadcast(buf); 00436 //ILOG_DEBUG_NODE("done"); 00437 if (buf && buf->Valid()) 00438 { 00439 Read(mRowQuids, buf); 00440 //ILOG_DEBUG_NODE("rows received"); 00441 delete buf; 00442 } 00443 buf = new Util::IOBuffer(); 00444 Broadcast(buf); 00445 if (buf && buf->Valid()) 00446 { 00447 Read(mColumnQuids, buf); 00448 //ILOG_DEBUG_NODE("columns received"); 00449 delete buf; 00450 } 00451 if(mRowQuids->Size() != mRows->TotalSize()) 00452 ILOG_ERROR_NODE("number of row quids doesn't match totalrows"); 00453 if(mColumnQuids->Size() != mColumns->TotalSize()) 00454 ILOG_ERROR_NODE("number of column quids doesn't match totalcolumns"); 00455 } 00456 }
Here is the call graph for this function:
|