コード例 #1
0
def compute():
  for i in range(nhost):
    pc.submit(f, i)
  den = numpy.zeros(matrank)
  while(pc.working()):
    den += pc.pyret()  
  return den
コード例 #2
0
def f(ii):
  i = int(ii)
  density = numpy.zeros(matrank)
  for gid in range(i , params.Nmitral, nhost):
    m = mkmitral.mkmitral(gid)
    for sec in m.secdens:
      accumulate_density(sec, density, domain)
    print gid
  return density