Пример #1
0
static void MonCbTaskStop(mon_task_t *mt, lpel_taskstate_t state)
{
  if (mt->mw==NULL) return;

  FILE *file = mt->mw->outfile;
  lpel_timing_t et;
  assert( mt != NULL );


  if FLAG_TIMES(mt) {
    LpelTimingNow(&mt->times.stop);
    PrintNormTS(&mt->times.stop, file);
  }

  /* print general info: tid, disp.cnt, state */
  fprintf( file, "%lu disp %lu ", mt->tid, mt->disp);

  if ( state==TASK_BLOCKED) {
    fprintf( file, "st %c ", mt->blockon);
  } else {
    fprintf( file, "st %c ", state);
  }

  /* print times */
  if FLAG_TIMES(mt) {
    fprintf( file, "et ");
    /* execution time */
    LpelTimingDiff(&et, &mt->times.start, &mt->times.stop);
    /* update total execution time */
    LpelTimingAdd(&mt->times.total, &et);

    PrintTiming( &et , file);
    if ( state == TASK_ZOMBIE) {
      fprintf( file, "creat ");
      PrintTiming( &mt->times.creat, file);
      if (strlen(mt->name) > 0) {
        fprintf( file, "'%s' ", mt->name);
      }
    }
  }

  /* print stream info */
  if FLAG_STREAMS(mt) {
    /* print (and reset) dirty list */
    PrintDirtyList(mt);
  }

  fprintf( file, "\n");

//FIXME only for debugging purposes
  //fflush( file);
}
Пример #2
0
static void MonCbTaskStop( mon_task_t *mt, lpel_taskstate_t state)
{
	if ( mt->mw==NULL) return;

	FILE *file = mt->mw->outfile;
	lpel_timing_t et;
	assert( mt != NULL );


	if FLAG_TIMES(mt) {
		LpelTimingNow(&mt->times.stop);
		PrintNormTS(&mt->times.stop, file);
	}

	/* print general info: status, id */

	if ( state==TASK_BLOCKED) {
		fprintf( file, "%c", mt->blockon);
	} else {
		fprintf( file, "%c", state);
	}
	fprintf( file, "%lu ", mt->tid);

	/* print times */
	if FLAG_TIMES(mt) {
		/* execution time */
		LpelTimingDiff(&et, &mt->times.start, &mt->times.stop);
		PrintTiming( &et , file);
		fprintf( file, " ");
		if ( state == TASK_ZOMBIE) {	// task finish
			PrintTiming( &mt->times.creat, file);
			fprintf(file, " ");
		}
	}

	/* print stream info */
	if FLAG_STREAMS(mt) {
		/* print (and reset) dirty list */
		PrintDirtyList(mt);
	}

	/* print user events */
	if FLAG_MESSAGE(mt) {
		PrintUsrEvt(mt);
	}

	fprintf( file, "%c", end_entry);

	//FIXME only for debugging purposes
	//	fflush( file);
}
Пример #3
0
//=============================================================================
void Amesos_Mumps::Destroy()
{
  if (!NoDestroy_) 
  { 
    // destroy instance of the package
    MDS.job = -2;

    if (Comm().MyPID() < MaxProcs_) dmumps_c(&(MDS));
    
#if 0
    if (IsComputeSchurComplementOK_ && (Comm().MyPID() == 0)
	&& MDS.schur) {
      delete [] MDS.schur;
      MDS.schur = 0;
    }
#endif
    
#ifdef HAVE_MPI
    if (MUMPSComm_) 
    {
      MPI_Comm_free( &MUMPSComm_ );
      MUMPSComm_ = 0;
    }
#endif
    
    if( (verbose_ && PrintTiming_) || verbose_ == 2) PrintTiming();
    if( (verbose_ && PrintStatus_) || verbose_ == 2) PrintStatus();
  }
}
Пример #4
0
static void MonCbWorkerWaitStop(mon_worker_t *mon)
{
	if (FLAG_WORKER(mon) || FLAG_LOAD(mon)) {
		LpelTimingEnd(&mon->wait_current);
	}


	if (FLAG_WORKER(mon)) {
		if (FLAG_TIMES(mon)) {
			lpel_timing_t tnow;
			LpelTimingNow(&tnow);
			PrintNormTS(&tnow, mon->outfile);
		}


		// waiting time in second
		//		  fprintf(mon->outfile, "%c %lu.%09lu %c", worker_wait,
		//				(unsigned long) mon->wait_current.tv_sec, (unsigned long)mon->wait_current.tv_nsec, end_entry
		//		);


		/* waiting time in nanosecond */
		fprintf( mon->outfile, "%c", worker_wait);
		PrintTiming( &mon->wait_current, mon->outfile);
		fprintf( mon->outfile, "%c", end_entry);
	}

	if (FLAG_LOAD(mon))
		LpelTimingAdd(&mon->wait_time, &mon->wait_current);

}
Пример #5
0
//=============================================================================
Amesos_Umfpack::~Amesos_Umfpack(void) 
{
  if (Symbolic) umfpack_di_free_symbolic (&Symbolic);
  if (Numeric) umfpack_di_free_numeric (&Numeric);

  // print out some information if required by the user
  if ((verbose_ && PrintTiming_) || verbose_ == 2) PrintTiming();
  if ((verbose_ && PrintStatus_) || verbose_ == 2) PrintStatus();

}
Пример #6
0
//=============================================================================
Amesos_Dscpack::~Amesos_Dscpack(void) 
{
  // MS // print out some information if required by the user
  if( (verbose_ && PrintTiming_) || verbose_ == 2 ) PrintTiming();
  if( (verbose_ && PrintStatus_) || verbose_ == 2 ) PrintStatus();

  if ( MyDscRank>=0 && A_and_LU_built ) { 
    DSC_FreeAll( PrivateDscpackData_->MyDSCObject_ ) ; 
    DSC_Close0( PrivateDscpackData_->MyDSCObject_ ) ; 
  }
  DSC_End( PrivateDscpackData_->MyDSCObject_ ) ; 
}
Пример #7
0
//=============================================================================
Amesos_Scalapack::~Amesos_Scalapack(void) {

  if ( ScaLAPACK1DMap_ ) delete ScaLAPACK1DMap_ ; 
  if ( ScaLAPACK1DMatrix_ ) delete ScaLAPACK1DMatrix_ ; 
  // print out some information if required by the user
  if( (verbose_ && PrintTiming_) || verbose_ == 2 ) PrintTiming();
  if( (verbose_ && PrintStatus_) || verbose_ == 2 ) PrintStatus();

  if( Time_ ) delete Time_;
  if( FatOut_ ) delete FatOut_;
  if( VectorMap_ ) delete VectorMap_;
}
Пример #8
0
//=============================================================================
Amesos_Paraklete::~Amesos_Paraklete(void) {


    if(ParakleteComm_)  {
      MPI_Comm_free(&ParakleteComm_);
      ParakleteComm_ = 0 ; 
    }

  // print out some information if required by the user
  if( (verbose_ && PrintTiming_) || verbose_ == 2 ) PrintTiming();
  if( (verbose_ && PrintStatus_) || verbose_ == 2 ) PrintStatus();
}
Пример #9
0
//=============================================================================
Amesos_Klu::~Amesos_Klu(void) {

  // print out some information if required by the user
  if( (verbose_ && PrintTiming_) || verbose_ == 2 ) PrintTiming();
  if( (verbose_ && PrintStatus_) || verbose_ == 2 ) PrintStatus();
}
Пример #10
0
static void printStatistic(mon_worker_t *mon){
	fprintf(mon->outfile, "WC%dWT", mon->wait_cnt);
	PrintTiming( &mon->wait_time, mon->outfile);

}