[petsc-dev] Error when calling PETSc

Hector E Barrios Molano hectorb at utexas.edu
Fri Jun 19 14:09:17 CDT 2015


Hi Satish,

I used MatSetOption, I'm ignoring the performance penalty for now.

Now I have this error:

[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see
http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac
OS X to find memory corruption errors
[0]PETSC ERROR: likely location of problem given in stack below
[0]PETSC ERROR: ---------------------  Stack Frames
------------------------------------
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
[0]PETSC ERROR:       INSTEAD the line number of the start of the function
[0]PETSC ERROR:       is given.
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR: Signal received
[0]PETSC ERROR: See
http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
shooting.
[0]PETSC ERROR: Petsc Development GIT revision: v3.6-34-gc9ff9ea  GIT
Date: 2015-06-17 23:52:21 -0500
[0]PETSC ERROR: F:\prog_win\prog\Debug\prog.exe on a windows-intel
named HECTOR-PC by hector Fri Jun 19 14:06:17 2015
[0]PETSC ERROR: Configure options --with-cc="win32fe cl"
--with-fc="win32fe ifort" --prefix=/cygdrive/c/Installed/petsc/
--PETSC_ARCH=windows-intel
--with-parmetis-include=/cygdrive/c/Installed/parmetis/include
--with-parmetis-lib=/cygdrive/c/Installed/parmetis/lib/parmetis.lib
--with-metis-include=/cygdrive/c/Installed/parmetis/include
--with-metis-lib=/cygdrive/c/Installed/parmetis/lib/metis.lib
--with-mpi-include="[/cygdrive/c/Installed/msmpi/Include,/cygdrive/c/Installed/msmpi/Include/x64]"
--with-mpi-lib="[/cygdrive/c/Installed/msmpi/Lib/x64/msmpi.lib,/cygdrive/c/Installed/msmpi/Lib/x64/msmpifec.lib]"
--with-blas-lapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_intel_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_core.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_sequential.lib]"
--with-scalapack-include=/cygdrive/c/Installed/mkl/include
--with-scalapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_scalapack_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_blacs_msmpi_lp64.lib]"
[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file

job aborted:
[ranks] message

[0] application aborted
aborting MPI_COMM_WORLD (comm=0x44000000), error 59, comm rank 0

On Fri, Jun 19, 2015 at 12:57 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> As the message says:
>
>> [0]PETSC ERROR: New nonzero at (0,20) caused a malloc
>> Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to turn off this check
>
> Note: mallocs make the code slow - so its up to you to do a proper
> preallocation of memory - or disable the check as the above message
> indicadtes [and ignore the performance penalty for now.].
>
> Satish
>
> On Fri, 19 Jun 2015, Hector E Barrios Molano wrote:
>
>> Hi PETSc Experts,
>>
>> I'm compiling a Windows program using petsc-dev, this program
>> previously used petsc-3.1 the only change performed was:
>>
>> MatCreateMPIBAIJ --> MatCreateBAIJ
>>
>> As the PETSc documentation suggested.
>>
>> I only changed the name of the function.
>>
>> I got to a problem when the program is launched and PETSc is called by
>> the program:
>>
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Argument out of range
>> [0]PETSC ERROR: New nonzero at (0,20) caused a malloc
>> Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to
>> turn off this check
>> [0]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
>> shooting.
>> [0]PETSC ERROR: Petsc Development GIT revision: v3.6-34-gc9ff9ea  GIT
>> Date: 2015-06-17 23:52:21 -0500
>> [0]PETSC ERROR: F:\prog_win\prog\Debug\prog.exe on a windows-intel
>> named HECTOR-PC by hector Thu Jun 18 18:31:42 2015
>> [0]PETSC ERROR: Configure options --with-cc="win32fe cl"
>> --with-fc="win32fe ifort" --prefix=/cygdrive/c/Installed/petsc/
>> --PETSC_ARCH=windows-intel
>> --with-parmetis-include=/cygdrive/c/Installed/parmetis/include
>> --with-parmetis-lib=/cygdrive/c/Installed/parmetis/lib/parmetis.lib
>> --with-metis-include=/cygdrive/c/Installed/parmetis/include
>> --with-metis-lib=/cygdrive/c/Installed/parmetis/lib/metis.lib
>> --with-mpi-include="[/cygdrive/c/Installed/msmpi/Include,/cygdrive/c/Installed/msmpi/Include/x64]"
>> --with-mpi-lib="[/cygdrive/c/Installed/msmpi/Lib/x64/msmpi.lib,/cygdrive/c/Installed/msmpi/Lib/x64/msmpifec.lib]"
>> --with-blas-lapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_intel_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_core.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_sequential.lib]"
>> --with-scalapack-include=/cygdrive/c/Installed/mkl/include
>> --with-scalapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_scalapack_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_blacs_msmpi_lp64.lib]"
>> [0]PETSC ERROR: #1 MatSetValues_SeqBAIJ() line 2192 in
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: #2 MatSetValues() line 1175 in
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Argument out of range
>> [0]PETSC ERROR: New nonzero at (1,21) caused a malloc
>> Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to
>> turn off this check
>> [0]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
>> shooting.
>> [0]PETSC ERROR: Petsc Development GIT revision: v3.6-34-gc9ff9ea  GIT
>> Date: 2015-06-17 23:52:21 -0500
>> [0]PETSC ERROR: F:\prog_win\prog\Debug\prog.exe on a windows-intel
>> named HECTOR-PC by hector Thu Jun 18 18:31:42 2015
>> [0]PETSC ERROR: Configure options --with-cc="win32fe cl"
>> --with-fc="win32fe ifort" --prefix=/cygdrive/c/Installed/petsc/
>> --PETSC_ARCH=windows-intel
>> --with-parmetis-include=/cygdrive/c/Installed/parmetis/include
>> --with-parmetis-lib=/cygdrive/c/Installed/parmetis/lib/parmetis.lib
>> --with-metis-include=/cygdrive/c/Installed/parmetis/include
>> --with-metis-lib=/cygdrive/c/Installed/parmetis/lib/metis.lib
>> --with-mpi-include="[/cygdrive/c/Installed/msmpi/Include,/cygdrive/c/Installed/msmpi/Include/x64]"
>> --with-mpi-lib="[/cygdrive/c/Installed/msmpi/Lib/x64/msmpi.lib,/cygdrive/c/Installed/msmpi/Lib/x64/msmpifec.lib]"
>> --with-blas-lapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_intel_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_core.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_sequential.lib]"
>> --with-scalapack-include=/cygdrive/c/Installed/mkl/include
>> --with-scalapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_scalapack_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_blacs_msmpi_lp64.lib]"
>> [0]PETSC ERROR: #3 MatSetValues_SeqBAIJ() line 2192 in
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: #4 MatSetValues() line 1175 in
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> .
>> .
>> .
>> [0]PETSC ERROR: #3599 MatSetValues_SeqBAIJ() line 2192 in
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: #3600 MatSetValues() line 1175 in
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR:
>> ------------------------------------------------------------------------
>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
>> probably memory access out of range
>> [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
>> [0]PETSC ERROR: or see
>> http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
>> [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac
>> OS X to find memory corruption errors
>> [0]PETSC ERROR: likely location of problem given in stack below
>> [0]PETSC ERROR: ---------------------  Stack Frames
>> ------------------------------------
>> [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
>> [0]PETSC ERROR:       INSTEAD the line number of the start of the function
>> [0]PETSC ERROR:       is given.
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: [0] MatSetValues_SeqBAIJ line 2148
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\impls\baij\seq\baij.c
>> [0]PETSC ERROR: [0] MatSetValues line 1142
>> C:\INSTAL~1\PETSC-~1\PETSC-~1\src\mat\INTERF~1\matrix.c
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Signal received
>> [0]PETSC ERROR: See
>> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
>> shooting.
>> [0]PETSC ERROR: Petsc Development GIT revision: v3.6-34-gc9ff9ea  GIT
>> Date: 2015-06-17 23:52:21 -0500
>> [0]PETSC ERROR: F:\prog_win\prog\Debug\prog.exe on a windows-intel
>> named HECTOR-PC by hector Fri Jun 19 12:43:06 2015
>> [0]PETSC ERROR: Configure options --with-cc="win32fe cl"
>> --with-fc="win32fe ifort" --prefix=/cygdrive/c/Installed/petsc/
>> --PETSC_ARCH=windows-intel
>> --with-parmetis-include=/cygdrive/c/Installed/parmetis/include
>> --with-parmetis-lib=/cygdrive/c/Installed/parmetis/lib/parmetis.lib
>> --with-metis-include=/cygdrive/c/Installed/parmetis/include
>> --with-metis-lib=/cygdrive/c/Installed/parmetis/lib/metis.lib
>> --with-mpi-include="[/cygdrive/c/Installed/msmpi/Include,/cygdrive/c/Installed/msmpi/Include/x64]"
>> --with-mpi-lib="[/cygdrive/c/Installed/msmpi/Lib/x64/msmpi.lib,/cygdrive/c/Installed/msmpi/Lib/x64/msmpifec.lib]"
>> --with-blas-lapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_intel_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_core.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_sequential.lib]"
>> --with-scalapack-include=/cygdrive/c/Installed/mkl/include
>> --with-scalapack-lib="[/cygdrive/c/Installed/mkl/lib/intel64/mkl_scalapack_lp64.lib,/cygdrive/c/Installed/mkl/lib/intel64/mkl_blacs_msmpi_lp64.lib]"
>> [0]PETSC ERROR: #3601 User provided function() line 0 in  unknown file
>>
>> job aborted:
>> [ranks] message
>>
>> [0] application aborted
>> aborting MPI_COMM_WORLD (comm=0x44000000), error 59, comm rank 0
>>
>>
>> I'm compiling the program on Visual Studio, what could be the problem?
>>
>> Thanks for your help,
>>
>> Hector
>>
>



More information about the petsc-dev mailing list