Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/Suppressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,30 @@ for( size_t k = 0; k < block_size; ++k ) {
}
```

7. `include/graphblas/reference/blas1.hpp`, masked_apply_generic
```
for( size_t k = 0; k < block_size; ++k ) {
if( mask_b[ k ] ) {
apply( z_b[ k ], x_b[ k ], y_b[ k ], op );
}
}
for( size_t k = 0; k < block_size; ++k ) {
const size_t index = i + k;
assert( index < n );
if( mask_b[ k ] ) {
#ifdef _H_GRB_REFERENCE_OMP_BLAS1
if( !z_coors.asyncAssign( index, update ) ) {
(void) ++asyncAssigns;
}
#else
(void) z_coors.assign( index );
#endif
GRB_UTIL_IGNORE_MAYBE_UNINITIALIZED
// z_b[ k ] has been initialized in the loop just before
*( z_p + index ) = z_b[ k ];
GRB_UTIL_RESTORE_WARNINGS
}
}
#ifdef _H_GRB_REFERENCE_OMP_BLAS1

```
2 changes: 2 additions & 0 deletions include/graphblas/nonblocking/pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ namespace grb {
const Coordinates< nonblocking > * const vector_ptr
);
#endif

void markMaybeSparseDenseDescriptorVerification(
Coordinates< nonblocking > * const vector_ptr
);
Expand All @@ -330,6 +331,7 @@ namespace grb {
void merge( Pipeline &pipeline );

void clear();

#ifdef GRB_ALREADY_DENSE_OPTIMIZATION
void buildAlreadyDenseVectors();
#endif
Expand Down
3 changes: 3 additions & 0 deletions include/graphblas/reference/blas1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3750,7 +3750,10 @@ namespace grb {
#else
(void) z_coors.assign( index );
#endif
GRB_UTIL_IGNORE_MAYBE_UNINITIALIZED
// z_b[ k ] has been initialized in the loop just before
*( z_p + index ) = z_b[ k ];
GRB_UTIL_RESTORE_WARNINGS
}
}
#ifdef _H_GRB_REFERENCE_OMP_BLAS1
Expand Down
12 changes: 6 additions & 6 deletions include/graphblas/utils/unordered_memmove.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ namespace grb {
size_t lStartBatch = std::lower_bound(
src_offsets, src_offsets + endBatch + 1, lStart
) - src_offsets;
assert( src_offsets[ endBatch ] >= lStart );
assert( static_cast< size_t >( src_offsets[ endBatch ] ) >= lStart );
if( src_offsets[ lStartBatch ] > static_cast< IND >(lStart) ) {
assert( lStartBatch > 0 );
(void) --lStartBatch;
assert( src_offsets[ lStartBatch ] < lStart );
assert( static_cast< size_t >( src_offsets[ lStartBatch ] ) < lStart );
}
assert( lStartBatch >= startBatch );
assert( lStartBatch <= endBatch );
Expand Down Expand Up @@ -337,8 +337,8 @@ namespace grb {

// process complete batches
for( ; lCurBatch < lEndBatch - 1; ++lCurBatch ) {
assert( lStart <= src_offsets[ lCurBatch ] );
assert( lEnd >= src_offsets[ lCurBatch + 1 ] );
assert( lStart <= static_cast< size_t >( src_offsets[ lCurBatch ] ) );
assert( lEnd >= static_cast< size_t >( src_offsets[ lCurBatch + 1 ] ) );
const size_t nElems =
(src_offsets[ lCurBatch + 1 ] - src_offsets[ lCurBatch ]);
(void) std::memcpy(
Expand All @@ -350,8 +350,8 @@ namespace grb {
}

// process last batch, which may be incomplete
assert( lEnd > src_offsets[ lEndBatch - 1 ] );
assert( lEnd <= src_offsets[ lEndBatch ] );
assert( lEnd > static_cast< size_t >( src_offsets[ lEndBatch - 1 ] ) );
assert( lEnd <= static_cast< size_t >( src_offsets[ lEndBatch ] ) );
(void) std::memcpy(
source + dst_offsets[ lEndBatch - 1 ],
buffer + bOffset,
Expand Down
11 changes: 4 additions & 7 deletions src/graphblas/nonblocking/pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,10 @@ grb::RC Pipeline::verifyDenseDescriptor() {
it != dense_descr_coordinates.end(); ++it
) {
if( !( *it )->isDense() ) {
#ifdef _NONBLOCKING_DEBUG
std::cout << "\t error in pipeline execution: the dense descriptor was "
<< "illegally used" << std::endl;
#endif
return ILLEGAL;
}
}
Expand Down Expand Up @@ -1031,13 +1035,6 @@ grb::RC Pipeline::execution() {
// verify that the dense descriptor was legally used
ret = ret ? ret : verifyDenseDescriptor();

#ifdef _NONBLOCKING_DEBUG
if( ret == ILLEGAL ) {
std::cerr << "error in pipeline execution: the dense descriptor was "
<< "illegally used" << std::endl;
}
#endif

clear();

return ret;
Expand Down
5 changes: 3 additions & 2 deletions src/transition/fuselets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,11 @@ static int update_spmv_dot(
#ifndef NDEBUG
// we employ defensive programming and perform expensive input checks when
// compiled in debug mode:
assert(n <= std::numeric_limits< OffsetT >::max() );
for( size_t i = 0; i < n; ++i ) {
assert( ia[ i + 1 ] >= ia[ i ] );
for( size_t k = ia[ i ]; k < ia[ i + 1 ]; ++k ) {
assert( ij[ k ] < n );
for( OffsetT k = ia[ i ]; k < ia[ i + 1 ]; ++k ) {
assert( ij[ k ] < static_cast<OffsetT>( n ) );
}
}
#endif
Expand Down
32 changes: 24 additions & 8 deletions tests/performance/scaling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ void grbProgram( const struct input &data_in, struct output &out ) {
out.times.io = 0;
timer.reset();
out.error_code = grb::set( vx, 1 );
out.error_code = out.error_code ? out.error_code :
grb::set( vy, 0 );
out.error_code = out.error_code ? out.error_code :
setupSparseMatrix( mx, n );
out.error_code = out.error_code ? out.error_code : grb::wait();
if( out.error_code != grb::SUCCESS ) {
std::cerr << "Error in experiment set-up\n";
std::cerr << "Error in experiment set-up: "
<< grb::toString( out.error_code ) << "\n";
init_error = true;
}
out.times.preamble = timer.time();
Expand All @@ -142,7 +145,8 @@ void grbProgram( const struct input &data_in, struct output &out ) {
}
out.times.useful = timer.time() / static_cast< double >( data_in.rep );
if( out.error_code != grb::SUCCESS && !init_error ) {
std::cerr << "Error during experiment hot loop\n";
std::cerr << "Error during experiment hot loop: "
<< grb::toString( out.error_code ) << "\n";
}
// done
out.times.postamble = 0;
Expand All @@ -156,11 +160,14 @@ void grbProgram( const struct input &data_in, struct output &out ) {
out.times.io = 0;
timer.reset();
out.error_code = grb::set( vx, 1 );
out.error_code = out.error_code ? out.error_code :
grb::set( vy, 0 );
out.error_code = out.error_code ? out.error_code :
setupSparseMatrix( mx, n );
out.error_code = out.error_code ? out.error_code : grb::wait();
if( out.error_code != grb::SUCCESS ) {
std::cerr << "Error in experiment set-up\n";
std::cerr << "Error in experiment set-up: "
<< grb::toString( out.error_code ) << "\n";
init_error = true;
}
out.times.preamble = timer.time();
Expand All @@ -175,7 +182,8 @@ void grbProgram( const struct input &data_in, struct output &out ) {
}
out.times.useful = timer.time() / static_cast< double >( data_in.rep );
if( out.error_code != grb::SUCCESS && !init_error ) {
std::cerr << "Error during experiment hot loop\n";
std::cerr << "Error during experiment hot loop: "
<< grb::toString( out.error_code ) << "\n";
}
// done
out.times.postamble = 0;
Expand All @@ -189,11 +197,14 @@ void grbProgram( const struct input &data_in, struct output &out ) {
out.times.io = 0;
timer.reset();
out.error_code = grb::set( vx, 1 );
out.error_code = out.error_code ? out.error_code :
grb::set( vy, 0 );
out.error_code = out.error_code ? out.error_code :
setupSparseMatrix( mx, n );
out.error_code = out.error_code ? out.error_code : grb::wait();
if( out.error_code != grb::SUCCESS ) {
std::cerr << "Error in experiment set-up\n";
std::cerr << "Error in experiment set-up: "
<< grb::toString( out.error_code ) << "\n";
init_error = true;
}
out.times.preamble = timer.time();
Expand All @@ -207,7 +218,8 @@ void grbProgram( const struct input &data_in, struct output &out ) {
}
out.times.useful = timer.time() / static_cast< double >( data_in.rep );
if( out.error_code != grb::SUCCESS && !init_error ) {
std::cerr << "Error during experiment hot loop\n";
std::cerr << "Error during experiment hot loop: "
<< grb::toString( out.error_code ) << "\n";
}
// done
out.times.postamble = 0;
Expand All @@ -221,11 +233,14 @@ void grbProgram( const struct input &data_in, struct output &out ) {
out.times.io = 0;
timer.reset();
out.error_code = grb::set( vx, 1 );
out.error_code = out.error_code ? out.error_code :
grb::set( vy, 0 );
out.error_code = out.error_code ? out.error_code :
setupSparseMatrix( mx, n );
out.error_code = out.error_code ? out.error_code : grb::wait();
if( out.error_code != grb::SUCCESS ) {
std::cerr << "Error in experiment set-up\n";
std::cerr << "Error in experiment set-up: "
<< grb::toString( out.error_code ) << "\n";
init_error = true;
}
out.times.preamble = timer.time();
Expand All @@ -240,7 +255,8 @@ void grbProgram( const struct input &data_in, struct output &out ) {
}
out.times.useful = timer.time() / static_cast< double >( data_in.rep );
if( out.error_code != grb::SUCCESS && !init_error ) {
std::cerr << "Error during experiment hot loop\n";
std::cerr << "Error during experiment hot loop: "
<< grb::toString( out.error_code ) << "\n";
}
// done
out.times.postamble = 0;
Expand Down