-
Notifications
You must be signed in to change notification settings - Fork 6
Description
There is a test "Zero Dim Tensor Contraction" in test/test.cpp which is supposed to test cases with scalar tensors (zero modes), but it tests only one the case nmodes(A) = 0, but not for D, B or C.
The problem is that the test with nmodes(D) = 0 never happens, at least that was the case for me even though I have run the entire test set more than 100 times.
The case nmodes(D) = 0 should technically happen once in a while in randomly generated contractions used in this and other tests. Here we have:
generate_contraction_s(0)
where 0 means nmodes(A)=0
But the nmodes generation is set up in a way that this is very unlikely. (even the above repetitions were not sufficient).
Forcing nmodes(D) = 0 test is very simple, though, instead of
generate_contraction_s(0)
we do e.g.
generate_contraction_s(2,2,0,2);
the third argument sets nmodes(D).
I suggest adding this test case, as this is a specific case that requires attention, and I had problem debugging it as it did not appear in the test set.