Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Right - I solved this. Here's what you have to do (I checked the result of the modified MPI program against a Cholesky decomp of your matrix in Octave -- it works.). </p> <p>I found the following LAPACK reference by IBM to be more helpful than the one in your link: <a href="http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=%2Fcom.ibm.cluster.pessl.v4r2.pssl100.doc%2Fam6gr_lpotrf.htm">http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=%2Fcom.ibm.cluster.pessl.v4r2.pssl100.doc%2Fam6gr_lpotrf.htm</a></p> <p><code>PDPOTRF( UPLO, N, A, IA, JA, DESCA, INFO )</code></p> <p>You are passing <code>Mb</code> and <code>Nb</code> as <code>IA</code> and <code>JA</code>. However, those parameters are meant to provide the starting row and column of your global matrix inside a larger matrix. They are only relevant if you have a big matrix and only want the Cholesky decomp of a submatrix. In your case, <code>IA</code> and <code>JA</code> both have to be <code>1</code>!</p> <p>So all you need to do is:</p> <pre><code>int IA = 1; int JA = 1; pdpotrf_("L",&amp;ord,A_loc,&amp;IA,&amp;JA,descA,&amp;info); </code></pre> <p>You may also want to change your hardcoded <code>int ord = 8;</code> so that it depends on the value read from the command line, otherwise you'll run into problems later.</p> <p>Output of your program modified as described above:</p> <pre><code>Cholesky MPI Run Time0.000659943 SUCCESS Matrix A test: 13.4907 147 140 125 132 76 126 157 10.8964 9.70923 185 150 209 114 166 188 10.3775 7.4077 8.33269 129 194 142 199 205 9.26562 5.0507 -0.548194 5.59806 148 81 104 150 9.78449 10.5451 1.72175 0.897537 1.81524 122 172 189 5.63349 5.41911 5.20784 0.765767 0.0442447 3.63139 129 117 9.33974 6.61543 6.36911 -2.22569 1.03941 2.48498 1.79738 181 11.6376 6.30249 4.50561 2.28799 -0.627688 -2.17633 7.27182 0.547228 </code></pre> <p>Octave output for comparison:</p> <pre><code>octave:1&gt; A=dlmread("matrixfile4") A = 182 147 140 125 132 76 126 157 147 213 185 150 209 114 166 188 140 185 232 129 194 142 199 205 125 150 129 143 148 81 104 150 132 209 194 148 214 122 172 189 76 114 142 81 122 102 129 117 126 166 199 104 172 129 187 181 157 188 205 150 189 117 181 259 octave:2&gt; C=chol(A) C = 13.49074 10.89636 10.37749 9.26562 9.78449 5.63349 9.33974 11.63761 0.00000 9.70923 7.40770 5.05070 10.54508 5.41911 6.61543 6.30249 0.00000 0.00000 8.33269 -0.54819 1.72175 5.20784 6.36911 4.50561 0.00000 0.00000 0.00000 5.59806 0.89754 0.76577 -2.22569 2.28799 0.00000 0.00000 0.00000 0.00000 1.81524 0.04424 1.03941 -0.62769 0.00000 0.00000 0.00000 0.00000 0.00000 3.63139 2.48498 -2.17633 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1.79738 7.27182 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.54723 </code></pre> <p>(My earlier comment -now deleted- about matrices being wrongly copied to the nodes does not apply, the rest of your program seems fine to me.) </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload