Converse pingpong multipair: Initialize cpu affinity and topology 83/4283/1
authorNitin Bhat <nbhat4@illinois.edu>
Wed, 20 Jun 2018 13:45:54 +0000 (08:45 -0500)
committerNitin Bhat <nbhat4@illinois.edu>
Wed, 20 Jun 2018 13:45:54 +0000 (08:45 -0500)
Change-Id: Ided446a8b5039825492145c5d243611500b1a292

examples/converse/pingpong/pingpong_multipairs.C

index 3ee7cf12eb28801f827626779bfd1965a98a1957..d331ac08fcf0c7e7f936265b37e4f5cfbd436099 100644 (file)
@@ -147,7 +147,7 @@ CmiHandler node1HandlerFunc(char *msg)
 
 
 //Converse main. Initialize variables and register handlers
-CmiStartFn mymain()
+CmiStartFn mymain(int argc, char *argv[])
 {
     CpvInitialize(int,msgSize);
     CpvInitialize(int,recvNum);
@@ -172,6 +172,13 @@ CmiStartFn mymain()
     CpvInitialize(double,endTime);
     
     int otherPe = CmiMyPe() ^ 1;
+
+    // Set runtime cpuaffinity
+    CmiInitCPUAffinity(argv);
+
+    // Initialize CPU topology
+    CmiInitCPUTopology(argv);
+
     
 #if USE_PERSISTENT
     h = CmiCreatePersistent(otherPe, maxMsgSize+1024);