Parallel Python——一個簡單的分散式運算系統

來源:互聯網
上載者:User

標籤:

如何建立一個高速的分散式運算平台?Parallel python此目的。


Parallel Python(http://www.parallelpython.com/content/view/15/30/#QUICKCLUSTERS)是Python進行分散式運算的開源模組。可以將計算壓力分布到多核CPU或叢集的多台電腦上。可以很方便的在內網中搭建一個自組織的分散式運算平台。

在不同節點執行server程式,並自己主動發現執行server的節點。命令例如以下:

    node-1> ./ppserver.py -a

    node-2> ./ppserver.py -a

    node-3> ./ppserver.py -a

client

    import pp

    ppservers=("*",)  #自己主動發現模式

    job_server = pp.Server(ppservers=ppservers) 

   提交啟動並執行任務

    f1 = job_server.submit(func1, args1, depfuncs1, modules1)

    f2 = job_server.submit(func1, args2, depfuncs1, modules1)

    f3 = job_server.submit(func2, args3, depfuncs2, modules2) 

    檢索結果

    r1 = f1()

    r2 = f2()

    r3 = f3() 


著作權聲明:本文部落格原創文章,部落格,未經同意,不得轉載。

Parallel Python——一個簡單的分散式運算系統

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.