fixed compilation error on very old mpi
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 11 Nov 2008 21:51:51 +0000 (21:51 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 11 Nov 2008 21:51:51 +0000 (21:51 +0000)
src/arch/mpi/machine.c

index 5c1745655fa4b68aa25bfa33fc42ab536f0af366..47947ec6f8f7371cd5baade7c8362277a3ac324f 100644 (file)
@@ -1640,6 +1640,7 @@ static void ConverseRunPE(int everReturn)
 
 static char *thread_level_tostring(int thread_level)
 {
+#if CMK_MPI_INIT_THREAD
   switch (thread_level) {
   case MPI_THREAD_SINGLE:
       return "MPI_THREAD_SINGLE";
@@ -1652,6 +1653,11 @@ static char *thread_level_tostring(int thread_level)
       }
   }
   return  "unknown";
+#else
+  char *str = (char*)malloc(5);
+  sprintf(str,"%d", thread_level);
+  return str;
+#endif
 }
 
 void ConverseInit(int argc, char **argv, CmiStartFn fn, int usched, int initret)