Git Product home page Git Product logo

Comments (7)

szarnyasg avatar szarnyasg commented on August 14, 2024

I removed the tests except the double complex ones and printed the variables A, B before calling gbtest76b, then A, G, C1, C2 before the failed assert: https://github.com/szarnyasg/GraphBLAS/blob/gbtest76/GraphBLAS/test/gbtest76.m

Output on Linux (passing):

A =

   0.8444 + 0.9097i   0.5113 + 0.3101i   0.4766 + 0.4721i   0.2818 + 0.9130i
   0.7580 + 0.9828i   0.4049 + 0.7298i   0.5834 + 0.1007i   0.7558 + 0.9666i
   0.4206 + 0.8102i   0.7838 + 0.8988i   0.9081 + 0.4342i   0.6184 + 0.4770i
   0.2589 + 0.9022i   0.3033 + 0.6840i   0.5047 + 0.6109i   0.2505 + 0.8653i

B =

   0.260492 + 0.238616i   0.719705 + 0.080446i   0.001143 + 0.109058i   0.325204 + 0.814467i
   0.805028 + 0.967540i   0.398824 + 0.320055i   0.493578 + 0.551267i   0.870471 + 0.540284i
   0.548699 + 0.803179i   0.824845 + 0.507941i   0.867603 + 0.706561i   0.191067 + 0.963839i
   0.014042 + 0.447970i   0.668153 + 0.932834i   0.243911 + 0.547441i   0.567511 + 0.603186i
A =

        0 +      0i   0.5113 + 0.3101i   0.4766 + 0.4721i   0.2818 + 0.9130i
   0.7580 + 0.9828i   0.4049 + 0.7298i   0.5834 + 0.1007i   0.7558 + 0.9666i
   0.4206 + 0.8102i   0.7838 + 0.8988i   0.9081 + 0.4342i   0.6184 + 0.4770i
   0.2589 + 0.9022i   0.3033 + 0.6840i   0.5047 + 0.6109i   0.2505 + 0.8653i

G =

  4x4 GraphBLAS double complex matrix, bitmap by col
  15 nonzeros, 15 entries, memory: 480 bytes

    (2,1)    0.757954 + 0.982785i
    (3,1)    0.420572 + 0.810217i
    (4,1)    0.258917 + 0.902166i
    (1,2)    0.511275 + 0.310148i
    (2,2)    0.404934 + 0.729832i
    (3,2)    0.783799 + 0.898838i
    (4,2)    0.303313 + 0.683984i
    (1,3)    0.476597 + 0.472143i
    (2,3)    0.583382 + 0.100701i
    (3,3)    0.908113 + 0.434172i
    (4,3)    0.504687 + 0.610887i
    (1,4)    0.281838 + 0.913011i
    (2,4)    0.755804 + 0.966606i
    (3,4)    0.618369 + 0.47701i
    (4,4)    0.250506 + 0.86531i
C1 =

        0 +      0i   0.5113 + 0.3101i   0.4766 + 0.4721i   0.2818 + 0.9130i
   0.7580 + 0.9828i   0.4049 + 0.7298i   0.5834 + 0.1007i   0.7558 + 0.9666i
   0.4206 + 0.8102i   0.7838 + 0.8988i   0.9081 + 0.4342i   0.6184 + 0.4770i
   0.2589 + 0.9022i   0.3033 + 0.6840i   0.5047 + 0.6109i   0.2505 + 0.8653i


C2 =

  4x4 GraphBLAS double complex matrix, bitmap by col
  15 nonzeros, 15 entries, memory: 480 bytes

    (2,1)    0.757954 + 0.982785i
    (3,1)    0.420572 + 0.810217i
    (4,1)    0.258917 + 0.902166i
    (1,2)    0.511275 + 0.310148i
    (2,2)    0.404934 + 0.729832i
    (3,2)    0.783799 + 0.898838i
    (4,2)    0.303313 + 0.683984i
    (1,3)    0.476597 + 0.472143i
    (2,3)    0.583382 + 0.100701i
    (3,3)    0.908113 + 0.434172i
    (4,3)    0.504687 + 0.610887i
    (1,4)    0.281838 + 0.913011i
    (2,4)    0.755804 + 0.966606i
    (3,4)    0.618369 + 0.47701i
    (4,4)    0.250506 + 0.86531i
