Skip to main content

Parallel Computing Tools

Project description

This description is under construction.

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.)

並列計算ツール (ファイルの単位で並列計算を実施することで、メモリ等の管理を明快かつ安全に実現するツールです。)

  • pythonの並列処理はメモリ管理がよくわからん (不安な気持ちになる)
  • そこで、いっそのことファイルごと別プロセスで立ち上げるような並列処理を考えた

マスター側

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.4.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

mult-1.0.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file mult-1.0.4.tar.gz.

File metadata

  • Download URL: mult-1.0.4.tar.gz
  • Upload date:
  • Size: 5.4 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

Hashes for mult-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d5f4a9240f6c8a6706802ef5047b38c1620b6963fa0c73499469083b59629f44
MD5 59b4bea8bac1e40cf99317209216d8bd
BLAKE2b-256 8810650a1841a19cd41fddd8c7d5145e8a3efc0b28c00f26b0fb60c3e7bd5445

See more details on using hashes here.

File details

Details for the file mult-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: mult-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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

Hashes for mult-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ee18b89a079871213132302808e91796652fb99c4171b5acf665ce53fd21fc
MD5 27d1ef15835e7d997a60594be4e45d55
BLAKE2b-256 7f1be0ad44f416f55155e91d760c50a730cfea84bc40e232bbaba7af5aa17c6a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page