IPython并行计算

IPython并行计算教程笔记 - 日记 - 好看簿图片博客:用照片记录生活

视频教程

http://www.osc.edu/cms/sip/bl...

运行计算节点ipcluster

   1 from IPython.kernel import client
   2 mec = client.MultiEngineClient()
   3 w = range(100)
   4 mec.scatter('w', w)
   5 mec.gather('w')
   6 
   7 mec.map(lambda x:x**2, w)
   8 mec.execute('print w')
   9 
  10 mec.push({'z':10})
  11 mec.pull('z')
  12 
  13 def foo(x):
  14     return x*2
  15 
  16 mec.execute('zz=foo(z)')

此日记发布于2009-07-15 16:51:51


反馈

创建 by -- ZoomQuiet [2009-07-16 00:54:26]

MiscItems/2009-07-16 (last edited 2009-12-25 07:09:39 by localhost)