On Wed, Nov 2, 2011 at 2:30 AM, Debao Shao <span dir="ltr"><<a href="mailto:Debao.Shao@brion.com">Debao.Shao@brion.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="ZH-CN" link="blue" vlink="blue">
<div>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Hi, Matt:
<u></u><u></u></span></font></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">1, I tried both “PetscLogAllBegin()” & “PetscLogBegin()”, but both of them don’t print log summary.<u></u><u></u></span></font></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">2, I disabled MPI(--with-mpi=0), will MPI_COMM_SELF have difference to PETSC_COMM_WORLD?</span></font></p>
</div></div></blockquote><div><br></div><div>Works for me:</div><div><br></div><div><div>#include <petscsys.h></div><div><br></div><div>#undef __FUNCT__</div><div>#define __FUNCT__ "main"</div><div>int main(int argc, char **argv)</div>
<div>{</div><div> PetscErrorCode ierr;</div><div><br></div><div> ierr = PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);CHKERRQ(ierr);</div><div> ierr = PetscLogBegin();CHKERRQ(ierr);</div><div> ierr = PetscLogView(PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);</div>
<div> ierr = PetscFinalize();</div><div> return 0;</div><div>}</div></div><div><br></div><div>which gives</div><div><br></div><div><div>Executing: /PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/bin/mpiexec -n 1 /PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/lib/tester-obj/tester </div>
<div>sh: ************************************************************************************************************************</div><div>*** WIDEN YOUR WINDOW TO 120 CHARACTERS. Use 'enscript -r -fCourier9' to print this document ***</div>
<div>************************************************************************************************************************</div><div>---------------------------------------------- PETSc Performance Summary: ----------------------------------------------</div>
<div>/PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/lib/tester-obj/tester on a arch-siev named MATTHEW-KNEPLEYs-MacBook-Air-2.local with 1 processor, by knepley Tue Nov 1 21:50:08 2011</div><div>Using Petsc Development HG revision: 56a54b25d97df6f01a55abded4076de34409738b HG Date: Tue Nov 01 17:11:12 2011 -0500</div>
<div> Max Max/Min Avg Total </div><div>Time (sec): 5.988e-03 1.00000 5.988e-03</div><div>Objects: 1.000e+00 1.00000 1.000e+00</div><div>Flops: 0.000e+00 0.00000 0.000e+00 0.000e+00</div>
<div>Flops/sec: 0.000e+00 0.00000 0.000e+00 0.000e+00</div><div>Memory: 8.486e+04 1.00000 8.486e+04</div><div>MPI Messages: 0.000e+00 0.00000 0.000e+00 0.000e+00</div>
<div>MPI Message Lengths: 0.000e+00 0.00000 0.000e+00 0.000e+00</div><div>MPI Reductions: 1.000e+00 1.00000</div><div>Flop counting convention: 1 flop = 1 real number operation of type (multiply/divide/add/subtract)</div>
<div> e.g., VecAXPY() for real vectors of length N --> 2N flops</div><div> and VecAXPY() for complex vectors of length N --> 8N flops</div><div>Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions --</div>
<div> Avg %Total Avg %Total counts %Total Avg %Total counts %Total </div><div> 0: Main Stage: 5.9600e-03 99.5% 0.0000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% </div>
<div>------------------------------------------------------------------------------------------------------------------------</div><div>See the 'Profiling' chapter of the users' manual for details on interpreting output.</div>
<div>Phase summary info:</div><div> Count: number of times phase was executed</div><div> Time and Flops: Max - maximum over all processors</div><div> Ratio - ratio of maximum to minimum over all processors</div>
<div> Mess: number of messages sent</div><div> Avg. len: average message length</div><div> Reduct: number of global reductions</div><div> Global: entire computation</div><div> Stage: stages of a computation. Set stages with PetscLogStagePush() and PetscLogStagePop().</div>
<div> %T - percent time in this phase %f - percent flops in this phase</div><div> %M - percent messages in this phase %L - percent message lengths in this phase</div><div> %R - percent reductions in this phase</div>
<div> Total Mflop/s: 10e-6 * (sum of flops over all processors)/(max time over all processors)</div><div>------------------------------------------------------------------------------------------------------------------------</div>
<div> ##########################################################</div><div> # #</div><div> # WARNING!!! #</div>
<div> # #</div><div> # This code was compiled with a debugging option, #</div><div> # To get timing results run ./configure #</div>
<div> # using --with-debugging=no, the performance will #</div><div> # be generally two or three times faster. #</div><div> # #</div>
<div> ##########################################################</div><div>Event Count Time (sec) Flops --- Global --- --- Stage --- Total</div><div> Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %f %M %L %R %T %f %M %L %R Mflop/s</div>
<div>------------------------------------------------------------------------------------------------------------------------</div><div>--- Event Stage 0: Main Stage</div><div>------------------------------------------------------------------------------------------------------------------------</div>
<div>Memory usage is given in bytes:</div><div>Object Type Creations Destructions Memory Descendants' Mem.</div><div>Reports information only for process 0.</div><div>--- Event Stage 0: Main Stage</div>
<div> Viewer 1 0 0 0</div><div>========================================================================================================================</div><div>Average time to get PetscTime(): 4.05312e-07</div>
<div>#No PETSc Option Table entries</div><div>Compiled without FORTRAN kernels</div><div>Compiled with full precision matrices (default)</div><div>sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8 sizeof(PetscScalar) 8</div>
<div>Configure run at: Tue Nov 1 18:04:19 2011</div><div>Configure options: --PETSC_ARCH=arch-sieve-fdatatypes-debug --download-boost --download-chaco --download-fiat --download-hdf5 --download-ml --download-mpich --download-netcdf --download-parmetis --download-scientificpython --download-tetgen --download-triangle --with-clanguage=C++ --with-dynamic-loading --with-exodusii-dir=/PETSc3/petsc/exodusii-4.98 --with-fc="gfortran -cpp" --with-fortran-datatypes --with-shared-libraries --with-sieve --with-sieve-memory-logging</div>
<div>-----------------------------------------</div><div>Libraries compiled on Tue Nov 1 18:04:19 2011 on MATTHEW-KNEPLEYs-MacBook-Air-2.local </div><div>Machine characteristics: Darwin-10.8.0-i386-64bit</div><div>Using PETSc directory: /PETSc3/petsc/petsc-dev-pylith</div>
<div>Using PETSc arch: arch-sieve-fdatatypes-debug</div><div>-----------------------------------------</div><div>Using C compiler: /PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/bin/mpicxx -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g -PIC ${COPTFLAGS} ${CFLAGS}</div>
<div>Using Fortran compiler: /PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/bin/mpif90 -fPIC -Wall -Wno-unused-variable -Wno-unused-dummy-argument -g ${FOPTFLAGS} ${FFLAGS} </div><div>-----------------------------------------</div>
<div>Using include paths: -I/PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/include -I/PETSc3/petsc/petsc-dev-pylith/include -I/PETSc3/petsc/petsc-dev-pylith/include -I/PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/include -I/PETSc3/petsc/petsc-dev-pylith/include/sieve -I/PETSc3/petsc/exodusii-4.98/include -I/PETSc3/petsc/exodusii-4.98/cbind/include -I/PETSc3/petsc/exodusii-4.98/forbind/include</div>
<div>-----------------------------------------</div><div>Using C linker: /PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/bin/mpicxx</div><div>Using Fortran linker: /PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/bin/mpif90</div>
<div>Using libraries: -L/PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/lib -L/PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/lib -lpetsc -L/PETSc3/petsc/petsc-dev-pylith/arch-sieve-fdatatypes-debug/lib -ltriangle -L/usr/X11R6/lib -lX11 -lchaco -lml -lparmetis -lmetis -lpthread -ltet -llapack -lblas -L/PETSc3/petsc/exodusii-4.98/. -lexoIIv2for -lexodus -lnetcdf_c++ -lnetcdf -lhdf5_fortran -lhdf5 -lz -L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64 -L/usr/lib/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -ldl -lpmpich -lmpich -lopa -lmpl -lpthread -lSystem -lmpichf90 -lgfortran -L/usr/local/lib/gcc/x86_64-apple-darwin10.4.0/4.6.0 -L/usr/local/lib -lgfortran -lgcc_ext.10.5 -lmpichcxx -lstdc++ -lmpichcxx -lstdc++ -ldl -lpmpich -lmpich -lopa -lmpl -lpthread -lSystem -ldl </div>
<div>-----------------------------------------</div></div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="ZH-CN" link="blue" vlink="blue">
<div><p class="MsoNormal"><span class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 12px; "> </span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Thanks,<u></u><u></u></span></font></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Debao<u></u><u></u></span></font></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma"> <a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>
[mailto:<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>] <b><span style="font-weight:bold">On Behalf Of
</span></b>Matthew Knepley<br>
<b><span style="font-weight:bold">Sent:</span></b> Tuesday, November 01, 2011 7:03 PM<br>
<b><span style="font-weight:bold">To:</span></b> PETSc users list<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [petsc-users] no profile printed by "PetscLogPrintSummary"</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">On Tue, Nov 1, 2011 at 9:31 AM, Debao Shao <<a href="mailto:Debao.Shao@brion.com" target="_blank">Debao.Shao@brion.com</a>> wrote:<u></u><u></u></span></font></p>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">DA,
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">I intend to use “PetscLogPrintSummary” to dump log summary, but don’t get it.</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">The usage is:
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> PetscInitialize(0, 0, 0, 0);</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> PetscLogAllBegin();</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> …</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> PetscLogPrintSummary(MPI_COMM_SELF, PETSC_NULL);</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:18.0pt">
<font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">PetscFinalize();</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">You only need PetscLogBegin(), and you should use PETSC_COMM_WORLD.<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> Matt<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> <u></u><u></u></span></font></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal" style="text-indent:18.0pt">
<span><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> </span></font></span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">My libpetsc.a is built by
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">1, ./config/configure.py --with-mpi=0 --with-debugging=1 -with-log=1 -with-info=1 --with-x=0;</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">2, make all</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">Thanks,</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial">Debao</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><font size="1" color="gray" face="Arial"><span lang="EN-US" style="font-size:7.5pt;font-family:Arial;color:gray">-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the
sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS
basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and
destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><br>
<br clear="all">
<u></u><u></u></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">--
<br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<u></u><u></u></span></font></p>
</div></div></div><div><div></div><div class="h5">
<br>
<hr>
<font face="Arial" color="Gray" size="1">-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution
is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on
this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and
complete transmission of the information contained in this communication, nor for any delay in its receipt.<br>
</font>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>