Dear Barry,
In my previous email, that is a typo.

In the actual code, I did use:
PreLoadStage("A");
PreLoadStage("B"),

Ok, I see the difference:
I use the PetscOptionsSetValue("-log_summary",""); after the preloading
section. And so when I submit the job, I did not include the command line
option -log_summary again. This seems having confused the code.
And this behavior causes some of the statistics missing as I reported above.

After remove the function call PetscOptionsSetValue("-log_summary","") in the
code and use command line option -log_summary. It worked. And all the
information is complete now.

Thanks a lot for the help,

Yan


On Thu, Jun 30, 2011 at 9:49 PM, Barry Smith <bsmith@mcs.anl.gov> wrote:

PreLoadStage((PETSC_TRUE, "B"), doesn't take a PetscBool argument.


src/snes/examples/tutorials/ex19.c uses these preload macros and does produce a table of the operations done. What is different in your code?

  Barry


On Jun 30, 2011, at 5:47 PM, Ryan Yan wrote:

> Dear All,
> I am using a developer version of  PETSc code to test a solver code.
>
> The code loads a matrix, and solves the matrix by method
> A first and then method B. In each method of A and B, I setup KSP, solve,
> and then destroy KSP. So in this process, I set up KSP twice and destroy
> the KSP object twice.
>
> I am using the PreLoadxxx to do the profiling but seems like part of the
> profiling information is missing.
>
> PreLoadBegin(PETSC_TRUE, "A"),
> PreLoadStage((PETSC_TRUE, "B"),
> PreLoadEnd()
>
> The missing part is:
>
>
> Event                Count      Time (sec)     Flops                             --- Global ---  --- Stage ---   Total
>                    Max Ratio  Max     Ratio   Max  Ratio  Mess   Avg len Reduct  %T %F %M %L %R  %T %F %M %L %R Mflop/s
> ------------------------------------------------------------------------------------------------------------------------
>
> --- Event Stage 0: Main Stage
>
>
> --- Event Stage 1: A
>
>
> --- Event Stage 2: B
>
> ------------------------------------------------------------------------------------------------------------------------
>
>
> Is there any way to workaround this?
>
> Many thanks,
>
> Yan
>