Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running abyfloat_test.exe #83

Closed
Cestlaviez opened this issue Aug 22, 2018 · 6 comments
Closed

Error when running abyfloat_test.exe #83

Cestlaviez opened this issue Aug 22, 2018 · 6 comments

Comments

@Cestlaviez
Copy link

When I try to run abyfloat_test.exe from two terminals, I got an error.

~/ABY/build/bin$ ./abyfloat_test -r 0 -x 1.0 -y 2.1
double input values: 1.000 ; 2.100
Error: Unable to open circuit file circ/fp_nostatus_add_64.aby
Complexities: 
Boolean Sharing: ANDs: 0 (1-bit) ; Depth: 1
Total Vec AND: 0
Total Non-Vec AND: 0
XOR vals: 0 gates: 0
Comb gates: 0, CombStruct gates: 0, Perm gates: 0, Subset gates: 0, Split gates: 0
Yao: ANDs: 0 ; Depth: 0
Reverse Yao: ANDs: 0 ; Depth: 0
Arithmetic Sharing: MULs: 0 ; Depth: 0
SP-LUT Sharing: OT-gates: Total OT gates = 0; Depth: 1
Total number of gates: 128 Total depth: 1
Timings: 
Total =		0.493 ms
Init =		0.131 ms
CircuitGen =	0.033 ms
Network =	9498.035 ms
BaseOTs =	232.259 ms
Setup =		0.178 ms
OTExtension =	0.150 ms
Garbling =	0.000 ms
Online =	0.315 ms

Segmentation fault (core dumped)

There is an error "Error: Unable to open circuit file circ/fp_nostatus_add_64.aby".
When I check the file, there isn't such a file. What is this file?

@lenerd
Copy link
Collaborator

lenerd commented Aug 22, 2018

Hi,
you are looking for this file containing the description of a floating point addition circuit. If you copy/link the bin/circ directory into the working directory of the application, it should work.

Unfortunately, the path is hardcoded and there is currently no runtime option to change it.

@Cestlaviez
Copy link
Author

Hi,
Thanks. I found it and it work.
Btw, do you know the definition of the files under the bin/circ directory? I am trying to use fp_nostatus_cmp_64.aby to do cmp, but the result is 0 no matter what I input.

@lenerd
Copy link
Collaborator

lenerd commented Aug 23, 2018

I cannot help you with these circuits. Maybe you can find the information here or in the corresponding paper

@dd23
Copy link
Member

dd23 commented Aug 26, 2018

The fp_nostatus_cmp_64.aby should get two FP inputs, similar to the addition gate in the float example.
The result is a single bit that indicates if one value a is bigger than the other b. I have to test if 1 means a>b or a<b and how a==b is handled.
I haven't used the FP circuits in a while, so I'm not 100% sure on the current status.

@Cestlaviez
Copy link
Author

Thanks, I have tested other functions in FP circuits. They can work except function CMP.
Thus, I am wondering if someone have tested it successfully.

@dd23
Copy link
Member

dd23 commented May 17, 2019

I have added some example code to the float example in 8aa003c

The CMP works as intended.
CMP(a,b) returns
1 if a>b
0 if a==b
0 if a<b

Please check if this works for you and if so, please close this issue.

@dd23 dd23 closed this as completed Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants