making +printTopo write to a file
authorNikhil Jain <nikhil@illinois.edu>
Tue, 17 Apr 2012 19:15:38 +0000 (14:15 -0500)
committerNikhil Jain <nikhil@illinois.edu>
Tue, 17 Apr 2012 19:15:38 +0000 (14:15 -0500)
src/ck-core/init.C

index 41400042445ca91b29ed31f03e2e287cd35e10f3..bf1bec47f75f743b82f731eb840f4e258a36ec5d 100644 (file)
@@ -1255,7 +1255,10 @@ void _initCharm(int unused_argc, char **argv)
        if(CmiMyPe() == 0) {
             if(CmiGetArgFlag(argv, "+printTopo")) {
                TopoManager tmgr;
        if(CmiMyPe() == 0) {
             if(CmiGetArgFlag(argv, "+printTopo")) {
                TopoManager tmgr;
-               tmgr.printAllocation(stdout);
+    FILE *fp;
+    fp = fopen("topologyInfo.txt", "w");
+    if (fp == NULL) fp = stderr;
+               tmgr.printAllocation(fp);
            }
        }
 
            }
        }