コード例 #1
0
ファイル: mpe-log.c プロジェクト: Andy-Sun/VTK
static int PyMPELog_Init(void)
{
  int ierr = 0;
#if HAVE_MPE
  if (MPE_Initialized_logging() != 1)
    ierr = MPE_Init_log();
#endif
  return ierr;
}
コード例 #2
0
ファイル: mpe-log.c プロジェクト: Andy-Sun/VTK
static int PyMPELog_Initialized(void)
{
  int status = 1;
#if HAVE_MPE
  status = MPE_Initialized_logging();
#else
  status = 1;
#endif /* HAVE_MPE */
  return status;
}
コード例 #3
0
ファイル: mpe-log.c プロジェクト: Andy-Sun/VTK
static int PyMPELog_Finish(void)
{
  int ierr = 0;
#if HAVE_MPE
  const char *filename = logFileName;
  if (!filename[0]) filename = "Unknown";
  if (MPE_Initialized_logging() == 1)
    ierr = MPE_Finish_log((char *)filename);
#endif
  return ierr;
}
コード例 #4
0
ファイル: plogmpe.c プロジェクト: Kun-Qu/petsc
/*@C
   PetscLogMPEBegin - Turns on MPE logging of events. This creates large log files 
   and slows the program down.

   Collective over PETSC_COMM_WORLD

   Options Database Keys:
. -log_mpe - Prints extensive log information (for code compiled
             with PETSC_USE_LOG)

   Notes:
   A related routine is PetscLogBegin (with the options key -log), which is 
   intended for production runs since it logs only flop rates and object
   creation (and should not significantly slow the programs).

   Level: advanced

   Concepts: logging^MPE
   Concepts: logging^message passing

.seealso: PetscLogDump(), PetscLogBegin(), PetscLogAllBegin(), PetscLogEventActivate(),
          PetscLogEventDeactivate()
@*/
PetscErrorCode  PetscLogMPEBegin(void)
{
  PetscErrorCode ierr;
  PetscMPIInt    rank;
    
  PetscFunctionBegin;
  /* Do MPE initialization */
  if (!MPE_Initialized_logging()) { /* This function exists in mpich 1.1.2 and higher */
    ierr = PetscInfo(0,"Initializing MPE.\n");CHKERRQ(ierr);
    ierr = MPE_Init_log();CHKERRQ(ierr);
    PetscBeganMPE = PETSC_TRUE;
  } else {
    ierr = PetscInfo(0,"MPE already initialized. Not attempting to reinitialize.\n");CHKERRQ(ierr);
  }
  ierr = MPI_Comm_rank(PETSC_COMM_WORLD,&rank);CHKERRQ(ierr);
  UseMPE = PETSC_TRUE;
  PetscFunctionReturn(0);
}