CVS info : $Header$ Cactus Code Thorn MPIClock Thorn Author(s) : Cactus Maintainers Thorn Maintainer(s) : Cactus Maintainers -------------------------------------------------------------------------- Purpose of the thorn: Provide Cactus with a timer based on the high resolution, and possibly synchronised, MPI_Wtime function. Problems: segfault on shutdown in some implementations of MPI. Reason is that Cactus stops MPI, then calls the timer's Stop function, which is not kosher. Tried checking whether MPI had been initialized with MPI_Initialized, but it seems this is not set to false when MPI_Finalize is called. What else? Check if in CCTK_SHUTDOWN? Erik Schnetter, 2006-06-11: No (non-trivial) code should be executed after MPI_Finalize is called. Cactus violates this by calling CCTK_SchedulePrintTimes after the driver has shut down. I see two solution: (1), call this function earlier, or (2), call MPI_Finalize from the flesh, not from the driver.