[petsc-users] "snes/examples/tutorials/ex1f -snes_type fas" fails with segfault

Natacha BEREUX natacha.bereux at gmail.com
Wed Jun 7 03:52:06 CDT 2017


Hello Nicolas,
I ran snes/examples/tutorials/ex1f -snes_type fas with a recent version
(3.7.6) and I confirm the problem.
The C version works fine, but the Fortran version complains about a Fortran
callback problem.
My output looks quite similar to yours ...
Best regards,
Natacha

mpirun ex1f -snes_type fas
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR: Corrupt argument:
http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: Fortran callback not set on this object
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.7.6, Apr, 24, 2017
[0]PETSC ERROR: ex1f on a linux-opt-mumps-ml-hypre named dsp0780444 by
H03755 Wed Jun  7 10:42:55 2017
[0]PETSC ERROR: Configure options --with-mpi=1 --with-debugging=0
--with-mumps-lib="-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Mumps-511_consortium_aster/MPI/lib
-lzmumps -ldmumps -lmumps_common -lpord
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Parmetis_aster-403_aster/lib
-lparmetis
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Scotch_aster-604_aster6/MPI/lib
-lptscotch  -lptscotcherr  -lptscotcherrexit  -lptscotchparmetis  -lesmumps
-lscotch -lscotcherr -lscotcherrexit
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Metis_aster-510_aster1/lib
-lmetis"
--with-mumps-include=/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Mumps-511_consortium_aster/MPI/include
--download-hypre=/home/H03755/Librairies/hypre-2.11.1.tar.gz
--download-ml=/home/H03755/Librairies/petsc-pkg-ml-e5040d11aa07.tar.gz
--with-openmp=0 --with-scalapack-lib="-lscalapack-openmpi -lblacs-openmpi
-lblacsF77init-openmpi -lblacsCinit-openmpi"
--with-blas-lapack-lib="-llapack -lopenblas"
--PETSC_ARCH=linux-opt-mumps-ml-hypre LIBS=-lgomp
--prefix=/home/H03755/local/petsc/petsc-3.7.6
[0]PETSC ERROR: #1 PetscObjectGetFortranCallback() line 263 in
/home/H03755/Librairies/petsc-3.7.6/src/sys/objects/inherit.c
[0]PETSC ERROR: #2 oursnesjacobian() line 105 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/interface/ftn-custom/zsnesf.c
[0]PETSC ERROR: #3 SNESComputeJacobian() line 2312 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/interface/snes.c
[0]PETSC ERROR: #4 SNESSolve_NEWTONLS() line 228 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/impls/ls/ls.c
[0]PETSC ERROR: #5 SNESSolve() line 4005 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/interface/snes.c
[0]PETSC ERROR: #6 SNESFASDownSmooth_Private() line 512 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/impls/fas/fas.c
[0]PETSC ERROR: #7 SNESFASCycle_Multiplicative() line 816 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/impls/fas/fas.c
[0]PETSC ERROR: #8 SNESSolve_FAS() line 987 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/impls/fas/fas.c
[0]PETSC ERROR: #9 SNESSolve() line 4005 in
/home/H03755/Librairies/petsc-3.7.6/src/snes/interface/snes.c
Number of SNES iterations =     0
************************************************************************************************************************
***             WIDEN YOUR WINDOW TO 120 CHARACTERS.  Use 'enscript -r
-fCourier9' to print this document            ***
************************************************************************************************************************

---------------------------------------------- PETSc Performance Summary:
----------------------------------------------

ex1f on a linux-opt-mumps-ml-hypre named dsp0780444 with 1 processor, by
H03755 Wed Jun  7 10:42:55 2017
Using Petsc Release Version 3.7.6, Apr, 24, 2017

                         Max       Max/Min        Avg      Total
Time (sec):           7.548e-03      1.00000   7.548e-03
Objects:              2.300e+01      1.00000   2.300e+01
Flops:                3.000e+00      1.00000   3.000e+00  3.000e+00
Flops/sec:            3.975e+02      1.00000   3.975e+02  3.975e+02
MPI Messages:         0.000e+00      0.00000   0.000e+00  0.000e+00
MPI Message Lengths:  0.000e+00      0.00000   0.000e+00  0.000e+00
MPI Reductions:       0.000e+00      0.00000

