Skip to content

Missing assertions for threaded execution #278

@byjtew

Description

@byjtew

As an example, this program compiles, and crashes during its execution for a very misleading reason:

void grb_program( ... ) {
  // Using 1 openMP thread
  omp_set_num_threads( 1 ); 

  // User stuff ...

  grb::Vector<int> x(...);
  grb::Vector<int> y(...);
  grb::Matrix<int> A(...);
  // Build the vectors and the matrix ...

  // NOW using 2 openMP thread
  omp_set_num_threads( 2 ); 

  // Triggers the assertion trigger in include/coordinates.hpp:1343  "assert( _buf % T == 0 );"
  // Reason: The vectors have been allocated for computations with 
  // 1 thread only, but grb::vxm will be executed using 2 threads.
  grb::vxm( y, x, A, ... ); 
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions