Parallel Computing Tools
Project description
Parallel Computing Tools (This is a tool to achieve clear and safe management of memory and other resources by separating parallel computations in units of files.)
並列計算ツール (ファイルの単位で並列計算を実施することで、メモリ等の管理を明快かつ安全に実現するツールです。)
This description is under construction.
マスター側
from mult import master
input_ls = [i for i in range(10)]
output_ls = master.call(
"path_to_slave/slave.py", # スレーブファイル名
input_ls, # 入力のリスト (ジョブごと)
n = 4, # 並列数
job_order = "ordered", # ジョブ実行順序 (random, ordered)
progress = True # 進捗表示
)
print(output_ls) # 結果の確認
スレーブ側 (slave.py)
import time, random
from mult import slave
# 実行したい処理
def heavy_process(num):
time.sleep(random.random()*3)
return 2**num
num = slave.get_input()
result = heavy_process(num)
slave.send_output(result)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mult-1.0.0.tar.gz
(5.1 kB
view details)
Built Distribution
mult-1.0.0-py3-none-any.whl
(7.0 kB
view details)
File details
Details for the file mult-1.0.0.tar.gz
.
File metadata
- Download URL: mult-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79efa28dbeaefef0c76dba82be2a718a5a8249b4271ba6f3728b743a4c776ac2 |
|
MD5 | 3272256c7de87e297471fa6b58cb796a |
|
BLAKE2b-256 | e6f49b2286601fa809bc23586f77b986a986a87d386292d2d711cd8d2a0b8093 |
File details
Details for the file mult-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: mult-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9f4d717caa3e357d3ce0e0b06bc9087d31f316ac0d1a9953eb798192759d26 |
|
MD5 | 2830c3de5cc73c65a5a676a85baf1e42 |
|
BLAKE2b-256 | 50dcaa972e7837356aa5d3b688ccf63fbf3774e6517525adbb261125bfcde695 |