<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 15 Sep 2020, at 11:18 PM, Barry Smith <<a href="mailto:bsmith@petsc.dev" class="">bsmith@petsc.dev</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">  I see now, the TaoSetup_PDIPM() code explicitly builds the large matrix by calling MatGetRow() on the smaller matrices, no matrix abstractions at all and assuming a global AIJ storage of the large matrix. </span><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">  I think this can be made more general by building a MatNest() from the smaller matrices which allows the smaller matrices to have whatever unique structure is appropriate for them. Of course, if needed, for example, for a direct solver the MatNest can convert itself to a global AIJ matrix and get the current result.</div></div></blockquote><div><br class=""></div><div>Before jumping into the PDIPM train, I thought a MatNest was used internally. Like you can solve [[A, b],[b^T, 0]] (b of dimension M x 1) with a MatNest + fieldsplit or just MatConvert() + LU as you mentioned.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">   As Pierre rightly points out, MPIAIJ is just not a good format for many constrained optimization problems. This has been something seriously neglected in PETSc/TAO. I don't think any single format is ideal for such problems, likely hybrid formats are needed and this gets super tricky when one needs to use direct solvers such a Cholesky. If MUMPS has non-row oriented storage formats we could leverage that but I don't know if it does.</div></div></blockquote><div><br class=""></div><div>Just FYI, MUMPS is the most general (direct solver) when it comes to input storage. It handles non-sorted coordinate format, possibly with duplicated entries which are then summed among processes (so, in theory, it could be used to “invert" a MatIS/MatNest, without having to first convert the MatIS/MatNest to MatAIJ).</div><div><br class=""></div><div>Thanks,</div><div>Pierre</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">  Barry</div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class=""><div class=""><br class=""></div><div class=""><div class="">  ierr = MatGetOwnershipRange(tao->hessian,&rjstart,NULL);CHKERRQ(ierr);</div><div class="">  for (i=0; i<pdipm->nx; i++){</div><div class="">    row = rstart + i;</div><div class=""><br class=""></div><div class="">    ierr = MatGetRow(tao->hessian,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    proc = 0;</div><div class="">    for (j=0; j < nc; j++) {</div><div class="">      while (aj[j] >= cranges[proc+1]) proc++;</div><div class="">      col = aj[j] - cranges[proc] + Jranges[proc];</div><div class="">      ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">    }</div><div class="">    ierr = MatRestoreRow(tao->hessian,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class=""><br class=""></div><div class="">    if (pdipm->ng) {</div><div class="">      /* Insert grad g' */</div><div class="">      ierr = MatGetRow(jac_equality_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">      ierr = MatGetOwnershipRanges(tao->jacobian_equality,&ranges);CHKERRQ(ierr);</div><div class="">      proc = 0;</div><div class="">      for (j=0; j < nc; j++) {</div><div class="">        /* find row ownership of */</div><div class="">        while (aj[j] >= ranges[proc+1]) proc++;</div><div class="">        nx_all = rranges[proc+1] - rranges[proc];</div><div class="">        col = aj[j] - ranges[proc] + Jranges[proc] + nx_all;</div><div class="">        ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">      }</div><div class="">      ierr = MatRestoreRow(jac_equality_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    }</div><div class=""><br class=""></div><div class="">    /* Insert Jce_xfixed^T' */</div><div class="">    if (pdipm->nxfixed) {</div><div class="">      ierr = MatGetRow(Jce_xfixed_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">      ierr = MatGetOwnershipRanges(pdipm->Jce_xfixed,&ranges);CHKERRQ(ierr);</div><div class="">      proc = 0;</div><div class="">      for (j=0; j < nc; j++) {</div><div class="">        /* find row ownership of */</div><div class="">        while (aj[j] >= ranges[proc+1]) proc++;</div><div class="">        nx_all = rranges[proc+1] - rranges[proc];</div><div class="">        col = aj[j] - ranges[proc] + Jranges[proc] + nx_all + ng_all[proc];</div><div class="">        ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">      }</div><div class="">      ierr = MatRestoreRow(Jce_xfixed_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    }</div><div class=""><br class=""></div><div class="">    if (pdipm->nh) {</div><div class="">      /* Insert -grad h' */</div><div class="">      ierr = MatGetRow(jac_inequality_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">      ierr = MatGetOwnershipRanges(tao->jacobian_inequality,&ranges);CHKERRQ(ierr);</div><div class="">      proc = 0;</div><div class="">      for (j=0; j < nc; j++) {</div><div class="">        /* find row ownership of */</div><div class="">        while (aj[j] >= ranges[proc+1]) proc++;</div><div class="">        nx_all = rranges[proc+1] - rranges[proc];</div><div class="">        col = aj[j] - ranges[proc] + Jranges[proc] + nx_all + nce_all[proc];</div><div class="">        ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">      }</div><div class="">      ierr = MatRestoreRow(jac_inequality_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    }</div><div class=""><br class=""></div><div class="">    /* Insert Jci_xb^T' */</div><div class="">    ierr = MatGetRow(Jci_xb_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    ierr = MatGetOwnershipRanges(pdipm->Jci_xb,&ranges);CHKERRQ(ierr);</div><div class="">    proc = 0;</div><div class="">    for (j=0; j < nc; j++) {</div><div class="">      /* find row ownership of */</div><div class="">      while (aj[j] >= ranges[proc+1]) proc++;</div><div class="">      nx_all = rranges[proc+1] - rranges[proc];</div><div class="">      col = aj[j] - ranges[proc] + Jranges[proc] + nx_all + nce_all[proc] + nh_all[proc];</div><div class="">      ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">    }</div><div class="">    ierr = MatRestoreRow(Jci_xb_trans,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">  }</div><div class=""><br class=""></div><div class="">  /* 2nd Row block of KKT matrix: [grad Ce, 0, 0, 0] */</div><div class="">  if (pdipm->Ng) {</div><div class="">    ierr = MatGetOwnershipRange(tao->jacobian_equality,&rjstart,NULL);CHKERRQ(ierr);</div><div class="">    for (i=0; i < pdipm->ng; i++){</div><div class="">      row = rstart + pdipm->off_lambdae + i;</div><div class=""><br class=""></div><div class="">      ierr = MatGetRow(tao->jacobian_equality,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">      proc = 0;</div><div class="">      for (j=0; j < nc; j++) {</div><div class="">        while (aj[j] >= cranges[proc+1]) proc++;</div><div class="">        col = aj[j] - cranges[proc] + Jranges[proc];</div><div class="">        ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr); /* grad g */</div><div class="">      }</div><div class="">      ierr = MatRestoreRow(tao->jacobian_equality,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    }</div><div class="">  }</div><div class="">  /* Jce_xfixed */</div><div class="">  if (pdipm->Nxfixed) {</div><div class="">    ierr = MatGetOwnershipRange(pdipm->Jce_xfixed,&Jcrstart,NULL);CHKERRQ(ierr);</div><div class="">    for (i=0; i < (pdipm->nce - pdipm->ng); i++){</div><div class="">      row = rstart + pdipm->off_lambdae + pdipm->ng + i;</div><div class=""><br class=""></div><div class="">      ierr = MatGetRow(pdipm->Jce_xfixed,i+Jcrstart,&nc,&cols,NULL);CHKERRQ(ierr);</div><div class="">      if (nc != 1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"nc != 1");</div><div class=""><br class=""></div><div class="">      proc = 0;</div><div class="">      j    = 0;</div><div class="">      while (cols[j] >= cranges[proc+1]) proc++;</div><div class="">      col = cols[j] - cranges[proc] + Jranges[proc];</div><div class="">      ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">      ierr = MatRestoreRow(pdipm->Jce_xfixed,i+Jcrstart,&nc,&cols,NULL);CHKERRQ(ierr);</div><div class="">    }</div><div class="">  }</div><div class=""><br class=""></div><div class="">  /* 3rd Row block of KKT matrix: [ gradCi, 0, 0, -I] */</div><div class="">  if (pdipm->Nh) {</div><div class="">    ierr = MatGetOwnershipRange(tao->jacobian_inequality,&rjstart,NULL);CHKERRQ(ierr);</div><div class="">    for (i=0; i < pdipm->nh; i++){</div><div class="">      row = rstart + pdipm->off_lambdai + i;</div><div class=""><br class=""></div><div class="">      ierr = MatGetRow(tao->jacobian_inequality,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">      proc = 0;</div><div class="">      for (j=0; j < nc; j++) {</div><div class="">        while (aj[j] >= cranges[proc+1]) proc++;</div><div class="">        col = aj[j] - cranges[proc] + Jranges[proc];</div><div class="">        ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr); /* grad h */</div><div class="">      }</div><div class="">      ierr = MatRestoreRow(tao->jacobian_inequality,i+rjstart,&nc,&aj,NULL);CHKERRQ(ierr);</div><div class="">    }</div><div class="">    /* -I */</div><div class="">    for (i=0; i < pdipm->nh; i++){</div><div class="">      row = rstart + pdipm->off_lambdai + i;</div><div class="">      col = rstart + pdipm->off_z + i;</div><div class="">      ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">    }</div><div class="">  }</div><div class=""><br class=""></div><div class="">  /* Jci_xb */</div><div class="">  ierr = MatGetOwnershipRange(pdipm->Jci_xb,&Jcrstart,NULL);CHKERRQ(ierr);</div><div class="">  for (i=0; i < (pdipm->nci - pdipm->nh); i++){</div><div class="">    row = rstart + pdipm->off_lambdai + pdipm->nh + i;</div><div class=""><br class=""></div><div class="">    ierr = MatGetRow(pdipm->Jci_xb,i+Jcrstart,&nc,&cols,NULL);CHKERRQ(ierr);</div><div class="">    if (nc != 1) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"nc != 1");</div><div class="">    proc = 0;</div><div class="">    for (j=0; j < nc; j++) {</div><div class="">      while (cols[j] >= cranges[proc+1]) proc++;</div><div class="">      col = cols[j] - cranges[proc] + Jranges[proc];</div><div class="">      ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">    }</div><div class="">    ierr = MatRestoreRow(pdipm->Jci_xb,i+Jcrstart,&nc,&cols,NULL);CHKERRQ(ierr);</div><div class="">    /* -I */</div><div class="">    col = rstart + pdipm->off_z + pdipm->nh + i;</div><div class="">    ierr = MatPreallocateSet(row,1,&col,dnz,onz);CHKERRQ(ierr);</div><div class="">  }</div><div class=""><br class=""></div><div class="">  /* 4-th Row block of KKT matrix: Z and Ci */</div><div class="">  for (i=0; i < pdipm->nci; i++) {</div><div class="">    row     = rstart + pdipm->off_z + i;</div><div class="">    cols1[0] = rstart + pdipm->off_lambdai + i;</div><div class="">    cols1[1] = row;</div><div class="">    ierr = MatPreallocateSet(row,2,cols1,dnz,onz);CHKERRQ(ierr);</div><div class="">  }</div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Sep 15, 2020, at 4:03 PM, Abhyankar, Shrirang G <<a href="mailto:shrirang.abhyankar@pnnl.gov" class="" style="color: blue; text-decoration: underline;">shrirang.abhyankar@pnnl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div lang="EN-US" link="blue" vlink="purple" class=""><div class="WordSection1" style="page: WordSection1;"><div class="MsoNormal" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">There is some code in PDIPM that copies over matrix elements from user jacobians/hessians to the big KKT matrix. I am not sure how/if that will work with MatMPI_Column. We’ll have to try out and we need an example for that<span class="Apple-converted-space"> </span></span><span class="" style="font-size: 12pt; font-family: "Apple Color Emoji";">😊</span><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"><o:p class=""></o:p></span></div><div class="MsoNormal" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"><o:p class=""> </o:p></span></div><div class=""><div class="MsoNormal" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Thanks,<o:p class=""></o:p></span></div><div class="MsoNormal" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Shri <o:p class=""></o:p></span></div></div><div class="MsoNormal" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"><o:p class=""> </o:p></span></div><div class="MsoNormal" style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"><o:p class=""> </o:p></span></div><div class="" style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span class="" style="font-size: 12pt;">From:<span class="Apple-converted-space"> </span></span></b><span class="" style="font-size: 12pt;">Barry Smith <<a href="mailto:bsmith@petsc.dev" class="" style="color: blue; text-decoration: underline;">bsmith@petsc.dev</a>><br class=""><b class="">Date:<span class="Apple-converted-space"> </span></b>Tuesday, September 15, 2020 at 1:21 PM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b>Pierre Jolivet <<a href="mailto:pierre.jolivet@enseeiht.fr" class="" style="color: blue; text-decoration: underline;">pierre.jolivet@enseeiht.fr</a>><br class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b>"Abhyankar, Shrirang G" <<a href="mailto:shrirang.abhyankar@pnnl.gov" class="" style="color: blue; text-decoration: underline;">shrirang.abhyankar@pnnl.gov</a>>, PETSc Development <<a href="mailto:petsc-dev@mcs.anl.gov" class="" style="color: blue; text-decoration: underline;">petsc-dev@mcs.anl.gov</a>><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: [petsc-dev] PDIPDM questions<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  Pierre,<o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    Based on my previous mail I am hoping that the <span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">PDIPM algorithm itself won't need a major refactorization to be scalable, only a custom matrix type is needed to store and compute with the  Hessian in a scalable way.</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">   Barry</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote class="" type="cite" style="margin-top: 5pt; margin-bottom: 5pt;"><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Sep 15, 2020, at 12:50 PM, Pierre Jolivet <<a href="mailto:pierre.jolivet@enseeiht.fr" class="" style="color: blue; text-decoration: underline;">pierre.jolivet@enseeiht.fr</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote class="" type="cite" style="margin-top: 5pt; margin-bottom: 5pt;"><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On 15 Sep 2020, at 5:40 PM, Abhyankar, Shrirang G <<a href="mailto:shrirang.abhyankar@pnnl.gov" class="" style="color: blue; text-decoration: underline;">shrirang.abhyankar@pnnl.gov</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Pierre,</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">   You are right. There are a few MatMultTransposeAdd that may need conforming layouts for the equality/inequality constraint vectors and equality/inequality constraint Jacobian matrices. I need to check if that’s the case. We only have ex1 example currently, we need to add more examples. We are currently working on making PDIPM robust and while doing it will work on adding another example.</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"> </span><o:p class=""></o:p></div></div><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Very naive question, but given that I have a single constraint, how do I split a 1 x N matrix column-wise? I thought it was not possible.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><i class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"> </span></i><o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">When setting the size of the constraint vector, you need to set the local size on one rank to 1 and all others to zero. For the Jacobian, the local row size on that rank will be 1 and all others to zero. The column layout for the Jacobian should follow the layout for vector x. So each rank will set the local column size of the Jacobian to local size of x.</span><o:p class=""></o:p></div></div></div></blockquote><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">That is assuming I don’t want x to follow the distribution of the Hessian, which is not my case.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Is there some plan to make PDIPM handle different layouts?<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I hope I’m not the only one thinking that having a centralized Hessian when there is a single constraint is not scalable?<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Pierre<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><blockquote class="" type="cite" style="margin-top: 5pt; margin-bottom: 5pt;"><div class=""><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Shri</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"> </span><o:p class=""></o:p></div></div><div class=""><blockquote class="" type="cite" style="margin-top: 5pt; margin-bottom: 5pt;"><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On 15 Sep 2020, at 2:21 AM, Abhyankar, Shrirang G <<a href="mailto:shrirang.abhyankar@pnnl.gov" class="" style="color: blue; text-decoration: underline;">shrirang.abhyankar@pnnl.gov</a>> wrote:<o:p class=""></o:p></div></div></div><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Hello Pierre,</span><o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">   PDIPM works in parallel so you can have distributed Hessian, Jacobians, constraints, variables, gradients in any layout you want.  If you are using a DM then you can have it generate the Hessian.<span class="apple-converted-space"> </span></span><o:p class=""></o:p></div></div></div></div></blockquote><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Could you please show an example where this is the case?<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">pdipm->x, which I’m assuming is a working vector, is both used as input for Hessian and Jacobian functions, e.g., <a href="https://gitlab.com/petsc/petsc/-/blob/master/src/tao/constrained/impls/ipm/pdipm.c#L369" class="" style="color: blue; text-decoration: underline;">https://gitlab.com/petsc/petsc/-/blob/master/src/tao/constrained/impls/ipm/pdipm.c#L369</a> (Hessian) + <a href="https://gitlab.com/petsc/petsc/-/blob/master/src/tao/constrained/impls/ipm/pdipm.c#L473" class="" style="color: blue; text-decoration: underline;">https://gitlab.com/petsc/petsc/-/blob/master/src/tao/constrained/impls/ipm/pdipm.c#L473</a> (Jacobian)<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I thus doubt that it is possible to have different layouts?<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">In practice, I end up with the following error when I try this (2 processes, distributed Hessian with centralized Jacobian):<o:p class=""></o:p></div></div></div><div class=""><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: Nonconforming object sizes<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: Vector wrong size 14172 for scatter 0 (scatter reverse and vector to != ctx from size)<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: #1 VecScatterBegin() line 96 in /Users/jolivet/Documents/repositories/petsc/src/vec/vscat/interface/vscatfce.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: #2 MatMultTransposeAdd_MPIAIJ() line 1223 in /Users/jolivet/Documents/repositories/petsc/src/mat/impls/aij/mpi/mpiaij.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: #3 MatMultTransposeAdd() line 2648 in /Users/jolivet/Documents/repositories/petsc/src/mat/interface/matrix.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: Nonconforming object sizes<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: Vector wrong size 13790 for scatter 27962 (scatter reverse and vector to != ctx from size)<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: #4 TaoSNESFunction_PDIPM() line 510 in /Users/jolivet/Documents/repositories/petsc/src/tao/constrained/impls/ipm/pdipm.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #5 TaoSolve_PDIPM() line 712 in /Users/jolivet/Documents/repositories/petsc/src/tao/constrained/impls/ipm/pdipm.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[1]PETSC ERROR: #6 TaoSolve() line 222 in /Users/jolivet/Documents/repositories/petsc/src/tao/interface/taosolver.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #1 VecScatterBegin() line 96 in /Users/jolivet/Documents/repositories/petsc/src/vec/vscat/interface/vscatfce.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #2 MatMultTransposeAdd_MPIAIJ() line 1223 in /Users/jolivet/Documents/repositories/petsc/src/mat/impls/aij/mpi/mpiaij.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #3 MatMultTransposeAdd() line 2648 in /Users/jolivet/Documents/repositories/petsc/src/mat/interface/matrix.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #4 TaoSNESFunction_PDIPM() line 510 in /Users/jolivet/Documents/repositories/petsc/src/tao/constrained/impls/ipm/pdipm.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #5 TaoSolve_PDIPM() line 712 in /Users/jolivet/Documents/repositories/petsc/src/tao/constrained/impls/ipm/pdipm.c<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[0]PETSC ERROR: #6 TaoSolve() line 222 in /Users/jolivet/Documents/repositories/petsc/src/tao/interface/taosolver.c<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I think this can be reproduced by ex1.c by just distributing the Hessian instead of having it centralized on rank 0.<o:p class=""></o:p></div></div></div><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><br class=""><o:p class=""></o:p></div></div><blockquote class="" type="cite" style="margin-top: 5pt; margin-bottom: 5pt;"><div class=""><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Ideally, you want to have the layout below to minimize movement of matrix/vector elements across ranks.</span><o:p class=""></o:p></div></div></div><p class="MsoListParagraph" style="margin-right: 0in; margin-left: 1.5in; font-size: 11pt; font-family: Calibri, sans-serif; margin-bottom: 0in; text-indent: -0.25in;"><span class="" style="font-size: 10pt; font-family: Symbol;">·</span><span class="" style="font-size: 7pt; font-family: "Times New Roman", serif;">        <span class="apple-converted-space"> </span></span><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">The layout of vectors x, bounds on x, and gradient is same.</span><o:p class=""></o:p></p><p class="MsoListParagraph" style="margin-right: 0in; margin-left: 1.5in; font-size: 11pt; font-family: Calibri, sans-serif; margin-bottom: 0in; text-indent: -0.25in;"><span class="" style="font-size: 10pt; font-family: Symbol;">·</span><span class="" style="font-size: 7pt; font-family: "Times New Roman", serif;">        <span class="apple-converted-space"> </span></span><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">The row layout of the equality/inequality Jacobian is same as the equality/inequality constraint vector layout.</span><o:p class=""></o:p></p><p class="MsoListParagraph" style="margin-right: 0in; margin-left: 1.5in; font-size: 11pt; font-family: Calibri, sans-serif; margin-bottom: 0in; text-indent: -0.25in;"><span class="" style="font-size: 10pt; font-family: Symbol;">·</span><span class="" style="font-size: 7pt; font-family: "Times New Roman", serif;">        <span class="apple-converted-space"> </span></span><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">The column layout of the equality/inequality Jacobian is same as that for x.</span><o:p class=""></o:p></p></div></blockquote><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Very naive question, but given that I have a single constraint, how do I split a 1 x N matrix column-wise? I thought it was not possible.<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Pierre<o:p class=""></o:p></div></div></div><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><br class=""><o:p class=""></o:p></div></div><blockquote class="" type="cite" style="margin-top: 5pt; margin-bottom: 5pt;"><div class=""><p class="MsoListParagraph" style="margin-right: 0in; margin-left: 1.5in; font-size: 11pt; font-family: Calibri, sans-serif; margin-bottom: 0in; text-indent: -0.25in;"><span class="" style="font-size: 10pt; font-family: Symbol;">·</span><span class="" style="font-size: 7pt; font-family: "Times New Roman", serif;">        <span class="apple-converted-space"> </span></span><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">The row and column layout for the Hessian is same as x.</span><o:p class=""></o:p></p><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"> </span><o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">The tutorial example ex1 is extremely small (only 2 variables) so its implementation is very simplistic. I think, in parallel, it ships off constraints etc. to rank 0. It’s not an ideal example w.r.t demonstrating a parallel implementation. We aim to add more examples as we develop PDIPM. If you have an example to contribute then we would most welcome it and provide help on adding it.</span><o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;"> </span><o:p class=""></o:p></div></div></div><div class=""><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Thanks,</span><o:p class=""></o:p></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="" style="font-size: 12pt; font-family: "Times New Roman", serif;">Shri</span><o:p class=""></o:p></div></div></div></div><div class="" style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;"><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span class="" style="font-size: 12pt;">From:<span class="apple-converted-space"> </span></span></b><span class="" style="font-size: 12pt;">petsc-dev <<a href="mailto:petsc-dev-bounces@mcs.anl.gov" class="" style="color: blue; text-decoration: underline;">petsc-dev-bounces@mcs.anl.gov</a>> on behalf of Pierre Jolivet <<a href="mailto:pierre.jolivet@enseeiht.fr" class="" style="color: blue; text-decoration: underline;">pierre.jolivet@enseeiht.fr</a>><br class=""><b class="">Date:<span class="apple-converted-space"> </span></b>Monday, September 14, 2020 at 1:52 PM<br class=""><b class="">To:<span class="apple-converted-space"> </span></b>PETSc Development <<a href="mailto:petsc-dev@mcs.anl.gov" class="" style="color: blue; text-decoration: underline;">petsc-dev@mcs.anl.gov</a>><br class=""><b class="">Subject:<span class="apple-converted-space"> </span></b>[petsc-dev] PDIPDM questions</span><o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hello,<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">In my quest to help users migrate from Ipopt to Tao, I’ve a new question.<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">When looking at src/tao/constrained/tutorials/ex1.c, it seems that almost everything is centralized on rank 0 (local sizes are 0 but on rank 0).<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’d like to have my Hessian distributed more naturally, as in (almost?) all other SNES/TS examples, but still keep the Jacobian of my equality constraint, which is of dimension 1 x N (N >> 1), centralized on rank 0.<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Is this possible?<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">If not, is it possible to supply the transpose of the Jacobian, of dimension N x 1, which could then be distributed row-wise like the Hessian?<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Or maybe use some trick to distribute a MatAIJ/MatDense of dimension 1 x N column-wise? Use a MatNest with as many blocks as processes?<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">So, just to sum up, how can I have a distributed Hessian with a Jacobian with a single row?<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks in advance for your help,<o:p class=""></o:p></div></div></div></div><div class=""><div class="" style="margin-left: 0.5in;"><div class="" style="margin-left: 0.5in;"><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Pierre</div></div></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></body></html>