added printing out the description of the error number when creating the sts file
authorChao Mei <chaomei2@illinois.edu>
Mon, 23 May 2011 21:31:37 +0000 (16:31 -0500)
committerChao Mei <chaomei2@illinois.edu>
Mon, 23 May 2011 21:31:37 +0000 (16:31 -0500)
src/ck-perf/trace-projections.C

index 434b48b9eaaa96e11b539bbb19728058aacd0028..5e1cff58157c61eb0889e2cd8256d04c93da4543 100644 (file)
@@ -372,8 +372,10 @@ void LogPool::createSts(const char *fix)
     {
       stsfp = fopen(fname, "w");
     } while (!stsfp && (errno == EINTR || errno == EMFILE));
-  if(stsfp==0)
-    CmiAbort("Cannot open projections sts file for writing.\n");
+  if(stsfp==0){
+    CmiPrintf("Cannot open projections sts file for writing due to %s\n", strerror(errno));
+    CmiAbort("Error!!\n");
+  }
   delete[] fname;
 }