Skip to content

Different behavior of dot with nonblocking backend vs reference #397

Description

@GiovaGa

The following code snippet:

grb::Vector< int > x( n ), y( n );

for(size_t i = n; i > 0 ; --i ){
	grb::setElement( y, i-1, i-1 );
}	

grb::setElement( x, 2, 1 );
grb::setElement( x, 1, 4 );

grb::wait();
int res = 0;
for(size_t i = 0; i < 3; ++i ){
	grb::dot( res, x, y, ring );
	grb::wait();
	std::cout << res << std::endl;
}
grb::wait();

There is an abundance of wait to hopefully avoid unexpected effects of the lazy evaluation.

Compiling and running with the reference backend we get, as expected:

6
12
18

With the nonblocking backend I get:

2
4
6

Is this a bug or am I missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions