[petsc-dev] fortran binding for TSConvergedReason

Satish Balay balay at mcs.anl.gov
Thu Oct 27 16:03:54 CDT 2011


Sorry - my mistake. I had copied the updated file to the wrong
location at the ftp site.

Its now at the correct location - so a rebuild should pick it up.

Satish

On Thu, 27 Oct 2011, Blaise Bourdin wrote:

> OK, so this time, I deleted externalpackages/sow* externalpackages/_d_sow* , $PETSC_ARCH, reconfigured and rebuild, but the fortran binding is unchanged. I even deleted it and ran make allfortranstubs, but I still get the same error.
> 
> Blaise 
> 
> On Oct 27, 2011, at 3:19 PM, Satish Balay wrote:
> 
> > Are you sure sowing got rebuilt? [the other requirement for rebuild is 'rm PETSC_ARCH/conf/sowing']
> > 
> > Satish
> > 
> > ---------
> > asterix:/home/balay/hg-repo/petsc-release-3.2>diff -Nru ./src/ts/interface/ftn-auto/tsf.c ~/tmp/petsc-dist-test/./src/ts/interface/ftn-auto/tsf.c
> > --- ./src/ts/interface/ftn-auto/tsf.c              2011-10-23 12:24:44.019970587 -0500
> > +++ /home/balay/tmp/petsc-dist-test/./src/ts/interface/ftn-auto/tsf.c            2011-10-27 15:05:35.883363505 -0500
> > @@ -386,8 +386,7 @@
> > }
> > void PETSC_STDCALL  tsgetconvergedreason_(TS ts,TSConvergedReason *reason, int *__ierr ){
> > *__ierr = TSGetConvergedReason(
> > -        (TS)PetscToPointer((ts) ),
> > -        (TSConvergedReason* )PetscToPointer((reason) ));
> > +        (TS)PetscToPointer((ts) ),reason);
> > }
> > void PETSC_STDCALL  tsvisetvariablebounds_(TS ts,Vec xl,Vec xu, int *__ierr ){
> > *__ierr = TSVISetVariableBounds(
> > asterix:/home/balay/hg-repo/petsc-release-3.2>
> > 
> > 
> > On Thu, 27 Oct 2011, Blaise Bourdin wrote:
> > 
> >> after deleting externalpackages/sow*, updating petsc and BuildSystem, reconfiguring, deleting src/ts/interface/ftn-auto/tsf.c, regenerating the fortran bindings, then rebuilding, I still get the same error (and the fortan binding is unchanged)
> >> 
> >> Blaise
> >> 
> >> On Oct 27, 2011, at 3:02 PM, Satish Balay wrote:
> >> 
> >>> I  just updated the tarball with an entry for TSGetConvergedReason
> >>> [hence the rebuild request]
> >>> 
> >>> 
> >>> Satish
> >>> 
> >>> On Thu, 27 Oct 2011, Blaise Bourdin wrote:
> >>> 
> >>>> Satish,
> >>>> 
> >>>> This is a brand new petsc configured and installed today using sowing 1.1.16c
> >>>> 
> >>>> Blaise
> >>>> 
> >>>> On Oct 27, 2011, at 2:57 PM, Satish Balay wrote:
> >>>> 
> >>>>> Can you do the following and configure/rebuild petsc-dev - and see if
> >>>>> the error goes away?
> >>>>> 
> >>>>> rm -rf externalpacakges/sowing* PETSC_ARCH/conf/sowing
> >>>>> 
> >>>>> Satish
> >>>>> 
> >>>>> On Thu, 27 Oct 2011, Blaise Bourdin wrote:
> >>>>> 
> >>>>>> Hi,
> >>>>>> 
> >>>>>> Thanks for all the help in tracking our issue with TS... I think that  there is a small problem with the auto binding for TSGetConvergedReason (both dev and 3.2).
> >>>>>> I added a call to TSGetConvergedReason after the TSSolve in ex22f.F and get the following result:
> >>>>>> 
> >>>>>> (gdb) cont
> >>>>>> Continuing.
> >>>>>> [0]PETSC ERROR: TSGetConvergedReason() line 2755 in /opt/HPC/petsc-dev/src/ts/interface/ts.c Invalid Pointer: Parameter # 2
> >>>>>> 
> >>>>>> Program received signal SIGABRT, Aborted.
> >>>>>> 0x00007fff98e4e82a in __kill ()
> >>>>>> (gdb) where
> >>>>>> #0  0x00007fff98e4e82a in __kill ()
> >>>>>> #1  0x00007fff975f7a9c in abort ()
> >>>>>> #2  0x0000000105bcbd52 in PetscAbortErrorHandler (comm=1140850689, line=2755, fun=0x10691bb70 'TSGetConvergedReason\000', file=0x10691ae38 '/opt/HPC/petsc-dev/src/ts/interface/ts.c\000', dir=0x1068be9a0 '\000', n=68, p=Invalid F77 type code 5 in symbol table.
> >>>>>> ) at errabort.c:62
> >>>>>> #3  0x0000000105bc4ce4 in PetscError (comm=1140850689, line=2755, func=0x10691bb70 'TSGetConvergedReason\000', file=0x10691ae38 '/opt/HPC/petsc-dev/src/ts/interface/ts.c\000', dir=0x1068be9a0 '\000', n=68, p=Invalid F77 type code 5 in symbol table.
> >>>>>> ) at err.c:356
> >>>>>> #4  0x000000010689e86b in TSGetConvergedReason (ts=0x7f7fab8e4370, reason=0x162f727375) at ts.c:2755
> >>>>>> #5  0x000000010682772d in tsgetconvergedreason_ (ts=0x7fff656ccf80, reason=0x7fff656ccf8c, __ierr=0x7fff656ccfa8) at tsf.c:433
> >>>>>> #6  0x0000000105ad037a in MAIN__ () at ex22f.F:127
> >>>>>> #7  0x0000000105ad0426 in main (argc=3, argv=0x7fff656cd208 './ex22f\000') at ex22f.F:137
> >>>>>> 
> >>>>>> 
> >>>>>> 
> >>>>>> 
> >>>>>> If I replace te current binding in src/ts/interface/ftn-auto/tsf.c (yes, I know I am not supposed to do that):
> >>>>>> void PETSC_STDCALL  tsgetconvergedreason_(TS ts,TSConvergedReason *reason, int *__ierr ){
> >>>>>> *__ierr = TSGetConvergedReason(
> >>>>>>      (TS)PetscToPointer((ts) ),
> >>>>>>      (TSConvergedReason* )PetscToPointer((reason) ));
> >>>>>> 
> >>>>>> with this one:
> >>>>>> void PETSC_STDCALL  tsgetconvergedreason_(TS ts,TSConvergedReason *reason, int *__ierr ){
> >>>>>> *__ierr = TSGetConvergedReason(
> >>>>>>      (TS)PetscToPointer((ts) ),
> >>>>>>      reason);
> >>>>>> }
> >>>>>> 
> >>>>>> everything seems to work OK. Does this function need a custom binding?
> >>>>>> 
> >>>>>> And also, the man page for TSGetConvergedReason states "see TSConvergedReason or the manual pages for the individual convergence tests for complete lists", but this man page does not seem to exist.
> >>>>>> 
> >>>>>> Thanks,
> >>>>>> 
> >>>>>> Blaise
> >>>>>> 
> >>>>>> 
> >>>>> 
> >>>> 
> >>>> 
> >>> 
> >> 
> >> 
> > 
> 
> 




More information about the petsc-dev mailing list