pympipool 0.0.2
pip install pympipool==0.0.2
Released:
pympipool - scale functions over multiple compute nodes using mpi4py
Navigation
Unverified details
These details have not been verified by PyPIProject links
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
Project description
pympipool
Scale functions over multiple compute nodes using mpi4py
Write a python test file like pool.py
:
from pympipool import Pool
def calc(i):
import numpy as np
return np.array(i ** 2)
with Pool(cores=2) as p:
print(p.map(function=calc, lst=[1, 2, 3, 4]))
You can execute the python file pool.py
in a serial python process:
python pool.py
>>> [array(1), array(4), array(9), array(16)]
Internally pympipool
uses mpi4py
to distribute the 4 calculation to two processors cores=2
.
Alternatively, you can copy all lines to a jupyter notebook
or an ipython
shell and execute them directly. But this does not work with a regular python shell.
Project details
Unverified details
These details have not been verified by PyPIProject links
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pympipool-0.0.2.tar.gz
.
File metadata
- Download URL: pympipool-0.0.2.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63bee9f934b460e574d990bd39822d6b7185e8857a2f7a99c46ab52c9dd49c98 |
|
MD5 | 59abf4e85f70811c309cac43d6aff4bf |
|
BLAKE2b-256 | ba1a50489c3ddf9c3d0c09d31109567c69fa3dca3105fbc1bcf6e984dee556a4 |
File details
Details for the file pympipool-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pympipool-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d67535ff6258f2d027460db7bf93c42edc7b49f4d901f4e8de9282b667a5927 |
|
MD5 | 7739a09891c256c9be23d9f40a1fd7c9 |
|
BLAKE2b-256 | 9a8c2a52e97fdf602719163e05e2900fa2cee80b2ec5a075fe74cfc4c1d5ac2c |