A library to synchronize multiple processes in a distributed system.
Project description
Synchronizer
This is a synchronization library used to synchronize multiple processes in distributed systems.
Install
You can install this package with pip using the following command:
pip install multiprocess-synchronizer
Usage
from synchronizer import FileSystemSynchronizer
from multiprocessing import Process
def main(num_processes):
fs_sync = FileSystemSynchronizer('test', rank, world_size)
fs_sync.barrier()
if __name__ == "__main__":
main()
FileSystemSynchronizer
FileSystemSynchronizer(shared_dir, rank, world_size)
Parameters:
- shared_dir: A directory on a shared file system that can be accessed by all processes; this directory must be empty.
- rank: Rank id of the current process.
- world_size: Total number of processes.
shell
You can also use the synchronizer command:
synchronizer --shared_dir dir --rank 0 --num_processes 1
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multiprocess_synchronizer-0.0.2rc0.tar.gz.
File metadata
- Download URL: multiprocess_synchronizer-0.0.2rc0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb4fc527178700a8b3d91e8b3468b6ba781b5b0d70701e51569262123902ec0f
|
|
| MD5 |
4d68e536c02c45717cc41e2985a2b7b5
|
|
| BLAKE2b-256 |
77854d997ba0123f480c8694a813d4676446a45f417daea0870c2f2946334ad5
|
File details
Details for the file multiprocess_synchronizer-0.0.2rc0-py3-none-any.whl.
File metadata
- Download URL: multiprocess_synchronizer-0.0.2rc0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8831c3158d4e370c5f5058e673d470e4e73031dc8d6d651f3f76d33f1af9d062
|
|
| MD5 |
6fa59d45e7da8f272c941c601a2780a8
|
|
| BLAKE2b-256 |
c53eb0e45a607b2b5084b054ca923677d8336789d2f5ee29ef1297dc804b5154
|