Commit 84616544 authored by Francois Tessier's avatar Francois Tessier

Merge branch 'master' of xgitlab.cels.anl.gov:ftessier/TAPIOCA

parents 8b1ce3cb f840bf89
......@@ -14,7 +14,7 @@
int main (int argc, char * argv[])
{
int world_numtasks, world_myrank, mycolor, mykey, sub_numtasks, sub_myrank, i, file_id;
int64_t num_particles = 100000;
int64_t num_particles = 25000;
int64_t sub_particles, tot_particles, particle_size, file_size, tot_size;
int64_t scan_size = 0, offset, hdr = 0;
double start_time, end_time, tot_time, max_time;
......
......@@ -193,6 +193,7 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
*/
while ( this->roundsIds[targetRoundIdx] > this->currentRound_ ) {
for ( i = 0; i < this->nAggr_ ; i++ ) {
fprintf (stdout, "[INFO] %d calls 1st GlobalFence, buff %d, dat %s (r: %d)\n", this->commRank_, (this->currentRound_ % NBUFFERS), var, this->currentRound_);
this->GlobalFence (var);
this->roundCounter_++;
}
......@@ -200,10 +201,12 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
if ( this->amAnAggr_ ) {
// if (iRequest != NULL)
// MPI_Wait ( &iRequest, &iStatus );
fprintf (stdout, "[INFO] %d calls 1st Push (r: %d)\n", this->commRank_, this->currentRound_);
this->Push (fileHandle, status);
//this->iPush (fileHandle, &iRequest);
}
fprintf (stdout, "[INFO] %d increment 1st currentRound (r: %d)\n", this->commRank_, this->currentRound_);
this->currentRound_++;
}
......@@ -216,6 +219,7 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
targetGlobAggr = this->globalAggregatorsRanks[targetAggrIdx];
targetAggr = this->aggregatorsRanks[targetAggrIdx];
fprintf (stdout, "[INFO] %d Put %s data in buffer %d, agg %d (r: %d)\n", this->commRank_, var, buffer, targetGlobAggr, this->currentRound_);
switch (buffer)
{
case 0:
......@@ -237,15 +241,19 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
*/
if ( this->currentDataSize_ == this->rankDataSize_) {
while ( this->roundCounter_ < this->totalRounds_) {
fprintf (stdout, "[INFO] %d calls 2nt GlobalFence, buff %d, dat %s (r: %d)\n", this->commRank_, (this->currentRound_ % NBUFFERS), var, this->currentRound_);
this->GlobalFence (var);
if ( (this->roundCounter_ % this->nAggr_) == 0 ) {
if ( this->amAnAggr_ ) {
// if (iRequest != NULL)
// MPI_Wait ( &iRequest, &iStatus );
fprintf (stdout, "[INFO] %d calls 2nd Push (r: %d)\n", this->commRank_, this->currentRound_);
this->Push (fileHandle, status);
//this->iPush (fileHandle, &iRequest);
}
fprintf (stdout, "[INFO] %d increment 2nd currentRound (r: %d)\n", this->commRank_, this->currentRound_);
this->currentRound_++;
}
......@@ -254,6 +262,7 @@ int Tapioca::Write (MPI_File fileHandle, MPI_Offset offset, void *buf,
}
if ( multipleRounds ) {
fprintf (stdout, "[INFO] %d has a second round (r: %d)\n", this->commRank_, this->currentRound_);
retval = this->Write (fileHandle, offset + subChunkDataSize, buf,
chunkDataSize - subChunkDataSize, MPI_BYTE, status, var, subChunkDataSize);
}
......@@ -365,7 +374,6 @@ void Tapioca::GlobalFence (char* var)
int buffer;
buffer = this->currentRound_ % NBUFFERS;
fprintf (stdout, "[INFO] %d %s buffer = %d\n", this->commRank_, var, buffer);
switch (buffer)
{
......@@ -540,7 +548,7 @@ void Tapioca::IdentifyMyAggregators ()
}
#ifdef DEBUG
if (this->commRank_ == 70) {
if (this->commRank_ == 4) {
fprintf (stdout, "[DEBUG] Rounds distrib. on %d aggregators: AGG ", this->nAggr_);
for ( i = 0; i < this->totalRounds_; i++ )
fprintf (stdout, "%d ", rounds[i].aggr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment