X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/35b2bd8caf5cc05258414666d9577b39a259cfbd..187ba0c05f9fbe51175179b9f637b6554f947468:/src/smpi/smpi_global.c diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index c69a2df67f..4ee0b812e9 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -35,6 +35,10 @@ static int process_count = 0; MPI_Comm MPI_COMM_WORLD = MPI_COMM_NULL; +MPI_Errhandler* MPI_ERRORS_RETURN = NULL; +MPI_Errhandler* MPI_ERRORS_ARE_FATAL = NULL; +MPI_Errhandler* MPI_ERRHANDLER_NULL = NULL; + #define MAILBOX_NAME_MAXLEN (5 + sizeof(int) * 2 + 1) static char* get_mailbox_name(char* str, int index) { @@ -282,16 +286,24 @@ void smpi_global_destroy(void) /* Fortran specific stuff */ /* With smpicc, the following weak symbols are used */ /* With smpiff, the following weak symbols are replaced by those in libf2c */ + +int __attribute__((weak)) xargc; +char** __attribute__((weak)) xargv; + int __attribute__((weak)) smpi_simulated_main(int argc, char** argv) { xbt_die("Should not be in this smpi_simulated_main"); return 1; } int __attribute__((weak)) main(int argc, char** argv) { - return MAIN__(smpi_simulated_main,argc,argv); + return smpi_main(smpi_simulated_main,argc,argv); } -int MAIN__(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]) +int __attribute__((weak)) MAIN__(){ + return smpi_main(smpi_simulated_main,xargc, xargv); +}; + +int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]) { srand(SMPI_RAND_SEED); @@ -337,7 +349,7 @@ int MAIN__(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]) fflush(stderr); if (MC_is_active()) - MC_modelcheck(); + MC_modelcheck_safety(); else SIMIX_run();