init maxfiles to number of physnodes
authorEric Bohm <ebohm@illinois.edu>
Wed, 8 Feb 2012 18:53:37 +0000 (12:53 -0600)
committerEric Bohm <ebohm@illinois.edu>
Wed, 8 Feb 2012 18:53:37 +0000 (12:53 -0600)
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)