Flop counting convention: 1 flop = 1 real number operation of type
(multiply/divide/add/subtract)
                            e.g., VecAXPY() for real vectors of length N
--> 2N flops
                            and VecAXPY() for complex vectors of length N
--> 8N flops

Summary of Stages:   ----- Time ------  ----- Flops -----  --- Messages
---  -- Message Lengths --  -- Reductions --
                        Avg     %Total     Avg     %Total   counts
%Total     Avg         %Total   counts   %Total
 0:      Main Stage: 7.5421e-03  99.9%  3.0000e+00 100.0%  0.000e+00
0.0%  0.000e+00        0.0%  0.000e+00   0.0%

------------------------------------------------------------------------------------------------------------------------
See the 'Profiling' chapter of the users' manual for details on
interpreting output.
Phase summary info:
   Count: number of times phase was executed
   Time and Flops: Max - maximum over all processors
                   Ratio - ratio of maximum to minimum over all processors
   Mess: number of messages sent
   Avg. len: average message length (bytes)
   Reduct: number of global reductions
   Global: entire computation
   Stage: stages of a computation. Set stages with PetscLogStagePush() and
PetscLogStagePop().
      %T - percent time in this phase         %F - percent flops in this
phase
      %M - percent messages in this phase     %L - percent message lengths
in this phase
      %R - percent reductions in this phase
   Total Mflop/s: 10e-6 * (sum of flops over all processors)/(max time over
all processors)
------------------------------------------------------------------------------------------------------------------------
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

SNESFunctionEval       1 1.0 7.8678e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00  0  0  0  0  0   0  0  0  0  0     0
VecNorm                1 1.0 6.1989e-06 1.0 3.00e+00 1.0 0.0e+00 0.0e+00
0.0e+00  0100  0  0  0   0100  0  0  0     0
VecSet                 8 1.0 1.9073e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00  0  0  0  0  0   0  0  0  0  0     0
MatZeroEntries         1 1.0 0.0000e+00 0.0 0.00e+00 0.0 0.0e+00 0.0e+00
0.0e+00  0  0  0  0  0   0  0  0  0  0     0
------------------------------------------------------------------------------------------------------------------------

Memory usage is given in bytes:

Object Type          Creations   Destructions     Memory  Descendants' Mem.
Reports information only for process 0.

--- Event Stage 0: Main Stage

                SNES     2              2         2828     0.
      SNESLineSearch     2              2         1992     0.
              DMSNES     1              1          672     0.
              Vector     6              6         9312     0.
              Matrix     2              2         6536     0.
    Distributed Mesh     1              1         4624     0.
Star Forest Bipartite Graph     2              2         1616     0.
     Discrete System     1              1          872     0.
       Krylov Solver     2              2         2704     0.
     DMKSP interface     1              1          656     0.
      Preconditioner     2              2         1832     0.
              Viewer     1              0            0     0.
========================================================================================================================
Average time to get PetscTime(): 0.
#PETSc Option Table entries:
-ksp_monitor
-ksp_view
-log_view
-snes_type fas
#End of PETSc Option Table entries
Compiled without FORTRAN kernels
Compiled with full precision matrices (default)
sizeof(short) 2 sizeof(int) 4 sizeof(long) 8 sizeof(void*) 8
sizeof(PetscScalar) 8 sizeof(PetscInt) 4
Configure options: --with-mpi=1 --with-debugging=0
--with-mumps-lib="-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Mumps-511_consortium_aster/MPI/lib
-lzmumps -ldmumps -lmumps_common -lpord
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Parmetis_aster-403_aster/lib
-lparmetis
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Scotch_aster-604_aster6/MPI/lib
-lptscotch  -lptscotcherr  -lptscotcherrexit  -lptscotchparmetis  -lesmumps
-lscotch -lscotcherr -lscotcherrexit
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Metis_aster-510_aster1/lib
-lmetis"
--with-mumps-include=/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Mumps-511_consortium_aster/MPI/include
--download-hypre=/home/H03755/Librairies/hypre-2.11.1.tar.gz
--download-ml=/home/H03755/Librairies/petsc-pkg-ml-e5040d11aa07.tar.gz
--with-openmp=0 --with-scalapack-lib="-lscalapack-openmpi -lblacs-openmpi
-lblacsF77init-openmpi -lblacsCinit-openmpi"
--with-blas-lapack-lib="-llapack -lopenblas"
--PETSC_ARCH=linux-opt-mumps-ml-hypre LIBS=-lgomp
--prefix=/home/H03755/local/petsc/petsc-3.7.6
-----------------------------------------
Libraries compiled on Fri Apr 28 15:23:58 2017 on dsp0780444
Machine characteristics: Linux-3.16.0-4-amd64-x86_64-with-debian-8.7
Using PETSc directory: /home/H03755/Librairies/petsc-3.7.6
Using PETSc arch: linux-opt-mumps-ml-hypre
-----------------------------------------

