[petsc-users] Error calling TSSolve more than once with TSSetSaveTrajectory

Salazar De Troya, Miguel salazardetro1 at llnl.gov
Tue Aug 18 13:11:15 CDT 2020


Hello,

If I set up my TS with TSSetSaveTrajectory() and then call TSSolve() more than once, the second time I get this error:

[0] TSSolve() line 4102 in /Users/salazardetro1/scicomp_libraries/firedrake-debug/firedrake/src/petsc/src/ts/interface/ts.c
[0] TSTrajectorySet() line 73 in /Users/salazardetro1/scicomp_libraries/firedrake-debug/firedrake/src/petsc/src/ts/trajectory/interface/traj.c
[0] TSHistoryUpdate() line 82 in /Users/salazardetro1/scicomp_libraries/firedrake-debug/firedrake/src/petsc/src/ts/interface/tshistory.c
[0] Petsc has generated inconsistent data
[0] History id should be unique

If I call TSAdjointSolve() in between calls to TSSolve(), there is no problem. Is this the intended behavior for TSSetSaveTrajectory? Meaning that TSAdjointSolve() always has to be called right after TSSolve() if TSSetSaveTrajectory() is called. I need to call TSSolve() independently of TSAdjointSolve() whenever I want to perform a line search during the optimization.

Is there a workaround like creating a new trajectory whenever TSSolve() is called?

Thanks
Miguel



Miguel A. Salazar de Troya
Postdoctoral Researcher, Lawrence Livermore National Laboratory
B141
Rm: 1085-5
Ph: 1(925) 422-6411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200818/e5c3faca/attachment.html>


More information about the petsc-users mailing list