Skip to content

grb::mxv<dense> with sparse output returns grb::SUCCESS #400

@GiovaGa

Description

@GiovaGa

When calling grb::mxv() with a dense descriptor but output vector not structurally dense, the return code is grb::SUCCESS instead of the expected grb::ILLEGAL.

For example:

	grb::Vector<float> x( 5 ), y( 5 );
	grb::Matrix<float> A( 5, 5 );
	
	// Build the vectors and the matrix ...
	
	auto plusTimes = grb::semirings::plusTimes< float >();

	grb::clear( x );
	// grb::set( x, 0 ); // without this line x is not initialized and thus not dense
	grb::set( y, 1 ); // without this line x is not initialized and thus not dense

	std::cerr << "grb::nnz(x) = " << grb::nnz(x) << std::endl; // this prints 0

	rc = grb::mxv< grb::descriptors::dense >(x, A, y, plusTimes);
	assert( rc == grb::SUCCESS );

Runs successfully even though it should throw an error.

This behavior has been observed with the following backends: reference, reference_omp, nonblocking, bsp1d, hyperdags, hybrid

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