Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fortran-smpi was broken
[simgrid.git] / src / smpi / smpi_global.c
index c69a2df..1baf3ea 100644 (file)
@@ -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);