int xargc; char **xargv; int main(int argc, char **argv) { #ifdef IWAVE_USE_MPI int ts=0; MPI_Init_thread(&argc,&argv,MPI_THREAD_FUNNELED,&ts); #endif try { ::testing::InitGoogleTest(&argc, argv); int res = RUN_ALL_TESTS(); #ifdef IWAVE_USE_MPI MPI_Finalize(); #endif return res; } catch (RVLException & e) { e.write(cerr); #ifdef IWAVE_USE_MPI MPI_Abort(MPI_COMM_WORLD,0); MPI_Finalize(); #endif exit(1); } }