Skip to content

sandyhouse/synchronizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages