refine failure generator
[charm.git] / src / ck-core / init.C
index fa7fc13d5fbbc25314c856d565b6e08e0e4adcf8..5c8cb718cfcef529869248ba13af21fcd1d8b705 100644 (file)
@@ -282,7 +282,7 @@ static inline void _parseCommandLineOpts(char **argv)
       //do not read the killfile if this is a restarting processor
       killFlag = 1;
       if(CmiMyPe() == 0){
-        printf("[%d] killFlag set to 1 for file %s\n",CkMyPe(),killFile);
+        CmiPrintf("[%d] killFlag set to 1 for file %s\n",CkMyPe(),killFile);
       }
     }
   }
@@ -291,14 +291,14 @@ static inline void _parseCommandLineOpts(char **argv)
   if(CmiGetArgStringDesc(argv,"+failureInject", &failureDist,"Runtime system injects failure")){
     if (CmiGetArgIntDesc(argv,"+MTBF",&MTBF,"Mean time between failures")){
       if(CmiMyPe()==0)
-        printf("Mean time between hard failures is %d\n",MTBF);
+        CmiPrintf("Mean time between hard failures is %d\n",MTBF);
       killFlag = 2;
       if(strcmp(failureDist, "E")==0){
         if(CmiMyPe()==0)
-          printf("Runtime system generates faiures according to exponential distribution\n");
+          CmiPrintf("Runtime system generates faiures according to exponential distribution\n");
       }else if(strcmp(failureDist, "W")==0){
         if(CmiMyPe()==0)
-          printf("Runtime system generates faiures according to weibull distribution\n");
+          CmiPrintf("Runtime system generates faiures according to weibull distribution\n");
         if(!CmiGetArgDoubleDesc(argv,"+shape",&beta,"shape parameter for Weibull distribution")){
           if(CmiMyPe()==0)
             CmiAbort("should provide shape parameter for Weibull distribution");
@@ -318,7 +318,7 @@ static inline void _parseCommandLineOpts(char **argv)
       }
       if (CmiGetArgIntDesc(argv,"+SMTBF",&SMTBF,"Mean time between failures")){
         if(CmiMyPe()==0)
-          printf("Mean time between soft failures is %d\n",SMTBF);
+          CmiPrintf("Mean time between soft failures is %d\n",SMTBF);
         if(strcmp(failureDist,"W")==0){
           s_alpha = SMTBF/tgammaf(1+1/beta);
         }