On Tue, Aug 28, 2012 at 4:49 PM, Chris Eldred <span dir="ltr"><<a href="mailto:chris.eldred@gmail.com" target="_blank">chris.eldred@gmail.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">
I am getting a segmentation fault when calling PetscSectionCreate. The error is:<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,<br>
probably memory access out of range<br>
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
[0]PETSC ERROR: or see<br>
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC</a><br>
ERROR: or try <a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to<br>
find memory corruption errors<br>
[0]PETSC ERROR: likely location of problem given in stack below<br>
[0]PETSC ERROR: --------------------- Stack Frames<br>
------------------------------------<br>
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>
[0]PETSC ERROR: INSTEAD the line number of the start of the function<br>
[0]PETSC ERROR: is given.<br>
[0]PETSC ERROR: [0] PetscTrMallocDefault line 183<br>
/home/user/Desktop/LIBRARIES/petsc-dev/src/sys/memory/mtr.c<br>
[0]PETSC ERROR: [0] PetscSectionCreate line 37<br>
/home/user/Desktop/LIBRARIES/petsc-dev/src/vec/vec/impls/seq/vsection.c<br>
[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: Signal received!<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Development HG revision:<br>
b6fe82991deee4a0d3f9a20654bc7750a6b1fe0f HG Date: Mon Aug 27 13:17:10<br>
2012 -0500<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: ./test on a arch-linu named Puget-101334 by user Tue<br>
Aug 28 15:47:36 2012<br>
[0]PETSC ERROR: Libraries linked from<br>
/home/user/Desktop/LIBRARIES/petsc-dev/arch-linux2-cxx-debug/lib<br>
[0]PETSC ERROR: Configure run at Mon Aug 27 12:55:14 2012<br>
[0]PETSC ERROR: Configure options --download-boost --download-chaco<br>
--download-ctetgen --download-f-blas-lapack --download-fiat<br>
--download-generator --download-metis --download-ml --download-mpich<br>
--download-parmetis --download-scientificpython --download-triangle<br>
--with-clanguage=cxx --with-dynamic-loading --with-shared-libraries<br>
--with-sieve PETSC_ARCH=arch-linux2-cxx-debug<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: User provided function() line 0 in unknown directory<br>
unknown file<br>
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0<br>
[unset]: aborting job:<br>
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0<br>
<br>
The relevant code section is:<br></blockquote><div><br></div><div>From a recent petsc-users reply:</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Okay, there was a bug in the Fortran stub generation for this type. I have pushed a fix for this. In order to</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
get these to rebuild, you need to</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
rm $PETSC_DIR/$PETSC_ARCH/bin/<span class="il" style="background-color:rgb(255,255,204)">bfort</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> rm -rf $PETSC_DIR/externalpackages/sowing*</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> cd $PETSC_DIR</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
cd externalpackages</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> hg clone <a href="http://petsc.cs.iit.edu/petsc/externalpackages/sowing-1.1.16/" target="_blank" style="color:rgb(17,85,204)">http://petsc.cs.iit.edu/petsc/externalpackages/sowing-1.1.16/</a></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> ./$PETSC_ARCH/conf/reconfigure-$PETSC_ARCH.py</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Then you can run src/vec/vec/examples/tests/ex40f90.F</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> Thanks</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> Matt</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
call PetscSectionCreate(PETSC_COMM_WORLD, section, ierr)<br>
CHKERRQ(ierr)<br>
<br>
call PetscSectionSetChart(section, 0, 11, ierr)<br>
CHKERRQ(ierr)<br>
do p=0,10<br>
call PetscSectionSetDof(section, p, 3, ierr)<br>
CHKERRQ(ierr)<br>
end do<br>
call PetscSectionSetUp(section, ierr)<br>
CHKERRQ(ierr)<br>
<br>
call PetscSectionView(section, PETSC_VIEWER_STDOUT_WORLD, ierr)<br>
CHKERRQ(ierr)<br>
<br>
call PetscSectionDestroy(section, ierr)<br>
CHKERRQ(ierr)<br>
<br>
Ideas?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Chris Eldred<br>
DOE Computational Science Graduate Fellow<br>
Graduate Student, Atmospheric Science, Colorado State University<br>
B.S. Applied Computational Physics, Carnegie Mellon University, 2009<br>
<a href="mailto:chris.eldred@gmail.com">chris.eldred@gmail.com</a><br>
</font></span></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>