Exemplo n.º 1
0
void Extrae_fini_last_chance_Wrapper (void)
{
	/* Finalize independently from who did the initialization ! */
	if (Extrae_is_initialized_Wrapper() != EXTRAE_NOT_INITIALIZED)
	{

		if (Extrae_is_initialized_Wrapper() == EXTRAE_INITIALIZED_MPI_INIT)
			fprintf (stderr, PACKAGE_NAME": Warning! MPI task %d application did not terminate using MPI_Finalize! Review your application code.\n", TASKID);

		/* If the application is MPI the MPI wrappers are responsible
		   for gathering and generating the .MPITS file*/
		if (!Extrae_get_ApplicationIsMPI() && !Extrae_get_ApplicationIsSHMEM())
			Generate_Task_File_List();

		/* Finalize tracing library */
		Backend_Finalize ();

		/* Call additional code to finalize the task including
		MPI_Finalize, ... */
		Extrae_finalize_task();
	}
}
Exemplo n.º 2
0
void Extrae_init_Wrapper (void)
{
	/* Do not initialize if it's already initialized */
	if (Extrae_is_initialized_Wrapper() == EXTRAE_NOT_INITIALIZED)
	{
		/* Actually initialize the tracing */
		Extrae_init_tracing(FALSE);
	}
	else
	{
		char *previous = "Unknown";
		if (Extrae_is_initialized_Wrapper() == EXTRAE_INITIALIZED_EXTRAE_INIT)
			previous = "API";
		else if (Extrae_is_initialized_Wrapper() == EXTRAE_INITIALIZED_MPI_INIT)
			previous = "MPI";
		else if (Extrae_is_initialized_Wrapper() == EXTRAE_INITIALIZED_SHMEM_INIT)
			previous = "SHMEM";

		fprintf (stderr, PACKAGE_NAME": Warning! API tries to initialize more than once\n");
		fprintf (stderr, PACKAGE_NAME":          Previous initialization was done by %s\n", previous);
	}
}
Exemplo n.º 3
0
void Extrae_fini_Wrapper (void)
{
	/* Finalize only if its initialized by Extrae_init call */
	if (Extrae_is_initialized_Wrapper() == EXTRAE_INITIALIZED_EXTRAE_INIT)
	{
		/* If the application is MPI the MPI wrappers are responsible
		   for gathering and generating the .MPITS file*/
		if (!Extrae_get_ApplicationIsMPI() && !Extrae_get_ApplicationIsSHMEM())
			if (getenv ("EXTRAE_APPEND_PID") == NULL)
				Generate_Task_File_List();

		/* Finalize tracing library */
		Backend_Finalize ();

		/* Call additional code to finalize the task including
	     MPI_Finalize,... */
		Extrae_finalize_task();
	}
}
Exemplo n.º 4
0
void extrae_is_initialized (unsigned *res)
{
	*res = Extrae_is_initialized_Wrapper();
}
Exemplo n.º 5
0
extrae_init_type_t Extrae_is_initialized (void)
{
	return Extrae_is_initialized_Wrapper();
}