You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing intermittent issues with the hemi-party.x tool when running a two-party computation task. Here's the algorithm from the demo.mpc file:
n_threads = 8
value_type = sfix
sfix.set_precision(16, 47)
SOURCE0 = 0
source0_record_count = 5
source0_column_count = 1
source0_record = Matrix(source0_record_count, source0_column_count, value_type)
SOURCE1 = 1
source1_record_count = 5
source1_column_count = 1
source1_record = Matrix(source1_record_count, source1_column_count, value_type)
result_record = 5
results = Matrix(result_record, 1, value_type)
def read_data_collection(data_collection, party_id):
if data_collection.sizes[0] > 0:
data_collection.input_from(party_id)
def calculate_result_0():
@for_range_opt_multithread(n_threads, result_record)
def _(i):
results[i][0] = 2*source0_record[i][0]*source1_record[i][0]
def print_results():
result_fields = ['result0']
set_display_field_names(result_fields)
@for_range_opt(result_record)
def _(i):
result_values = [results[i][0].reveal()]
display_data(result_values)
def set_display_field_names(name_list):
for name in name_list:
if " " in name:
raise TypeError(
'Space cannot be in title list, found type error', name)
println("result_fields = %s", ' '.join(name_list))
def display_data(field_values):
printfmt("result_values =")
for value in field_values:
printfmt(" %s", value)
println()
def do_main():
read_data_collection(source0_record, SOURCE0)
read_data_collection(source1_record, SOURCE1)
calculate_result_0()
print_results()
do_main()
The datasets are as follows:
Dataset for Input-P0-0:
Default bit length: 128
Default security parameter: 40
Compiling file Programs/Source/demo.mpc
WARNING: Order of memory instructions not preserved, errors possible
Writing to Programs/Bytecode/demo-multithread1-1.bc
Writing to Programs/Schedules/demo.sch
Writing to Programs/Bytecode/demo-0.bc
Hash: 3660d1e58f65a134475fd06465b646c490689185f5a254e3281427f22e646ce9
Program requires at most:
5 integer inputs from player 0
5 integer inputs from player 1
10 integer opens
5 integer triples
515 integer bits
12 virtual machine rounds
Using security parameter 40
result_fields = result0
result_values = 20
result_values = 80
result_values = 180
result_values = 320
result_values = 500
However, when running multiple times, I occasionally encounter a floating point exception error and fail to obtain the correct results. The error message is as follows:
Default bit length: 128
Default security parameter: 40
Compiling file Programs/Source/9899936497281030-SQL.mpc
WARNING: Order of memory instructions not preserved, errors possible
Writing to Programs/Bytecode/9899936497281030-SQL-multithread1-1.bc
Writing to Programs/Schedules/9899936497281030-SQL.sch
Writing to Programs/Bytecode/9899936497281030-SQL-0.bc
Hash: 3660d1e58f65a134475fd06465b646c490689185f5a254e3281427f22e646ce9
Program requires at most:
5 integer inputs from player 0
5 integer inputs from player 1
10 integer opens
5 integer triples
515 integer bits
12 virtual machine rounds
Using security parameter 40
[1] 14603 floating point exception /root/sit/code/MP-SPDZ-SGD/hemi-party.x 1 9899936497281030-SQL -h 192.168.0.1
Hello,
I'm experiencing intermittent issues with the hemi-party.x tool when running a two-party computation task. Here's the algorithm from the demo.mpc file:
The datasets are as follows:
Dataset for Input-P0-0:
Dataset for Input-P1-0:
The commands for running and compiling are:
The correct output should look like this:
However, when running multiple times, I occasionally encounter a floating point exception error and fail to obtain the correct results. The error message is as follows:
The code commit I am using is:
Could you please advise on how to resolve this issue?
The text was updated successfully, but these errors were encountered: