[petsc-users] PetscLogStage functions not working in fortran

luc berger-vergiat lb2653 at columbia.edu
Sun Mar 1 08:20:08 CST 2015


True,
that’ll teach me to wait until the next morning before mailing the user-list when I program at 1am…
Thanks a lot for taking the time to help anyway!

Best,
Luc

> On Mar 1, 2015, at 9:15 AM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> Don't you need a 'call' first?
> 
>    Matt
> 
> On Sun, Mar 1, 2015 at 8:09 AM, luc berger-vergiat <lb2653 at columbia.edu <mailto:lb2653 at columbia.edu>> wrote:
> I get the following:
> 
> nm /home/luc/research/petsc-3.5.2/arch-opt/lib/libpetsc.a | grep -i PetscLogStageRegister
> 0000000000000338 T PetscLogStageRegister
> 00000000000004ba T petsclogstageregister_
>                  U PetscLogStageRegister
>                  U PetscLogStageRegister
> 
>> On Mar 1, 2015, at 9:06 AM, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> wrote:
>> 
>> On Sun, Mar 1, 2015 at 12:28 AM, Luc Berger-Vergiat <lb2653 at columbia.edu <mailto:lb2653 at columbia.edu>> wrote:
>> Hi all,
>> I am trying to fine gain a little my program profiling but cannot get PetscLogStageRegiset, PetscLogStagePush and PetscLogStagePop to work in my Fortran code.
>> Here is my fortran subroutine:
>> 
>> They are certainly there:
>> 
>>   https://bitbucket.org/petsc/petsc/src/5620d6dc8304f23d8d30f97758f32d1dd71aa0ff/src/sys/logging/ftn-custom/zplogf.c?at=master#cl-118 <https://bitbucket.org/petsc/petsc/src/5620d6dc8304f23d8d30f97758f32d1dd71aa0ff/src/sys/logging/ftn-custom/zplogf.c?at=master#cl-118>
>> 
>> What do you get for
>> 
>>   nm $PETSC_ARCH/lib/libpetsc.a | grep -i PetscLogStageRegister
>> 
>>      Matt
>>  
>>       subroutine SetPetscStage(StageNum)
>> 
>>       implicit  none
>> 
>> #     include  "finclude/petsc.h"
>> 
>>       integer        StageNum
>>       character      StageName*5
>>       PetscErrorCode ierr
>>       PetscInt       Stage
>> 
>>       if(StageNum.eq.1) then
>>          Stage = 1
>>          PetscLogStageRegister("Jacobian and residual assembly",
>>      &        Stage,ierr)
>>          PetscLogStagePush(Stage,ierr)
>>       elseif(StageNum.eq.11) then
>>          PetscLogStagePop()
>>       endif
>> 
>>       end
>> 
>> I get the following compiler error when I try to make my program:
>> 
>> SetPetscStage.F:14.9:
>> 
>>          PetscLogStageRegister("Jacobian and residual assembly",
>>          1
>> Error: Unclassifiable statement at (1)
>> SetPetscStage.F:16.9:
>> 
>> PetscLogStagePush(Stage,ierr)
>>          1
>> Error: Unclassifiable statement at (1)
>> SetPetscStage.F:18.9:
>> 
>> PetscLogStagePop()
>>          1
>> Error: Unclassifiable statement at (1)
>> 
>> Any idea on what is be happening?
>> 
>> -- 
>> Best,
>> Luc
>> 
>> 
>> 
>> 
>> 
>> -- 
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150301/71c1fbb6/attachment-0001.html>


More information about the petsc-users mailing list