init maxfiles to number of physnodes
[charm.git] / examples / charm++ / pupDisk / pupDisk.C
index 40b4163ea2afdbdadf0aa222db3f62be519fb0f3..47ee3397e46dc16de760c0e62a1b2e30c351d365 100644 (file)
@@ -21,6 +21,10 @@ main::main(CkArgMsg *m)
   int size=20;
   bool skipToRead=false;
   int maxFiles=CkNumPes();
+  if(CmiCpuTopologyEnabled())
+    {
+      maxFiles=CmiNumPhysicalNodes();
+    }
   if(m->argc>1)
     numElements=atoi(m->argv[1]);
   if(m->argc>2)