quarkslab / NFLlib

NTT-based Fast Lattice library
MIT License
165 stars 52 forks source link

Errors in NFLlib Installation #34

Closed lightnesscaster closed 4 years ago

lightnesscaster commented 6 years ago

I followed the steps to install NFLlib (in Ubuntu 18.04), but I'm running into some problems. Everything is fine until I run make test. Then, I get the following result:

95% tests passed, 6 tests failed out of 122

Total Test time (real) = 11.14 sec

The following tests FAILED: 98 - run_nfllib_demo1048576_124_uint64_t_op (Child aborted) 100 - run_nfllib_demo1048576_124_uint64_t_func (Child aborted) 108 - run_nfl_eq1048576_124_uint64_t (Child aborted) 110 - run_nfl_neq1048576_124_uint64_t (Child aborted) 114 - run_poly_p1048576_124_uint64_t (SEGFAULT) 118 - run_poly_mpz1048576_124_uint64_t (SEGFAULT) Errors while running CTest Makefile:97: recipe for target 'test' failed make: *** [test] Error 8

Does anyone know why these tests are failing or what I can do about it?

I've also tried compiling the file nfllib_demo_main_func.cpp. But I get the following errors:

nfllib_demo_main_func.cpp: In function ‘int main()’: nfllib_demo_main_func.cpp:122:14: error: ‘CONFIG’ was not declared in this scope return run(); ^ nfllib_demo_main_func.cpp:122:22: error: no matching function for call to ‘run()’ return run(); ^ nfllib_demo_main_func.cpp:28:5: note: candidate: template<long unsigned int degree, long unsigned int modulus, class T> int run() int run() ^ nfllib_demo_main_func.cpp:28:5: note: template argument deduction/substitution failed: nfllib_demo_main_func.cpp:122:22: error: template argument 1 is invalid return run();

If anyone could help with these issues, I would be very appreciative.

serge-sans-paille commented 6 years ago

Thanks for reproting! I can reproduce the issue with Release build, everything is fine with debug build, investigating...

serge-sans-paille commented 6 years ago

@lightnesscaster can you confirm that setting ulimit -s unlimited before running the test fixes the issue?

tlepoint commented 6 years ago

@serge-sans-paille, I wonder if for this problem of stack size, it would be possible to make those tests optional in cmake and output a warning when they fail?

On Mon, Jul 2, 2018 at 9:07 AM serge-sans-paille notifications@github.com wrote:

@lightnesscaster https://github.com/lightnesscaster can you confirm that setting ulimit -s unlimited before running the test fixes the issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/quarkslab/NFLlib/issues/34#issuecomment-401798251, or mute the thread https://github.com/notifications/unsubscribe-auth/ABSH3r3gh_yFAoC5hCb2cioeN8joNnE1ks5uChsqgaJpZM4U8HYq .

serge-sans-paille commented 6 years ago

@tlepoint if @lightnesscaster confirms the issue, i'll do it so!

lightnesscaster commented 6 years ago

Thanks for looking into this! I ran ulimit -s unlimited, but I'm still getting three errors. Is there something else I need to do? Also, I am still getting the same errors when trying to run nfllib_demo_main_func

98% tests passed, 3 tests failed out of 122

Total Test time (real) = 27.66 sec

The following tests FAILED: 98 - run_nfllib_demo1048576_124_uint64_t_op (Child killed) 108 - run_nfl_eq1048576_124_uint64_t (Child aborted) 110 - run_nfl_neq1048576_124_uint64_t (Child aborted) Errors while running CTest Makefile:97: recipe for target 'test' failed make: *** [test] Error 8

aguinet commented 6 years ago

I think the issue is that some tests allocates big objects on the stack, instead of allocating them. I'll try and look into fixing this properly this week!

lightnesscaster commented 6 years ago

Has anybody made any progress on this? I would still like to be able to work with this library. Does anyone have any idea what is causing the demo errors?

carlosaguilarmelchor commented 6 years ago

@aguinet any news on this fix ? :)

georgiagn commented 5 years ago

Hello,

is the current commit working? For me, 56 tests failed out of 122 even after running ulimit -s unlimited.

Thanks, Georgia

Kirija commented 5 years ago

With the current commit, on a cluster on which I cannot perform a ulimit -s unlimited, only 3 tests fail with a segfault :

98% tests passed, 3 tests failed out of 122 Total Test time (real) = 229.97 sec The following tests FAILED: 98 - run_nfllib_demo1048576_124_uint64_t_op (SEGFAULT) 114 - run_poly_p1048576_124_uint64_t (SEGFAULT) 118 - run_poly_mpz1048576_124_uint64_t (SEGFAULT)

carlosaguilarmelchor commented 5 years ago

@serge-sans-paille @aguinet this is not my domain of expertise, can you make a fix in, say, one week ? If not I'll handle the issue myself but probably won't respect the coding standards you have.

georgiagn commented 5 years ago

My problem are not segfaults. For both Release and Debug, I'm getting the following output of make test:

