added filename to printTopo
authorYanhua Sun <suny@jaguarpf-login7.ccs.ornl.gov>
Fri, 20 Apr 2012 20:16:42 +0000 (16:16 -0400)
committerYanhua Sun <suny@jaguarpf-login7.ccs.ornl.gov>
Fri, 20 Apr 2012 20:16:42 +0000 (16:16 -0400)
src/ck-core/init.C

index feaf730827f50d721466d2a198b46cdb8f76bf7b..07c331d62f1f2d50eaf3302ee2c5bac7f2b6fbeb 100644 (file)
@@ -1253,10 +1253,11 @@ void _initCharm(int unused_argc, char **argv)
     }
 
        if(CmiMyPe() == 0) {
-            if(CmiGetArgFlag(argv, "+printTopo")) {
+        char *topoFilename;
+            if(CmiGetArgStringDesc(argv,"+printTopo",&topoFilename,"topo file name")) {
                TopoManager tmgr;
     FILE *fp;
-    fp = fopen("topologyInfo.txt", "w");
+    fp = fopen(topoFilename, "w");
     if (fp == NULL) {
       CkPrintf("Error opening topology.Info.txt file, writing to stdout\n");
       fp = stdout;