4x4 GraphBLAS double complex matrix, full by col
  no nonzeros, 16 entries, memory: 464 bytes

    (1,1)    0 + 0i
    (2,1)    0 + 0i
    (3,1)    0 + 0i
    (4,1)    0 + 0i
    (1,2)    0 + 0i
    (2,2)    0 + 0i
    (3,2)    0 + 0i
    (4,2)    0 + 0i
    (1,3)    0 + 0i
    (2,3)    0 + 0i
    (3,3)    0 + 0i
    (4,3)    0 + 0i
    (1,4)    0 + 0i
    (2,4)    0 + 0i
    (3,4)    0 + 0i
    (4,4)    0 + 0i

Output on Mac (failing):

A =

   0.8444 + 0.9097i   0.5113 + 0.3101i   0.4766 + 0.4721i   0.2818 + 0.9130i
   0.7580 + 0.9828i   0.4049 + 0.7298i   0.5834 + 0.1007i   0.7558 + 0.9666i
   0.4206 + 0.8102i   0.7838 + 0.8988i   0.9081 + 0.4342i   0.6184 + 0.4770i
   0.2589 + 0.9022i   0.3033 + 0.6840i   0.5047 + 0.6109i   0.2505 + 0.8653i

B =

   0.260492 + 0.238616i   0.719705 + 0.080446i   0.001143 + 0.109058i   0.325204 + 0.814467i
   0.805028 + 0.967540i   0.398824 + 0.320055i   0.493578 + 0.551267i   0.870471 + 0.540284i
   0.548699 + 0.803179i   0.824845 + 0.507941i   0.867603 + 0.706561i   0.191067 + 0.963839i
   0.014042 + 0.447970i   0.668153 + 0.932834i   0.243911 + 0.547441i   0.567511 + 0.603186i
A =

        0 +      0i   0.5113 + 0.3101i   0.4766 + 0.4721i   0.2818 + 0.9130i
   0.7580 + 0.9828i   0.4049 + 0.7298i   0.5834 + 0.1007i   0.7558 + 0.9666i
   0.4206 + 0.8102i   0.7838 + 0.8988i   0.9081 + 0.4342i   0.6184 + 0.4770i
   0.2589 + 0.9022i   0.3033 + 0.6840i   0.5047 + 0.6109i   0.2505 + 0.8653i

G =

  4x4 GraphBLAS double complex matrix, bitmap by col
  15 nonzeros, 15 entries, memory: 480 bytes

    (2,1)    0.757954 + 0.982785i
    (3,1)    0.420572 + 0.810217i
    (4,1)    0.258917 + 0.902166i
    (1,2)    0.511275 + 0.310148i
    (2,2)    0.404934 + 0.729832i
    (3,2)    0.783799 + 0.898838i
    (4,2)    0.303313 + 0.683984i
    (1,3)    0.476597 + 0.472143i
    (2,3)    0.583382 + 0.100701i
    (3,3)    0.908113 + 0.434172i
    (4,3)    0.504687 + 0.610887i
    (1,4)    0.281838 + 0.913011i
    (2,4)    0.755804 + 0.966606i
    (3,4)    0.618369 + 0.47701i
    (4,4)    0.250506 + 0.86531i
C1 =

        0 +      0i   0.5113 + 0.3101i   0.4766 + 0.4721i   0.2818 + 0.9130i
   0.7580 + 0.9828i   0.4049 + 0.7298i   0.5834 + 0.1007i   0.7558 + 0.9666i
   0.4206 + 0.8102i   0.7838 + 0.8988i   0.9081 + 0.4342i   0.6184 + 0.4770i
   0.2589 + 0.9022i   0.3033 + 0.6840i   0.5047 + 0.6109i   0.2505 + 0.8653i


