quarkslab / NFLlib

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

Do not compile tests as part of make all #15

Closed serge-sans-paille closed 8 years ago

tlepoint commented 8 years ago

Works great for me, thanks. OK to merge.

carlosaguilarmelchor commented 8 years ago

make works for me but make test hangs.

Shouldn't the tests be compiled before being ran when doing make test ?

serge-sans-paille commented 8 years ago

On Wed, May 11, 2016 at 12:46:39AM -0700, Carlos Aguilar Melchor wrote:

make works for me but make test hangs.

hangs? Compiling the tests is now part of the tests, a test like the others...

carlosaguilarmelchor commented 8 years ago
Test project /home/carlos/sync/programmation/NFLlib/_build
      Start  1: build_nfllib_demo8192_124_uint64_t_op
 1/90 Test  #1: build_nfllib_demo8192_124_uint64_t_op .....   Passed  116.91 sec

Ok I supposed it did hang, but it was just terribly slow...

May be a warning message could be displayed at the beginning of the tests ?

tlepoint commented 8 years ago

It takes 11 seconds on my computer, it surprises me it is so slow for you. Also maybe we could do the tests for increasing-size configurations?

carlosaguilarmelchor commented 8 years ago

It is strange I ran it on an high-end server with an Intel(R) Xeon(R) CPU E5-2695 v3 @ 2.30GHz and it took 45 secs to compile the first test. That is way too much.

Besides there seems to be a regression.

In master:

time (make && make test)
...
real    2m10.933s
user    2m2.458s
sys 0m8.104s

In feature/defered-tests-compilation:

time (make && make test)
...
real    5m24.094s
user    4m52.864s
sys 0m30.018s
serge-sans-paille commented 8 years ago

@carlosaguilarmelchor : we're still building the same binaries but without parallelism. I can't see another reason for the timing change.

I tested the manual build time with and without this commit, and it's comparable

carlosaguilarmelchor commented 8 years ago

How did you test the manual build time ?

serge-sans-paille commented 8 years ago

On Wed, May 11, 2016 at 08:22:51AM -0700, Carlos Aguilar Melchor wrote:

How did you test the manual build time ?

I retrived the command from the Testing/Temporary/LastTest.log file

serge-sans-paille commented 8 years ago

@carlosaguilarmelchor I leave it to you to accept this or not

carlosaguilarmelchor commented 8 years ago

@tlepoint can you test in AWS the build times as I did ?

tlepoint commented 8 years ago

@carlosaguilarmelchor Just tested on an archlinux on AWS c4.xlarge, and the first test (compilation) takes 19s

1/90 Test #1: build_nfllib_demo8192_124_uint64_t_op ..... Passed 19.39 sec

but it uses g++-6, maybe that speeds up things. Do you have an instance/os to reproduce the slow compilation?

carlosaguilarmelchor commented 8 years ago

Ubuntu g++-5.3

tlepoint commented 8 years ago

Just did on a newly created instance, installed g++-5, libgmp-dev, libmpfr-dev, cmake, git and time (make && make test) gives

master:

real    1m42.624s
user    1m36.036s
sys 0m6.573s

this branch:

real    1m43.037s
user    1m35.388s
sys 0m7.708s
carlosaguilarmelchor commented 8 years ago

Ok my bad ... my master branch did not point to the right repository ...

Merging.