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

ftrsm with Modular<Integer> (ftrsm_mp), consistently fails with small modulus #29

Closed
jgdumas opened this issue Jun 22, 2016 · 7 comments

Comments

@jgdumas
Copy link
Member

jgdumas commented Jun 22, 2016

./tests/test-ftrsm -q 5
...
Checking FTRSM_Upper_Right_Trans_NonUnit..........PASSED (0.02)
Checking with Modular modulo 5
Checking FTRSM_Lower_Left_NoTrans_Unit............FAILED (0)

@romainlebreton
Copy link
Member

Up ! On my computer, it fails also for huge primes

Checking with Modular<Integer> modulo 23
Checking FTRSM_Lower_Left_NoTrans_Unit............FAILED (0.004)
Checking with Modular<Integer> modulo 12581012075398648461302397985065909093840205852130235306607404628895658297963429782695799353590515403299709131550348517312718001138092989375213512882675389
Checking FTRSM_Lower_Left_NoTrans_Unit............FAILED (0.028)

@ClementPernet ClementPernet mentioned this issue Jul 18, 2016
@d-torrance
Copy link
Contributor

It looks like I've run into this issue as well while preparing the fflas-ffpack 2.2.2 package for Debian [1]:

Checking with Modular<Integer> modulo 17
Checking FTRSM_Lower_Left_NoTrans_Unit............FAILED (0.004)
Checking with Modular<Integer> modulo 7890161371805248622789874309671041352264198880224979077738214757182164576021785554945609150054833296242452679638630743632721989518040945563660577975302711
terminate called after throwing an instance of 'FailureFgemmCheck'
Checking FTRSM_Lower_Left_NoTrans_Unit............FAIL test-ftrsm (exit status: 134)

[1] http://pastebin.com/wzBZpP1K

@fingolfin
Copy link
Contributor

On Mac OS X 10.11.6, with -framework Accelerate as BLAS, I get this error (using version 2.2.2). I wonder if it might be related?

...
Checking FTRSM_Upper_Right_NoTrans_NonUnit........PASSED (0.00264)
Checking FTRSM_Lower_Right_Trans_NonUnit..........PASSED (0.00291)
Checking FTRSM_Upper_Right_Trans_NonUnit..........PASSED (0.002822)
Checking with Modular<float> mod 1597
Checking FTRSM_Lower_Left_NoTrans_Unit............PASSED (0.001068)
Checking FTRSM_Upper_Left_NoTrans_Unit............PASSED (0.001036)
libc++abi.dylib: terminating with uncaught exception of type FailureFgemmCheck
Checking FTRSM_Lower_Left_Trans_Unit..............

@fingolfin
Copy link
Contributor