Using C compiler: mpicc  -fPIC  -Wall -Wwrite-strings -Wno-strict-aliasing
-Wno-unknown-pragmas -fvisibility=hidden -g -O  ${COPTFLAGS} ${CFLAGS}
Using Fortran compiler: mpif90  -fPIC -Wall -ffree-line-length-0
-Wno-unused-dummy-argument -g -O   ${FOPTFLAGS} ${FFLAGS}
-----------------------------------------

Using include paths:
-I/home/H03755/Librairies/petsc-3.7.6/linux-opt-mumps-ml-hypre/include
-I/home/H03755/Librairies/petsc-3.7.6/include
-I/home/H03755/Librairies/petsc-3.7.6/include
-I/home/H03755/Librairies/petsc-3.7.6/linux-opt-mumps-ml-hypre/include
-I/home/H03755/dev/codeaster-prerequisites/v13/prerequisites/Mumps-511_consortium_aster/MPI/include
-I/home/H03755/local/petsc/petsc-3.7.6/include
-----------------------------------------

Using C linker: mpicc
Using Fortran linker: mpif90
Using libraries:
-Wl,-rpath,/home/H03755/Librairies/petsc-3.7.6/linux-opt-mumps-ml-hypre/lib
-L/home/H03755/Librairies/petsc-3.7.6/linux-opt-mumps-ml-hypre/lib -lpetsc
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Mumps-511_consortium_aster/MPI/lib
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Parmetis_aster-403_aster/lib
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Scotch_aster-604_aster6/MPI/lib
-L/home/H03755/dev/codeaster-prerequisites/v13/prerequisites//Metis_aster-510_aster1/lib
-Wl,-rpath,/home/H03755/local/petsc/petsc-3.7.6/lib
-L/home/H03755/local/petsc/petsc-3.7.6/lib -Wl,-rpath,/usr/lib/openmpi/lib
-L/usr/lib/openmpi/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9 -Wl,-rpath,/usr/lib/x86_64-linux-gnu
-L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -lzmumps -ldmumps -lmumps_common -lpord -lparmetis
-lptscotch -lptscotcherr -lptscotcherrexit -lptscotchparmetis -lesmumps
-lscotch -lscotcherr -lscotcherrexit -lmetis -lHYPRE -lmpi_cxx -lstdc++ -lm
-lscalapack-openmpi -lblacs-openmpi -lblacsF77init-openmpi
-lblacsCinit-openmpi -lml -lmpi_cxx -lstdc++ -lm -llapack -lopenblas -lX11
-lssl -lcrypto -lm -lmpi_f90 -lmpi_f77 -lgfortran -lm -lgfortran -lm
-lquadmath -lmpi_cxx -lstdc++ -lm -ldl -lgomp -lmpi -lhwloc -lgcc_s
-lpthread -ldl -lgomp


On Mon, Jun 5, 2017 at 10:12 AM, Karin&NiKo <niko.karin at gmail.com> wrote:

