> On Jul 24, 2015, at 3:43 PM, Anthony Haas <[email protected]> wrote:
>
> Hi,
>
> I am trying to run my code through the gnu debugger with:
>
> ${PETSC_DIR}/${PETSC_ARCH}/bin/mpirun -n 2 ./BiGlobal_Spectral_Petsc.x
> -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package superlu_dist
> -eps_view -st_ksp_type preonly -st_pc_type lu
> -st_pc_factor_mat_solver_package superlu_dist -start_in_debugger
>
> Following that command, I can see on my main screen:
>
> 3D POISEUILLE BASEFLOW COMPUTED ON GRID WITH NX = 15 NY = 15 ==> this is a
> comment in my program
>
> [0]PETSC ERROR: PETSC: Attaching gdb to ./BiGlobal_Spectral_Petsc.x of pid
> 30562 on display :0 on machine veltins.cfd.ame.arizona.edu
> [1]PETSC ERROR: PETSC: Attaching gdb to ./BiGlobal_Spectral_Petsc.x of pid
> 30563 on display :0 on machine veltins.cfd.ame.arizona.edu
>
>
> And at the same time, I have 2 xterms that open. I have attached (see below)
> the content of 1 of the xterms since their content is very similar. Upon
> opening, the xterms seem to load some debugging info and then, I get:
>
> (gdb)
>
> At that point I type continue in both xterms which then show something like:
> [Inferior 1 (process 30563) exited normally] (see below). And at the same
> time, 2 other xterms open (I have then 4 xterms open).
This is not expected. Are you calling PetscInitialize() multiple times?
> If I type continue in these 2 new xterms, I get: The program is not being run.
Strange.
>
>
> Is the command continue that I have used suitable here?
Yes that is what I do.
> Does the [Inferior 1 (process 30563) exited normally] means that no bug was
> detected?
Usually yes.
> Or does [0]PETSC ERROR: PETSC: Attaching gdb to ... means that something is
> going wrong?
Our printing the string PETSC ERROR here is kind of silly cause there is not
really an error, I'll see if I can eliminate this.
What happens if you use just one MPI process?
1) do you still get the "extra" xterm and gdb?
2) if you use start_in_debugger with one MPI process does it again offer
an "extra" gdb after the first one?
Barry
>
>
> Thanks
>
> Anthony
>
>
>
>
>
>
>
>
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from
> /home/anthony/Desktop/BiGlobal-Fortran-New/PETSc/Build-BiGlobal-Matrices/BiGlobal_Spectral_Petsc.x...done.
> Attaching to program:
> /home/anthony/Desktop/BiGlobal-Fortran-New/PETSc/Build-BiGlobal-Matrices/./BiGlobal_Spectral_Petsc.x,
> process 30563
> Reading symbols from
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libpetsc.so.3.6...done.
> Loaded symbols for
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libpetsc.so.3.6
> Reading symbols from /lib64/libpthread.so.0...(no debugging symbols
> found)...done.
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Loaded symbols for /lib64/libpthread.so.0
> Reading symbols from
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libparmetis.so...done.
> Loaded symbols for
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libparmetis.so
> Reading symbols from
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmetis.so...done.
> Loaded symbols for
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmetis.so
> Reading symbols from /lib64/libX11.so.6...Reading symbols from
> /lib64/libX11.so.6...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libX11.so.6
> Reading symbols from /lib64/libssl.so.10...Reading symbols from
> /lib64/libssl.so.10...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libssl.so.10
> Reading symbols from /lib64/libcrypto.so.10...Reading symbols from
> /lib64/libcrypto.so.10...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libcrypto.so.10
> Reading symbols from /lib64/libgfortran.so.3...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libgfortran.so.3
> Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libm.so.6
> Reading symbols from
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmpifort.so.12...done.
> Loaded symbols for
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmpifort.so.12
> Reading symbols from /lib64/libquadmath.so.0...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libquadmath.so.0
> Reading symbols from
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmpicxx.so.12...done.
> Loaded symbols for
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmpicxx.so.12
> Reading symbols from /lib64/libstdc++.so.6...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libstdc++.so.6
> Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libdl.so.2
> Reading symbols from
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superlu
> dist-complex/lib/libmpi.so.12...done.
> Loaded symbols for
> /home/anthony/LIB/petsc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libmpi.so.12
> Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libgcc_s.so.1
> Reading symbols from
> /home/anthony/LIB/slepc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libslepc.so.3.6...done.
> Loaded symbols for
> /home/anthony/LIB/slepc-3.6.0/linux-gnu-debug-mumps-superludist-complex/lib/libslepc.so.3.6
> Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
> Loaded symbols for /lib64/libc.so.6
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/ld-linux-x86-64.so.2
> Reading symbols from /lib64/libxcb.so.1...Reading symbols from
> /lib64/libxcb.so.1...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libxcb.so.1
> Reading symbols from /lib64/libgssapi_krb5.so.2...Reading symbols from
> /lib64/libgssapi_krb5.so.2...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libgssapi_krb5.so.2
> Reading symbols from /lib64/libkrb5.so.3...Reading symbols from
> /lib64/libkrb5.so.3...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libkrb5.so.3
> Reading symbols from /lib64/libcom_err.so.2...Reading symbols from
> /lib64/libcom_err.so.2...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libcom_err.so.2
> Reading symbols from /lib64/libk5crypto.so.3...Reading symbols from
> /lib64/libk5crypto.so.3...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libk5crypto.so.3
> Reading symbols from /lib64/libz.so.1...Reading symbols from
> /lib64/libz.so.1...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libz.so.1
> Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
> Loaded symbols for /lib64/librt.so.1
> Reading symbols from /lib64/libXau.so.6...Reading symbols from
> /lib64/libXau.so.6...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libXau.so.6
> Reading symbols from /lib64/libkrb5support.so.0...Reading symbols from
> /lib64/libkrb5support.so.0...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libkrb5support.so.0
> Reading symbols from /lib64/libkeyutils.so.1...Reading symbols from
> /lib64/libkeyutils.so.1...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libkeyutils.so.1
> Reading symbols from /lib64/libresolv.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libresolv.so.2
> Reading symbols from /lib64/libselinux.so.1...Reading symbols from
> /lib64/libselinux.so.1...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libselinux.so.1
> Reading symbols from /lib64/libpcre.so.1...Reading symbols from
> /lib64/libpcre.s
> o.1...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/libpcre.so.1
> Reading symbols from /lib64/liblzma.so.5...Reading symbols from
> /lib64/liblzma.so.5...(no debugging symbols found)...done.
> (no debugging symbols found)...done.
> Loaded symbols for /lib64/liblzma.so.5
> Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/libnss_files.so.2
> 0x00007faacd261470 in __nanosleep_nocancel () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install glibc-2.17-78.el7.x86_64
> keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.12.2-14.el7.x86_64
> libX11-1.6.0-2.1.el7.x86_64 libXau-1.0.8-2.1.el7.x86_64
> libcom_err-1.42.9-7.el7.x86_64 libgcc-4.8.3-9.el7.x86_64
> libgfortran-4.8.3-9.el7.x86_64 libquadmath-4.8.3-9.el7.x86_64
> libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.3-9.el7.x86_64
> libxcb-1.9-5.el7.x86_64 openssl-libs-1.0.1e-42.el7.9.x86_64
> pcre-8.32-14.el7.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64
> zlib-1.2.7-13.el7.x86_64
> (gdb) continue
> Continuing.
> Detaching after fork from child process 30734.
> [Inferior 1 (process 30563) exited normally]
>