In case it helps, here is a truncated traceback of the place the exception is thrown:

    frame #7: 0x00007fff912e5a7a libc++abi.dylib`__cxa_throw + 121
    frame #8: 0x00000001000924cb test-ftrsm`FFLAS::CheckerImplem_fgemm<Givaro::Modular<float, float> >::check(this=<unavailable>, ta=<unavailable>, tb=<unavailable>, alpha=<unavailable>, A=<unavailable>, lda=<unavailable>, B=<unavailable>, ldb=<unavailable>, C=<unavailable>) + 2683 at checker_fgemm.inl:86
    frame #9: 0x000000010006b943 test-ftrsm`Givaro::Modular<float, float>::Element_ptr FFLAS::fgemm<Givaro::Modular<float, float> >(F=<unavailable>, ta=FflasTrans, tb=<unavailable>, m=<unavailable>, n=<unavailable>, k=<unavailable>, alpha=<unavailable>, A=<unavailable>, lda=<unavailable>, B=<unavailable>, ldb=<unavailable>, beta=1, C=<unavailable>, ldc=<unavailable>) + 499 at fflas_fgemm.inl:344
    frame #10: 0x000000010008fe32 test-ftrsm`void FFLAS::Protected::ftrmmLeftLowerTransUnit<float>::operator(this=<unavailable>, F=0x0000000101800070, M=<unavailable>, N=1, A=<unavailable>, lda=141, B=<unavailable>, ldb=<unavailable>)<Givaro::Modular<float, float> >(Givaro::Modular<float, float> const&, unsigned long, unsigned long, Givaro::Modular<float, float>::ConstElement_ptr, unsigned long, Givaro::Modular<float, float>::Element_ptr, unsigned long) + 450 at fflas_ftrmm_src.inl:209
    frame #11: 0x000000010008e8c9 test-ftrsm`void FFLAS::ftrmm<Givaro::Modular<float, float> >(F=0x0000000101800070, Side=<unavailable>, Uplo=<unavailable>, TransA=<unavailable>, Diag=<unavailable>, M=128, N=1, alpha=<unavailable>, A=<unavailable>, lda=<unavailable>, B=0x0000000100303760, ldb=1) + 425 at fflas_ftrmm.inl:73
    frame #12: 0x000000010006c2b4 test-ftrsm`FFLAS::CheckerImplem_ftrsm<Givaro::Modular<float, float> >::check(this=0x00007fff5fbfe840, side=<unavailable>, uplo=FflasLower, trans=FflasTrans, diag=FflasUnit, m=128, n=<unavailable>, A=<unavailable>, lda=<unavailable>, X=<unavailable>, ldx=<unavailable>) + 1444 at checker_ftrsm.inl:91
    frame #13: 0x000000010006b11e test-ftrsm`bool check_ftrsm<Givaro::Modular<float, float>, Givaro::ModularRandIter<Givaro::Modular<float, float> > >(Givaro::Modular<float, float> const&, unsigned long, unsigned long, Givaro::Modular<float, float>::Element const&, FFLAS::FFLAS_SIDE, FFLAS::FFLAS_UPLO, FFLAS::FFLAS_TRANSPOSE, FFLAS::FFLAS_DIAG, Givaro::ModularRandIter<Givaro::Modular<float, float> >&) [inlined] void FFLAS::ftrsm<Givaro::Modular<float, float> >(Side=FflasLeft, Uplo=FflasLower, TransA=<unavailable>, Diag=<unavailable>, alpha=1, A=0x0000000102000000, lda=141, B=0x0000000102011a00, ldb=142) + 210 at fflas_ftrsm.inl:61
    frame #14: 0x000000010006b04c test-ftrsm`bool check_ftrsm<Givaro::Modular<float, float>, Givaro::ModularRandIter<Givaro::Modular<float, float> > >(F=0x0000000101800070, m=128, n=128, alpha=0x00007fff5fbfe8fc, side=FflasLeft, uplo=FflasLower, trans=<unavailable>, diag=<unavailable>, Rand=<unavailable>) + 1916 at test-ftrsm.C:114
    frame #15: 0x0000000100004df8 test-ftrsm`bool run_with_field<Givaro::Modular<float, float> >(q=Integer @ 0x00007fff5fbfea28, b=0, m=128, n=128, a=<unavailable>, iters=<unavailable>, seed=4320133232) + 584 at test-ftrsm.C:176
    frame #16: 0x0000000100003653 test-ftrsm`main(argc=<unavailable>, argv=<unavailable>) + 995 at test-ftrsm.C:225

@pascalgiorgi
Copy link
Member

this has been fixed with merge #90

@ClementPernet
Copy link
Member

The fix merged causes segfaults of the benchmark suite using clang++ compiler on all plateforms of the build farm: https://ci.inria.fr/linbox/job/FFLAS-FFPACK/180/

@ClementPernet ClementPernet reopened this Apr 6, 2017
@ClementPernet
Copy link
Member

Sorry, my bad. This bug is independent from this issue. It just showed up again in this last build for some weird reason.

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

6 participants