> Dear PETSc team,
>
> If I run "snes/examples/tutorials/ex1 -snes_type fas", everything is OK.
> But with its Fortran version  "snes/examples/tutorials/ex1f -snes_type
> fas", I get a segfault (see error below).
> Do you confirm or did I miss something?
>
> Best regards,
> Nicolas
>
> ------------------------------------------------------------
> --------------------------------------------------------------------------
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Corrupt argument: http://www.mcs.anl.gov/petsc/
> documentation/faq.html#valgrind
> [0]PETSC ERROR: Fortran callback not set on this object
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.7.2, Jun, 05, 2016
> [0]PETSC ERROR:
>
>
>                                                on a arch-linux2-c-debug
> named dsp0780450 by niko Thu Jun  1 16:18:43 2017
> [0]PETSC ERROR: Configure options --prefix=/home/niko/dev/
> codeaster-prerequisites/petsc-3.7.2/Install --with-mpi=yes --with-x=yes
> --download-ml=/home/niko/dev/codeaster-prerequisites/petsc-3.7.2/ml-6.2-p3.tar.gz
> --with-mumps-lib="-L/home/niko/dev/codeaster-prerequisites/v13/
> prerequisites/Mumps-502_consortium_aster1/MPI/lib -lzmumps -ldmumps
> -lmumps_common -lpord -L/home/niko/dev/codeaster-prerequisites/v13/
> prerequisites/Scotch_aster-604_aster6/MPI/lib -lesmumps -lptscotch
> -lptscotcherr -lptscotcherrexit -lscotch -lscotcherr -lscotcherrexit
> -L/home/niko/dev/codeaster-prerequisites/v13/prerequisites/Parmetis_aster-403_aster/lib
> -lparmetis -L/home/niko/dev/codeaster-prerequisites/v13/
> prerequisites/Metis_aster-510_aster1/lib -lmetis -L/usr/lib
> -lscalapack-openmpi -L/usr/lib -lblacs-openmpi -lblacsCinit-openmpi
> -lblacsF77init-openmpi -L/usr/lib/x86_64-linux-gnu -lgomp "
> --with-mumps-include=/home/niko/dev/codeaster-prerequisites/v13/
> prerequisites/Mumps-502_consortium_aster1/MPI/include
> --with-scalapack-lib="-L/usr/lib -lscalapack-openmpi"
> --with-blacs-lib="-L/usr/lib -lblacs-openmpi -lblacsCinit-openmpi
> -lblacsF77init-openmpi" --with-blas-lib="-L/usr/lib -lopenblas -lcblas"
> --with-lapack-lib="-L/usr/lib -llapack"
> [0]PETSC ERROR: #1 PetscObjectGetFortranCallback() line 263 in
> /home/niko/dev/codeaster-prerequisites/petsc-3.7.2/src/
> sys/objects/inherit.c
> [0]PETSC ERROR: #2 oursnesjacobian() line 105 in /home/niko/dev/codeaster-
> prerequisites/petsc-3.7.2/src/snes/interface/ftn-custom/zsnesf.c
> [0]PETSC ERROR: #3 SNESComputeJacobian() line 2312 in
> /home/niko/dev/codeaster-prerequisites/petsc-3.7.2/src/
> snes/interface/snes.c
> [0]PETSC ERROR: #4 SNESSolve_NEWTONLS() line 228 in
> /home/niko/dev/codeaster-prerequisites/petsc-3.7.2/src/snes/impls/ls/ls.c
> [0]PETSC ERROR: #5 SNESSolve() line 4008 in /home/niko/dev/codeaster-
> prerequisites/petsc-3.7.2/src/snes/interface/snes.c
> [0]PETSC ERROR: #6 SNESFASDownSmooth_Private() line 512 in
> /home/niko/dev/codeaster-prerequisites/petsc-3.7.2/src/
> snes/impls/fas/fas.c
> [0]PETSC ERROR: #7 SNESFASCycle_Multiplicative() line 816 in
> /home/niko/dev/codeaster-prerequisites/petsc-3.7.2/src/
> snes/impls/fas/fas.c
> [0]PETSC ERROR: #8 SNESSolve_FAS() line 987 in /home/niko/dev/codeaster-
> prerequisites/petsc-3.7.2/src/snes/impls/fas/fas.c
> [0]PETSC ERROR: #9 SNESSolve() line 4008 in /home/niko/dev/codeaster-
> prerequisites/petsc-3.7.2/src/snes/interface/snes.c
> ------------------------------------------------------------
> --------------------------------------------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170607/35c89c1a/attachment-0001.html>


More information about the petsc-users mailing list