Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multiprocess_synchronizer-0.0.2rc0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multiprocess_synchronizer-0.0.2rc0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file multiprocess_synchronizer-0.0.2rc0.tar.gz.

File metadata

File hashes

Hashes for multiprocess_synchronizer-0.0.2rc0.tar.gz
Algorithm Hash digest
SHA256 fb4fc527178700a8b3d91e8b3468b6ba781b5b0d70701e51569262123902ec0f
MD5 4d68e536c02c45717cc41e2985a2b7b5
BLAKE2b-256 77854d997ba0123f480c8694a813d4676446a45f417daea0870c2f2946334ad5

See more details on using hashes here.

File details

Details for the file multiprocess_synchronizer-0.0.2rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for multiprocess_synchronizer-0.0.2rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 8831c3158d4e370c5f5058e673d470e4e73031dc8d6d651f3f76d33f1af9d062
MD5 6fa59d45e7da8f272c941c601a2780a8
BLAKE2b-256 c53eb0e45a607b2b5084b054ca923677d8336789d2f5ee29ef1297dc804b5154

See more details on using hashes here.

Supported by

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