def Finalize(self): if self.tracefile != None: VisItCloseTraceFile() VisItDisconnect() mpicom.finalize()
def Finalize(self): Simulation.Finalize(self) mpicom.finalize()
if other.name == self.name and other.age == self.age: return 0 else: return 1 # create instance of Person class to send cyrus = Person("Cyrus",29) # test broadcast of python object if rank == 0: test("broadcast",mpicom.broadcast(cyrus),None) else: test("broadcast",mpicom.broadcast(),cyrus) # test send/recv with python object if sz > 1: cyrus.age = 30 if rank == 0: test("send",mpicom.send(cyrus,1),None) elif rank == 1: test("recv",mpicom.recv(0),cyrus) # shutdown mpi mpicom.finalize() # report any failures if failures == 0: print "%d:All Tests Passed" % rank else: print "%d:# of Failures = %d" % (rank,failures)
return 0 else: return 1 # create instance of Person class to send cyrus = Person("Cyrus", 29) # test broadcast of python object if rank == 0: test("broadcast", mpicom.broadcast(cyrus), None) else: test("broadcast", mpicom.broadcast(), cyrus) # test send/recv with python object if sz > 1: cyrus.age = 30 if rank == 0: test("send", mpicom.send(cyrus, 1), None) elif rank == 1: test("recv", mpicom.recv(0), cyrus) # shutdown mpi mpicom.finalize() # report any failures if failures == 0: print "%d:All Tests Passed" % rank else: print "%d:# of Failures = %d" % (rank, failures)