def testLocate(self): for owner in range(MPI.COMM_WORLD.size - 1): if pmi.isController: res = collectives.locateItem((owner == MPI.COMM_WORLD.rank)) self.assertEqual(res, owner) else: collectives.locateItem((owner == MPI.COMM_WORLD.rank))
def testLocate(self): for owner in xrange(MPI.COMM_WORLD.size - 1): if pmi.isController: res = collectives.locateItem((owner == MPI.COMM_WORLD.rank)) self.assertEqual(res, owner) else: collectives.locateItem((owner == MPI.COMM_WORLD.rank))
def testLocateTwo(self): if MPI.COMM_WORLD.size >= 2: if pmi.isController: self.assertRaises(RuntimeError, collectives.locateItem, True) else: collectives.locateItem(True)
def testLocateNoOne(self): if pmi.isController: self.assertRaises(IndexError, collectives.locateItem, False) else: collectives.locateItem(False)