def communicate_init(worker_num, worker_id, source_ip, target_ip):
    global lib_communicate
    curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
    lib_path = os.path.join(curr_path, '../../build/lib/')
    path_to_so_file = os.path.join(lib_path, 'lib_communication.so')
    lib_communicate = ctypes.cdll.LoadLibrary(path_to_so_file)
    lib_communicate.DL_Connect_Init(worker_num, worker_id, source_ip, target_ip)
def communicate_init(worker_num, worker_id, source_ip, target_ip):
    global lib_communicate
    curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
    lib_path = os.path.join(curr_path, '../../build/lib/')
    path_to_so_file = os.path.join(lib_path, 'lib_communication.so')
    lib_communicate = ctypes.cdll.LoadLibrary(path_to_so_file)
    lib_communicate.DL_Connect_Init(worker_num, worker_id, source_ip, target_ip)