Beispiel #1
0
    if rank > 0:
        return
    b = avgp[0] / maxp[0]
    print 'Load Balance = %g' % b
    print '\n     ',
    for i in header:
        print '%12s' % i,
    print '\n avg ',
    for i in avgp:
        print '%12.2f' % i,
    print '\n max ',
    for i in maxp:
        print '%12.2f' % i,
    print ''


if __name__ == '__main__':
    import common
    import util
    common.nmitral = 1
    common.ncell = 2
    import net_mitral_centric as nmc
    nmc.build_net_roundrobin(getmodel())
    pc.spike_record(-1, spikevec, idvec)
    from odorstim import OdorStim
    from odors import odors
    ods = OdorStim(odors['Apple'])
    ods.setup(nmc.mitrals, 10., 20., 100.)
    prun(200.)
    util.finish()
Beispiel #2
0
  header = ['comp','spk','split','gap']
  for i in p:
    avgp.append(pc.allreduce(i, 1)/nhost)
    maxp.append(pc.allreduce(i, 2))
  if rank > 0:
    return
  b = avgp[0]/maxp[0]
  print 'Load Balance = %g'% b
  print '\n     ',
  for i in header: print '%12s'%i,
  print '\n avg ',
  for i in avgp: print '%12.2f'%i,
  print '\n max ',
  for i in maxp: print '%12.2f'%i,
  print ''
 
if __name__ == '__main__':
  import common
  import util
  common.nmitral = 1
  common.ncell = 2
  import net_mitral_centric as nmc
  nmc.build_net_roundrobin(getmodel())
  pc.spike_record(-1, spikevec, idvec)
  from odorstim import OdorStim
  from odors import odors
  ods = OdorStim(odors['Apple'])
  ods.setup(nmc.mitrals, 10., 20., 100.)
  prun(200.)
  util.finish()