<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hm, valgrind gives a lot of output like that (see full log in
    previous message):<br>
    <br>
    ==20287== Invalid read of size 8<br>
    ==20287==    at 0x1AE79DA1: mkl_lapack_dlasq3 (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_lapack.so)<br>
    ==20287==    by 0x5CF7AE5: mkl_lapack_dlasq3 (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_thread.so)<br>
    ==20287==    by 0x1AE79617: mkl_lapack_dlasq2 (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_lapack.so)<br>
    ==20287==    by 0x5CF7A15: mkl_lapack_dlasq2 (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_thread.so)<br>
    ==20287==    by 0x1AA3E72A: mkl_lapack_dlasq1 (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_lapack.so)<br>
    ==20287==    by 0x5CF79C7: mkl_lapack_dlasq1 (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_thread.so)<br>
    ==20287==    by 0x1AC44D6C: mkl_lapack_zbdsqr (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_lapack.so)<br>
    ==20287==    by 0x5CFFEF8: mkl_lapack_zbdsqr (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_thread.so)<br>
    ==20287==    by 0x1AC7D989: mkl_lapack_zgesvd (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_lapack.so)<br>
    ==20287==    by 0x5D021C0: mkl_lapack_zgesvd (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_thread.so)<br>
    ==20287==    by 0x5899E43: ZGESVD (in
    /opt/intel/Compiler/11.1/072/mkl/lib/em64t/libmkl_intel_lp64.so)<br>
    ==20287==    by 0x697017: KSPComputeExtremeSingularValues_GMRES
    (gmreig.c:46)<br>
    ==20287==    by 0x69EFBA: KSPComputeExtremeSingularValues
    (itfunc.c:47)<br>
    ==20287==    by 0x4509BC: main (solveTest.c:62)<br>
    ==20287==  Address 0x11363d48 is not stack'd, malloc'd or (recently)
    free'd<br>
    <br>
    On 06.05.2012 15:21, Alexander Grayver wrote:
    <blockquote cite="mid:4FA67AD8.8040109@gfz-potsdam.de" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 06.05.2012 15:07, Matthew Knepley wrote:<br>
      <blockquote
cite="mid:CAMYG4GksjLtwPr4Z5tvjWNFHFq1wjcpMhXmEKkO6soekFD7X3A@mail.gmail.com"
        type="cite">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div bgcolor="#ffffff" text="#000000">
              <blockquote type="cite">
                <div class="gmail_quote">
                  <blockquote class="gmail_quote" style="margin: 0pt 0pt
                    0pt 0.8ex; border-left: 1px solid rgb(204, 204,
                    204); padding-left: 1ex;"> Hello,<br>
                    <br>
                    I use KSP and random rhs to compute largest singular
                    value:<br>
                  </blockquote>
                  <div><br>
                  </div>
                  <div>1) Is this the whole program? If not, this can be
                    caused by memory corruption somewhere else. This is
                    what I suspect.</div>
                </div>
              </blockquote>
              <br>
              Matt,<br>
              <br>
              I can reproduce error using attached test programm and
              this matrix (7 mb):<br>
              <a moz-do-not-send="true"
                href="http://dl.dropbox.com/u/60982984/A.dat"
                target="_blank">http://dl.dropbox.com/u/60982984/A.dat</a></div>
          </blockquote>
          <div><br>
          </div>
          <div>I run it fine with the latest petsc-dev:</div>
          <div><br>
          </div>
          <div>  1.405802e+00</div>
          <div><br>
          </div>
          <div>Can you valgrind it on your machine?</div>
        </div>
        <br>
      </blockquote>
      <br>
      I did:<br>
      valgrind --tool=memcheck -q --num-callers=20
      --log-file=valgrind.log.%p /solveTest -ksp_monitor_true_residual
      -log_summary -mat_type aij -ksp_rtol 1.0e-10 -malloc off<br>
      <br>
      The error is better constrained:<br>
      <br>
      ==20287== Invalid read of size 8<br>
      ==20287==    at 0x7874B4C: opal_os_path (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libopen-pal.so.0.0.0)<br>
      ==20287==    by 0x75F2E27: orte_session_dir_finalize (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libopen-rte.so.0.0.0)<br>
      ==20287==    by 0x76012E8: orte_errmgr_base_error_abort (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libopen-rte.so.0.0.0)<br>
      ==20287==    by 0x73396E9: ompi_mpi_abort (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libmpi.so.0.0.2)<br>
      ==20287==    by 0x734F36E: PMPI_Abort (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libmpi.so.0.0.2)<br>
      ==20287==    by 0x7499AB: PetscDefaultSignalHandler (signal.c:169)<br>
      ==20287==    by 0x749267: PetscSignalHandler_Private (signal.c:53)<br>
      ==20287==    by 0x924B9DF: ??? (in /lib64/libc-2.11.1.so)<br>
      ==20287==    by 0x535D9E: VecDestroyVecs (vector.c:653)<br>
      ==20287==    by 0x68B61D: KSPReset_GMRES (gmres.c:258)<br>
      ==20287==    by 0x6A9D39: KSPReset (itfunc.c:733)<br>
      ==20287==    by 0x6AA839: KSPDestroy (itfunc.c:780)<br>
      ==20287==    by 0x4509F8: main (solveTest.c:66)<br>
      ==20287==  Address 0xbde4860 is 0 bytes inside a block of size 2
      alloc'd<br>
      ==20287==    at 0x4C26B9B: malloc (vg_replace_malloc.c:263)<br>
      ==20287==    by 0x92876DF: vasprintf (in /lib64/libc-2.11.1.so)<br>
      ==20287==    by 0x9266C67: asprintf (in /lib64/libc-2.11.1.so)<br>
      ==20287==    by 0x75F1701: orte_util_convert_vpid_to_string (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libopen-rte.so.0.0.0)<br>
      ==20287==    by 0x75F2D4A: orte_session_dir_finalize (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libopen-rte.so.0.0.0)<br>
      ==20287==    by 0x76012E8: orte_errmgr_base_error_abort (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libopen-rte.so.0.0.0)<br>
      ==20287==    by 0x73396E9: ompi_mpi_abort (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libmpi.so.0.0.2)<br>
      ==20287==    by 0x734F36E: PMPI_Abort (in
      /opt/mpi/intel/openmpi-1.4.2/lib/libmpi.so.0.0.2)<br>
      ==20287==    by 0x7499AB: PetscDefaultSignalHandler (signal.c:169)<br>
      ==20287==    by 0x749267: PetscSignalHandler_Private (signal.c:53)<br>
      ==20287==    by 0x924B9DF: ??? (in /lib64/libc-2.11.1.so)<br>
      ==20287==    by 0x535D9E: VecDestroyVecs (vector.c:653)<br>
      ==20287==    by 0x68B61D: KSPReset_GMRES (gmres.c:258)<br>
      ==20287==    by 0x6A9D39: KSPReset (itfunc.c:733)<br>
      ==20287==    by 0x6AA839: KSPDestroy (itfunc.c:780)<br>
      ==20287==    by 0x4509F8: main (solveTest.c:66)<br>
      <br>
      Full log is attached.<br>
      <br>
      Important.<br>
      If I comment this line:<br>
      KSPComputeExtremeSingularValues(ksp, &maxx, &minx);<br>
      <br>
      It works. <br>
      <br>
      -- <br>
      <pre class="moz-signature" cols="72">Regards,
Alexander</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Regards,
Alexander</pre>
  </body>
</html>