<div dir="ltr">Yes, I have also noticed it.<div>IMHO, we should enforce the  TSGetDM + DMCreateGlobalVector pattern instead of duplicating ts->vec_sol in all the implementations.</div><div>I'll open a bitbucket issue if you agree</div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno lun 10 dic 2018 alle ore 22:49 Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
  No, it cannot be simply removed. If I remove it and run src/ts/examples/tutorials/ex1.c (after removing the TSSetSolution() and x argument to the TSSolve() I get the bad error<br>
<br>
$ ./ex1<br>
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[0]PETSC ERROR: Null argument, when expecting valid pointer<br>
[0]PETSC ERROR: Null Object: Parameter # 1<br>
[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>
[0]PETSC ERROR: Petsc Development GIT revision: v3.10.2-975-g84761bfe160  GIT Date: 2018-12-08 17:24:25 -0700<br>
[0]PETSC ERROR: ./ex1 on a arch-master named <a href="http://anlextwls003-196.wl.anl-external.org" rel="noreferrer" target="_blank">anlextwls003-196.wl.anl-external.org</a> by barrysmith Mon Dec 10 13:40:15 2018<br>
[0]PETSC ERROR: Configure options <br>
[0]PETSC ERROR: #1 VecDuplicate() line 376 in /Users/barrysmith/Src/petsc/src/vec/vec/interface/vector.c<br>
[0]PETSC ERROR: #2 TSSetUp_Pseudo() line 300 in /Users/barrysmith/Src/petsc/src/ts/impls/pseudo/posindep.c<br>
<br>
<br>
which is not useful to users. <br>
<br>
But I think it can be moved to TSSolve() after the call to TSSetUp(). <br>
<br>
   Barry<br>
<br>
<br>
<br>
> On Dec 10, 2018, at 6:35 AM, Stefano Zampini via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br>
> <br>
> In TSSetUp, current master has<br>
> <br>
> if (!ts->vec_sol) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONGSTATE,"Must call TSSetSolution() first");<br>
> <br>
> but the function apparently does not make use of it. Would it be safe to remove the check?<br>
> <br>
> -- <br>
> Stefano<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Stefano</div>