C2 =

  4x4 GraphBLAS double complex matrix, bitmap by col
  15 nonzeros, 15 entries, memory: 480 bytes

    (2,1)    0.757954 + 0.982785i
    (3,1)    0.420572 + 0.810217i
    (4,1)    0.258917 + 0.902166i
    (1,2)    0.511275 + 0.310148i
    (2,2)    0.404934 + 0.729832i
    (3,2)    0.783799 + 0.898838i
    (4,2)    0.303313 + 0.683984i
    (1,3)    0.476597 + 0.472143i
    (2,3)    0.583382 + 0.100701i
    (3,3)    0.908113 + 0.434172i
    (4,3)    0.504687 + 0.610887i
    (1,4)    0.281838 + 0.913011i
    (2,4)    0.755804 + 0.966606i
    (3,4)    0.618369 + 0.47701i
    (4,4)    0.250506 + 0.86531i
  4x4 GraphBLAS double complex matrix, full by col
  7 nonzeros, 16 entries, memory: 464 bytes

    (1,1)    0 + 0i
    (2,1)    0 - 1.11022e-16i
    (3,1)    -5.55112e-17 + 0i
    (4,1)    5.55112e-17 + 0i
    (1,2)    0 + 0i
    (2,2)    0 + 0i
    (3,2)    0 + 0i
    (4,2)    0 + 0i
    (1,3)    0 + 0i
    (2,3)    0 + 0i
    (3,3)    -1.11022e-16 - 5.55112e-17i
    (4,3)    0 + 0i
    (1,4)    1.11022e-16 + 0i
    (2,4)    0 + 0i
    (3,4)    1.11022e-16 + 0i
    (4,4)    0 + 1.11022e-16i
error: assert (err == 0) failed
error: called from
    assert at line 107 column 11
    gbtest76>gbtest76b at line 404 column 5
    gbtest76 at line 28 column 13

So the problem seems to be computing C1-C2.

from graphblas.

DrTimothyAldenDavis avatar DrTimothyAldenDavis commented on August 14, 2024

It's not an error at all. Those differences are just round-off error. The complex multiply/add/etc can differ slightly on different compilers. I use "assert(err==0)" if it seems appropriate, and if those fail with err of 1e-16, or so, I just replace it with "assert (err < 1e-12)" say.

from graphblas.

DrTimothyAldenDavis avatar DrTimothyAldenDavis commented on August 14, 2024

I do all my code updates on the master branch, not on the stable branch. The stable branches don't get git commits very often, except for the next stable release. Can you make your PR's go to that branch instead? That would be a lot easier. Thanks!

from graphblas.

DrTimothyAldenDavis avatar DrTimothyAldenDavis commented on August 14, 2024

I just revised this test ; see the gbtest76.m in the master branch.

from graphblas.

szarnyasg avatar szarnyasg commented on August 14, 2024

I do all my code updates on the master branch, not on the stable branch. The stable branches don't get git commits very often, except for the next stable release. Can you make your PR's go to that branch instead? That would be a lot easier. Thanks!

Indeed, I should have targeted master and not stable -- sorry about that. I see that you performed the merge in a2ce979.

Thanks for revising the gbtest76 test case!

I now tried running the Octave tests on 2682a3c but it failed due to a hard-coded x87 dependency in GB_cpu_features.h file:

octave:1> cd @GrB/private
octave:2> gbmake
Note that this @GrB interface is under the GNU GPLv3 (or later).
Hit enter to confirm and agree; control-C to decline:
.In file included from /Users/szarnyasg/git/GraphBLAS/GraphBLAS/@GrB/private/util/gb_abort.c:10:
In file included from util/gb_interface.h:17:
In file included from ../../../Source/GB_helper.h:16:
In file included from ../../../Source/GB.h:17:
In file included from ../../../Source/GB_cpu_features.h:61:
../../../cpu_features/include/cpuinfo_x86.h:252:2: error: "Including cpuinfo_x86.h from a non-x86 target."
#error "Including cpuinfo_x86.h from a non-x86 target."
 ^
1 error generated.

Maybe GB_cpu_features.h is a work-in-progress so this is just an FYI.

from graphblas.

DrTimothyAldenDavis avatar DrTimothyAldenDavis commented on August 14, 2024

Oops. That #if was supposed to guard against it but I wrote it wrong. See the next push on master.

from graphblas.

szarnyasg avatar szarnyasg commented on August 14, 2024

Thanks! It works now and the tests pass:

gbtest: all tests passed

from graphblas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.