I wrote a using MPI and Scalapack on C++. I suffered invalid next size error. This error does not occur all the time, but seems to occur under several conditions.
Program reading data from file and split date and send other node.
Program is kicked from Python code.
Program says this error message sometimes.
free(): invalid next size (normal)
[rpi40000:07833] *** Process received signal ***
[rpi40000:07833] Signal: Aborted (6)
[rpi40000:07833] Signal code: (-6)
[rpi40000:07833] *** End of error message ***
--------------------------------------------------------------------------
My program referenced this code. https://qiita.com/yohm/items/3b896eb7cedee3c148e6
Program compute sub rows and columns
Computing sub_b_cols is different from reference code. Because reference code was fixed matrix B 1D.
int SUB_A_COLS = (n / (nb * ncol)) * nb + std::min(n % (nb * ncol), nb);
int SUB_A_ROWS = (m / (mb * nrow)) * mb + std::min(m % (mb * nrow), mb);
int SUB_B_COLS = (p / (nb * ncol)) * nb + std::min(p % (nb * ncol), nb);
int SUB_B_ROWS = (k / (mb * nrow)) * mb + std::min(m % (mb * nrow), mb);
And initialize descripter.
descinit_(DESCA, &m, &n, &mb, &nb, &rsrc, &csrc, &ICTXT, &SUB_A_ROWS, &info);
descinit_(DESCB, &k, &p, &mb, &nb, &rsrc, &csrc, &ICTXT, &SUB_B_ROWS, &info);
I would like to know why the "invalid next size error" occurs and how to deal with this error.