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

test suite ta_test not built on "make" #26

Closed
mbanck opened this issue Aug 6, 2015 · 11 comments
Closed

test suite ta_test not built on "make" #26

mbanck opened this issue Aug 6, 2015 · 11 comments

Comments

@mbanck
Copy link

mbanck commented Aug 6, 2015

The installation instructions are not very clear on that (INSTALL only seems to reference an older autotools-based installation?), but I did the following:

git clone https://github.com/ValeevGroup/tiledarray.git
mkdir build
cd build
cmake -DTA_BUILD_UNITTEST=ON ..
make

This resulted in no output.

If I run "make test" instead, I get:

Running tests...
Test project /home/mbanck/hacking/src/tiledarray/build
    Start 1: ta_test
Could not find executable ta_test
Looked in the following places:
ta_test
ta_test
Release/ta_test
Release/ta_test
Debug/ta_test
Debug/ta_test
MinSizeRel/ta_test
MinSizeRel/ta_test
RelWithDebInfo/ta_test
RelWithDebInfo/ta_test
Deployment/ta_test
Deployment/ta_test
Development/ta_test
Development/ta_test
Unable to find executable: ta_test
1/1 Test #1: ta_test ..........................***Not Run   0.00 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.00 sec

The following tests FAILED:
      1 - ta_test (Not Run)
Errors while running CTest
Makefile:117: recipe for target 'test' failed
make: *** [test] Error 8

What seems to be required is "cd tests; make ta_test", which builds the test suite. However, I think this should be hardwired into the top-level make at least if the user passes -DTA_BUILD_UNITTEST=ON to cmake.

Finally, I get the following errors running the testsuite:

MADNESS runtime initialized with 3 threads in the pool and affinity -1 -1 -1
Running 393 test cases...
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(224): error in "scale": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.407999992} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(254): error in "scale_perm": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.407999992} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(284): error in "add": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(314): error in "add_scale": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(345): error in "add_perm": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(376): error in "add_scale_perm": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(471): error in "subt": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(501): error in "subt_scale": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(532): error in "subt_perm": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%
/home/mbanck/debian/debichem/tiledarray-0.4.3-alpha/tests/sparse_shape.cpp(563): error in "subt_scale_perm": difference{100%} between result.sparsity(){0} and float(zero_tile_count) / float(tr.tiles().volume()){0.39199999} exceeds 9.99999975e-05%

*** 10 failures detected in test suite "Master Test Suite"
ta_test: /usr/include/boost/test/impl/execution_monitor.ipp:710: static boost::detail::system_signal_exception& boost::detail::signal_handler::sys_sig(): Assertion `!!s_active_handler' failed.


0% tests passed, 1 tests failed out of 1

Is this currently expected, am I doing something else wrong or should I open a separate issue for that?

@justusc
Copy link
Member

justusc commented Aug 6, 2015

Yes, the build instruction in INSTALL are very out of date. It is on my list of things to do.

The errors you see are real, and have since been in the main branch. I will back port the change and update the release.

@justusc
Copy link
Member

justusc commented Aug 6, 2015

I have finished back porting changes. All unit tests should be passing now. Please use v0.4.4-alpha.

Fixed in commit e6edd8b.

@justusc justusc closed this as completed Aug 6, 2015
@justusc
Copy link
Member

justusc commented Aug 6, 2015

I looked at the INSTALL file again. The part that you thought was referring to autotools, is actually referring to the configure script that wraps cmake. The dependencies on autoconf and automake are for MADNESS, because we assume a non-release version of MADNESS. This is necessary because I have made many changes to the MADNESS parallel runtime (e.g. bug fixes, new features, interface improvements, etc.) and TA only works with specific, non-release versions of MADNESS.

For your purposes, TiledArray v0.4.4-alpha and MADNESS v0.10 should work correctly.

@mbanck
Copy link
Author

mbanck commented Aug 7, 2015

Thanks for the release! This is getting rapidly off-topic for this issue, but I still get an error with 0.4.4:

Running tests...
/usr/bin/ctest --force-new-ctest-process -j1
Test project /home/mbanck/debian/debichem/tiledarray-0.4.4-alpha/obj-x86_64-linux-gnu
    Start 1: ta_test
1/1 Test #1: ta_test ..........................***Exception: Other  8.61 sec
ta_test: /usr/include/boost/test/impl/execution_monitor.ipp:710: static boost::detail::system_signal_exception& boost::detail::signal_handler::sys_sig(): Assertion `!!s_active_handler' failed.
MADNESS runtime initialized with 3 threads in the pool and affinity -1 -1 -1
Running 393 test cases...


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   8.65 sec

I'm not quite sure whether that means all 393 tests failed or just one of them, the summary is not very clear.

Also note that I had to include commit 73de0b0 to make 0.4.4 build with the current 0.10 release of MADNESS, as well as the MADNESS-related hunk for type_traits.h in a593684 in order to get it to compile, maybe this is related.

@justusc
Copy link
Member

justusc commented Aug 7, 2015

The error looks like an assertion in the Boost unit test. Since the error occurred before MADNESS runtime initialization, I do not think this is a TA related error (though it could be misuse of Boost.Test).

Which MPI are you using? If it is OpenMPI you may need to run the unit test, found in the tests directory, with mpiexec.

$ mpiexec -np 1 ./ta_test

I also recommend running with -np 4 to make sure everything is working with multiple MPI processes.

If everything works well you should see the following output.

MADNESS runtime initialized with 7 threads in the pool and affinity -1 -1 -1
Running 393 test cases...

*** No errors detected

For -np 4 you should see the same output repeated 4 times (the output in this case may be jumbled, but that is expected).

I will look at the commits you referenced and see if they should go in the 0.4 branch.

@justusc
Copy link
Member

justusc commented Aug 7, 2015

I do not see a reference to the second commit you indicated (a593684). Can you verify this or give me the date and time stamp of the commit?

@justusc
Copy link
Member

justusc commented Aug 7, 2015

I pushed a new commit on the 0.4 branch which includes the changes necessary for MADNES 0.10. The commit you cherry-picked included some code that should not be in the 0.4 branch. This also includes the change for type_traits.h.

@mbanck
Copy link
Author

mbanck commented Aug 7, 2015

Sorry, that was a copy-paste error, I meant 4a59368 .

Its last hunk is needed because madness/world/enable_if.h got removed from MADNESS it seems. Though maybe it is the wrong fix?

@justusc
Copy link
Member

justusc commented Aug 7, 2015

You selected the correct change. My last commit to 0.4 should be up to date then. I suggest pulling that commit because it omits some code from 73de0b0 that should not be in the release.

@mbanck
Copy link
Author

mbanck commented Aug 8, 2015

mpiexec works, thanks!

However, the main topic of this issue is still open, i.e. running "make test" just fails with "Unable to find executable: ta_test" and after building ta_test manually, it fails with "Exception: Other", while running it via mpiexec directly works.

So there are work-around avaiable, but it should be easier to discover and run the test-suite at some point in the future.

justusc added a commit that referenced this issue Aug 8, 2015
- CTest now generates the unit test executable.
Fixes #26
@justusc
Copy link
Member

justusc commented Aug 8, 2015

The new tests I just pushed to the master branch fixes the original issue. CTest should do the right thing now. However, I am not going to back port this change to the 0.4 branch. The solution there, to run make check, works well in most cases (the error you encountered is a quirk of OpenMPI).

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

2 participants