You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to copy a row out of a matrix. The good news: it works. The bad news: it works in exactly one use-case and fails for all others.
What works
dash::Matrix<int, 2> mat(size*NX, size*NY);
// fill matrix...
// copy the first row into local buffer
int *buf = new int[mat.extent(1)];
dash::copy(mat[0].begin(), mat[0].end(), buf);
Each unit has the first global row in the buffer (copied from unit 0).
What does not work
Any other data distribution either yields wrong results or throws an exception, e.g.,
dash::Matrix<int, 2> mat(size*NX, size*NY, dash::BLOCKED, dash::BLOCKED);
// fill matrix...
// copy the first row into local buffer
int *buf = new int[mat.extent(1)];
dash::copy(mat[0].begin(), mat[0].end(), buf);
yields only elements from unit 0 (specifically its two first local rows instead of the first global row in a 2x2 distribution).
Alternatively, the copy appears to be empty:
dash::Matrix<int, 2> mat(size*NX, size*NY, dash::NONE, dash::BLOCKCYCLIC(2));
// fill matrix...
// copy the first row into local buffer
int *buf = new int[mat.extent(1)];
dash::copy(mat[0].begin(), mat[0].end(), buf);
results in the following error:
[ 1 ERROR ] [ 32056 ] Copy.h :215 | dash::exception::OutOfRange | [ Unit 1 ] Range assertion 0 > 0 failed: Number of element to copy is 0 /home/joseph/opt/dash-0.3.0//include/dash/algorithm/Copy.h:215
terminate called after throwing an instance of 'dash::exception::OutOfRange'
on all units but unit 0.
The text was updated successfully, but these errors were encountered:
Whussa. I don't think it's a problem with dash::Matrix, this looks like an issue in the block pattern.
Using dash::SeqTilePattern should work, for example. I copy from/to matrix objects a lot, and so do other unit tests like those for SUMMA and algorithm/copy.
I've been trying to copy a row out of a matrix. The good news: it works. The bad news: it works in exactly one use-case and fails for all others.
What works
Each unit has the first global row in the buffer (copied from unit 0).
What does not work
Any other data distribution either yields wrong results or throws an exception, e.g.,
yields only elements from unit 0 (specifically its two first local rows instead of the first global row in a 2x2 distribution).
Alternatively, the copy appears to be empty:
results in the following error:
on all units but unit 0.
The text was updated successfully, but these errors were encountered: