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

Add more tests to Travis #40

Closed
coppolachan opened this issue Jul 7, 2016 · 15 comments
Closed

Add more tests to Travis #40

coppolachan opened this issue Jul 7, 2016 · 15 comments
Assignees
Milestone

Comments

@coppolachan
Copy link
Collaborator

coppolachan commented Jul 7, 2016

I suggest to add few more tests to the Travis CI:

  • Test_simd
  • Test_cshift
  • Test_hmc (one of them that runs one or two trajectories)
  • Test_cayley_cg
  • Test_stencil
@paboyle
Copy link
Owner

paboyle commented Jul 7, 2016

I agree

@paboyle
Copy link
Owner

paboyle commented Jul 7, 2016

Also we need to audit Test_simd for more functionality, as you hit some test escapes.

@coppolachan
Copy link
Collaborator Author

I already added the tests for the real and imag (which for consistency with the vectorization do NOT return a real object but a complex - a real can be obtained with the toReal function).

@aportelli aportelli added this to the 0.6.0 milestone Jul 25, 2016
@paboyle
Copy link
Owner

paboyle commented Aug 5, 2016

we also need an mpi build and two mpi task sanity check.

@aportelli
Copy link
Collaborator

Two things:

  • MPI builds depends on our ability on running MPI on Travis VMs. I will give it a shot and let you know.
  • Tests could be included in a make check target which is easy to setup with autotools. We would need the selected tests to exit with status 1 in case of failure which is not the case at the moment. This would cause make check to exit with status 1 and the Travis build will then consider it as a failure. Can somebody modify the tests to add assert/conditions to make tests crash in case of failure? Once this is done I am happy to integrate that into the build system and Travis.

@aportelli
Copy link
Collaborator

MPI does not look to go well with Travis. The Linux version uses an archaic MPI which misses some types and the OS X one crashes just calling MPI_comm_rank.
Please see https://travis-ci.org/paboyle/Grid/builds/150041548
Not sure if it is worth pursuing that.

@paboyle
Copy link
Owner

paboyle commented Aug 5, 2016

the build log on MacOSX looks like it built ok but was missing the

--mpi 1.2.1.1

flag on the execution to indicate the node grid?

It might be ok ?

@paboyle
Copy link
Owner

paboyle commented Aug 5, 2016

Agree the MPI_UINT32_T is weird on Travis/Linux.
Curious which MPI version they are using.

@aportelli
Copy link
Collaborator

Arrrg, of course... I will correct that. The version of MPI Travis is using is http://packages.ubuntu.com/precise/libopenmpi-dev, I am not sure how old it is (but probably a lot).

@aportelli
Copy link
Collaborator

aportelli commented Aug 6, 2016

Ok I made that work. There was of course the missing --mpi option but I also made my way through the linux problem by remapping the MPI UINT types to other integers types through compile flags.
https://travis-ci.org/paboyle/Grid/builds/150186880

@aportelli
Copy link
Collaborator

aportelli commented Aug 6, 2016

MPI tests are working and merged into develop

@coppolachan coppolachan self-assigned this Sep 2, 2016
@aportelli
Copy link
Collaborator

Correct me if I'm wrong, but I think this issue should still be opened as we still need a make check kind of target that validate a build as working. I'll move the milestone to 0.7.

@aportelli aportelli modified the milestones: 0.7.0, 0.6.0 Nov 19, 2016
@paboyle
Copy link
Owner

paboyle commented May 5, 2017

-- Tests/forces Fermion and Gauge Force tests across range of actions
-- A small HMC trajectory to cover integrators. How many integrators?

@paboyle
Copy link
Owner

paboyle commented May 5, 2017

Test_cshift_red_black
Test_cshift_rotate

@paboyle
Copy link
Owner

paboyle commented May 5, 2017

I've discovered:

AM_EXTRA_RECURSIVE_TARGETS

and will use targets "check, bench, and tests" as recursive in the way that "all" is already
simplifying the Make structure. This greatly simplifies the subdir recursion over the current implementation which I think Antonin did.

The autogenerated Make.inc, created by scripts/filelist
will set the local files to be compiled for each directory:

tests-local:

for subdirs under Grid/tests.
This prevents make all from building the tests in the existing way but is cleaner.
make tests will build these non installed tests.

We need in the local Makefile.am only the following:

(e.g. tests/Makefile.am + subdir Makefile.am's)
check-local:
-- Run any checks in each subdir

(e.g. benchmarks/Makefile.am)
bench-local:
-- Run any benchmarks

There is no need for makefiles to contain a shell script over subdirs.

It is possible to introduce (easily) now a "make extras" target that recurses appropriately.

Adding a new test to make check involves just adding to a

check-local:
./Test_mytest

To the local Makefile.am.

Only short running tests that check their answer and throw error by calling assert( answer == good ) ;
should be added to the autorun tests.

This results in a make fail as below. I use assert and not exit(-1) etc because this throws
a signal (sigabort) under MPI jobs and is a more reliable way to force termination on all nodes.

Note the build is autorecursive.

c010200:build peterboyle$ make check
Making check in lib
Making check in benchmarks
make[1]: Nothing to be done for check'. Making check in tests Making check in . /Applications/Xcode.app/Contents/Developer/usr/bin/make check-local Making all in . make[4]: Nothing to be done for all-am'.
Making all in core
make[4]: Nothing to be done for all'. Making all in forces make[4]: Nothing to be done for all'.
Making all in hmc
make[4]: Nothing to be done for all'. Making all in solver make[4]: Nothing to be done for all'.
Making all in debug
make[4]: Nothing to be done for all'. Making all in smearing make[4]: Nothing to be done for all'.
Making all in qdpxx
make[4]: Nothing to be done for `all'.
./Test_simd
Assertion failed: (0), function main, file ../../tests/Test_simd.cc, line 506.
make[3]: *** [check-local] Abort trap: 6
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

@paboyle paboyle closed this as completed May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants