Adding stack trace to BlobAnalyzeParallel
This commit is contained in:
parent
90e0124667
commit
623fada1d2
@ -179,8 +179,12 @@ void term_func()
|
|||||||
static void setTerminateErrorHandler()
|
static void setTerminateErrorHandler()
|
||||||
{
|
{
|
||||||
std::set_terminate( term_func );
|
std::set_terminate( term_func );
|
||||||
signal(SIGSEGV,&term_func_abort);
|
|
||||||
signal(SIGABRT,&term_func_abort);
|
signal(SIGABRT,&term_func_abort);
|
||||||
|
signal(SIGFPE,&term_func_abort);
|
||||||
|
signal(SIGILL,&term_func_abort);
|
||||||
|
signal(SIGINT,&term_func_abort);
|
||||||
|
signal(SIGSEGV,&term_func_abort);
|
||||||
|
signal(SIGTERM,&term_func_abort);
|
||||||
}
|
}
|
||||||
void Utilities::setErrorHandlers()
|
void Utilities::setErrorHandlers()
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
`// Sequential blob analysis
|
// Sequential blob analysis
|
||||||
// Reads parallel simulation data and performs connectivity analysis
|
// Reads parallel simulation data and performs connectivity analysis
|
||||||
// and averaging on a blob-by-blob basis
|
// and averaging on a blob-by-blob basis
|
||||||
// James E. McClure 2014
|
// James E. McClure 2014
|
||||||
@ -104,12 +104,12 @@ int main(int argc, char **argv)
|
|||||||
MPI_Init(&argc,&argv);
|
MPI_Init(&argc,&argv);
|
||||||
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
|
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
|
||||||
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
|
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
|
||||||
#ifdef PROFILE
|
Utilities::setAbortBehavior( true, true, true );
|
||||||
|
Utilities::setErrorHandlers();
|
||||||
PROFILE_ENABLE(0);
|
PROFILE_ENABLE(0);
|
||||||
PROFILE_DISABLE_TRACE();
|
PROFILE_DISABLE_TRACE();
|
||||||
PROFILE_SYNCHRONIZE();
|
PROFILE_SYNCHRONIZE();
|
||||||
PROFILE_START("main");
|
PROFILE_START("main");
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( rank==0 ) {
|
if ( rank==0 ) {
|
||||||
printf("-----------------------------------------------------------\n");
|
printf("-----------------------------------------------------------\n");
|
||||||
@ -477,10 +477,8 @@ int main(int argc, char **argv)
|
|||||||
/*FILE *BLOBS = fopen("Blobs.dat","wb");
|
/*FILE *BLOBS = fopen("Blobs.dat","wb");
|
||||||
fwrite(GlobalBlobID.get(),4,Nx*Ny*Nz,BLOBS);
|
fwrite(GlobalBlobID.get(),4,Nx*Ny*Nz,BLOBS);
|
||||||
fclose(BLOBS);*/
|
fclose(BLOBS);*/
|
||||||
#ifdef PROFILE
|
|
||||||
PROFILE_STOP("main");
|
PROFILE_STOP("main");
|
||||||
PROFILE_SAVE("BlobIdentifyParallel",false);
|
PROFILE_SAVE("BlobIdentifyParallel",false);
|
||||||
#endif
|
|
||||||
MPI_Barrier(MPI_COMM_WORLD);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user