<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Dear list,<br><br>I am trying to create matrices for a rectangular matrix with number of rows is much bigger than number of columns.<br><br>I create 2 matrices together one square and one rectangular with the same number of rows. To my surprise the smaller matrix (rectangular) creation take much more time than the bigger one (rectangular). I did preallocate for both matrices with predefine number of diagonal and off-diagonal entries. But then again I did not know how to define diagonal part of a rectangular matrix. Only a very small top part of the matrix is "diagonal".<br><br>I have try both method: the first one to set diagonal and off-diagonal part as it was a square matrix; and second to set only a small top part of the matrix diagonal. Both method does not work.<br><br>Does anyone know how to preallocate a rectangular
 matrix.<br><br>By the way, the same code run pretty fast when I run with single process and painfully slow when 2 processes employed.<br><br>Thank you in advance.<br><br>Kind regards,<br>Pham Van Ha<br> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><br> </div>  </div></body></html>