diff --git a/Grid.h b/Grid.h index caa4ed5e..a0989e0b 100644 --- a/Grid.h +++ b/Grid.h @@ -52,6 +52,7 @@ namespace Grid { void Grid_init(int *argc,char ***argv); + void Grid_finalize(void); double usecond(void); void Grid_sa_signal_handler(int sig,siginfo_t *si,void * ptr); void Grid_debug_handler_init(void); diff --git a/Grid_init.cc b/Grid_init.cc index 3a601209..9e8b8b96 100755 --- a/Grid_init.cc +++ b/Grid_init.cc @@ -23,6 +23,12 @@ void Grid_init(int *argc,char ***argv) #endif Grid_debug_handler_init(); } +void Grid_finalize(void) +{ +#ifdef GRID_COMMS_MPI + MPI_Finalize(); +#endif +} double usecond(void) { struct timeval tv; gettimeofday(&tv,NULL);