Esempio n. 1
0
 def testWTick(self):
     tick = MPI.Wtick()
     self.assertTrue(type(tick) is float)
     self.assertTrue(tick > 0.0)
Esempio n. 2
0
# mpi4py module
from mpi4py import MPI

from math import log as log
from math import exp as exp
# Initialize MPI and print out hello
comm = MPI.COMM_WORLD
myid = comm.Get_rank()
numprocs = comm.Get_size()
myname = MPI.Get_processor_name()
ver = MPI.Get_library_version()
#TIMER=MPI.Wtick
t1 = TIMER()
t2 = TIMER()

print(myid, myname, ver, MPI.Wtick(), t2 - t1)
buffer = np.zeros(BUFSIZE, dtype="a")
tag = 1234
step = 4
logs = log(step)
total = np.zeros(20)
count = np.zeros(20, dtype="int")
maxtime = np.zeros(20)
mintime = np.zeros(20)

try:
    f = open("BSIZE", "r")
    dat = f.readlines()
    BSIZE = int(dat[0])
except:
    pass