Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob bob
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bobbob
  • Issues
  • #15
Closed
Open
Issue created Feb 08, 2012 by André Anjos@andre.anjos💬Owner

Blitz limitation with the debugging mode

Created by: laurentes

Blitz has a current limitation when combining reduction and complex expressions, AND enabling the debugging mode using the -DBZ_DEBUG flag. This problem is described in this blitz ticket.

In particular, this means that such a piece code will throw an assert when the DBZ_DEBUG flag is set, but will work fine otherwise:


  blitz::firstIndex  bi; 
  blitz::secondIndex bj; 
  blitz::thirdIndex  bk; 
  blitz::Array A(2,2,2);
  A = 2.; 
  blitz::Array B(2,2);
  B = 7.; 
  blitz::sum(A(bi,bj,bk)*B(bi,bj),bk); // throws an assert 
  //   linux-x86_64/include/blitz/array/expr.h:492 Two array operands have different orders: for rank 0, the orders are 2 and 1
  //   linux-x86_64/include/blitz/array/expr.h:493: static int blitz::bounds::compute_ordering(int, int, int): Assertion `0' failed.

More precisely, this happens when the expression inside the reduction is built on arrays of different dimensions. The current workaround to make everything work with the DBZ_DEBUG flag enabled is to declare an intermediate array:


   blitz::Array C(A(bi,bj,bk)*B(bi,bj));
   blitz::sum(C,bk); // throw an assert

Please be aware that this might generate some overhead.

Assignee
Assign to
Time tracking