50% tests passed, 61 tests failed out of 122
Total Test time (real) = 397.96 sec
The following tests FAILED:
          2 - run_nfllib_demo8_60_uint32_t_op (Failed)
          4 - run_nfllib_demo8_60_uint32_t_func (Failed)
          6 - run_nfl_add8_60_uint32_t (Failed)
          8 - run_nfl_sub8_60_uint32_t (Failed)
         10 - run_nfl_mul8_60_uint32_t (Failed)
         12 - run_nfl_eq8_60_uint32_t (Failed)
         14 - run_nfl_neq8_60_uint32_t (Failed)
         16 - run_nfl_stream8_60_uint32_t (Failed)
         18 - run_poly_p8_60_uint32_t (Failed)
         20 - run_poly_set8_60_uint32_t (Failed)
         22 - run_poly_mpz8_60_uint32_t (Failed)
         24 - run_poly_serialize_manually8_60_uint32_t (Failed)
         26 - run_nfllib_demo128_14_uint16_t_op (Failed)
         28 - run_nfllib_demo128_14_uint16_t_func (Failed)
         30 - run_nfl_add128_14_uint16_t (Failed)
         32 - run_nfl_sub128_14_uint16_t (Failed)
         34 - run_nfl_mul128_14_uint16_t (Failed)
         36 - run_nfl_eq128_14_uint16_t (Failed)
         38 - run_nfl_neq128_14_uint16_t (Failed)
         40 - run_nfl_stream128_14_uint16_t (Failed)
         42 - run_poly_p128_14_uint16_t (Failed)
         44 - run_poly_set128_14_uint16_t (Failed)
         46 - run_poly_mpz128_14_uint16_t (Failed)
         48 - run_poly_serialize_manually128_14_uint16_t (Failed)
         50 - run_nfllib_demo1024_60_uint32_t_op (Failed)
         52 - run_nfllib_demo1024_60_uint32_t_func (Failed)
         54 - run_nfl_add1024_60_uint32_t (Failed)
         56 - run_nfl_sub1024_60_uint32_t (Failed)
         58 - run_nfl_mul1024_60_uint32_t (Failed)
         60 - run_nfl_eq1024_60_uint32_t (Failed)
         62 - run_nfl_neq1024_60_uint32_t (Failed)
         64 - run_nfl_stream1024_60_uint32_t (Failed)
         66 - run_poly_p1024_60_uint32_t (Failed)
         68 - run_poly_set1024_60_uint32_t (Failed)
         70 - run_poly_mpz1024_60_uint32_t (Failed)
         72 - run_poly_serialize_manually1024_60_uint32_t (Failed)
         74 - run_nfllib_demo8192_124_uint64_t_op (Failed)
         76 - run_nfllib_demo8192_124_uint64_t_func (Failed)
         78 - run_nfl_add8192_124_uint64_t (Failed)
         80 - run_nfl_sub8192_124_uint64_t (Failed)
         82 - run_nfl_mul8192_124_uint64_t (Failed)
         84 - run_nfl_eq8192_124_uint64_t (Failed)
         86 - run_nfl_neq8192_124_uint64_t (Failed)
         88 - run_nfl_stream8192_124_uint64_t (Failed)
         90 - run_poly_p8192_124_uint64_t (Failed)
         92 - run_poly_set8192_124_uint64_t (Failed)
         94 - run_poly_mpz8192_124_uint64_t (Failed)
         96 - run_poly_serialize_manually8192_124_uint64_t (Failed)
         98 - run_nfllib_demo1048576_124_uint64_t_op (Failed)
        100 - run_nfllib_demo1048576_124_uint64_t_func (Failed)
        102 - run_nfl_add1048576_124_uint64_t (Failed)
        104 - run_nfl_sub1048576_124_uint64_t (Failed)
        106 - run_nfl_mul1048576_124_uint64_t (Failed)
        108 - run_nfl_eq1048576_124_uint64_t (Failed)
        110 - run_nfl_neq1048576_124_uint64_t (Failed)
        112 - run_nfl_stream1048576_124_uint64_t (Failed)
        114 - run_poly_p1048576_124_uint64_t (Failed)
        116 - run_poly_set1048576_124_uint64_t (Failed)
        118 - run_poly_mpz1048576_124_uint64_t (Failed)
        120 - run_poly_serialize_manually1048576_124_uint64_t (Failed)
        122 - run_prng_demo (Failed)
Errors while running CTest
Makefile:97: recipe for target 'test' failed

Any clue on what causes the failures? make and make install work fine otherwise. If I run cmake . ; make under tests/, I get: Building CXX object CMakeFiles/ntt_multi.dir/multi0.o []/NFLLib/tests/multi0.cpp:3:10: fatal error: nfl.hpp: No such file or directory

Any help would be highly appreciated :)

68823613 commented 5 years ago

98% tests passed, 3 tests failed out of 122

Total Test time (real) = 116.47 sec

The following tests FAILED: 98 - run_nfllib_demo1048576_124_uint64_t_op (SEGFAULT) 114 - run_poly_p1048576_124_uint64_t (SEGFAULT) 118 - run_poly_mpz1048576_124_uint64_t (SEGFAULT) Errors while running CTest Makefile:105: recipe for target 'test' failed make: *** [test] Error 8 Also this issue.