Hi, Folks --

I am trying to put together a libMesh-based AMR solver which has some 
variables I would like to treat as piecewise constants.  I think that 
the way to do this in libMesh is to set the order to be CONSTANT and the 
FE type to be MONOMIAL.

When I do this, I get segfaults in EquationSystems::reinit() when 
libMesh and my application code are compiled with optimizations enabled. 
  Similar segfaults do not seem to occur when I compile in debugging 
mode even though I am using the same PETSc build in both cases.

The error almost always occurs on process 0 in VecScatterBegin:

(gdb) where
#0  0x93ef144e in __semwait_signal ()
#1  0x93ef12cf in nanosleep$UNIX2003 ()
#2  0x93f46e71 in sleep$UNIX2003 ()
#3  0x00410efb in PetscSleep ()
#4  0x003dc732 in PetscAttachDebugger ()
#5  0x003dd2b1 in PetscAttachDebuggerErrorHandler ()
#6  0x003de1ba in PetscError ()
#7  0x003e2658 in PetscDefaultSignalHandler ()
#8  0x003e2844 in PetscSignalHandler_Private ()
#9  <signal handler called>
#10 0x0036b625 in VecScatterBegin_1 ()
#11 0x00353609 in VecScatterBegin ()
#12 0x00f0f040 in PetscVector<double>::localize ()
#13 0x00ff74e9 in System::project_vector ()
#14 0x00ff7aec in System::project_vector ()
#15 0x00fd4c73 in System::restrict_vectors ()
#16 0x00fd1c61 in System::prolong_vectors ()
#17 0x00f931ba in EquationSystems::reinit ()
#18 0x0000ce92 in main ()
#19 0x00002a16 in start ()

The point in the computation at which the segfault occurs seems to 
depend on the number of processors.  If I switch the interpolation order 
to first, I also get segfaults in reinit, but at different points in the 
computation (generally later in the computation).  I think it also 
happens with second, although I am having trouble reproducing the error 
in that case right now...

Also, in a few runs, instead of a segfault, I get:

[0]PETSC ERROR: VecDestroy_Seq() line 628 in 
src/vec/vec/impls/seq/bvec2.c Likely memory corruption in heap

However, this is hard to reproduce.  I forgot to save the stack trace 
when this happened, but I think it is happening at the same place in the 
code.

Am I doing something wrong here?

If I switch the piecewise-constant variables to linear Lagrange FEs, 
everything seems to run fine.

Thanks!

-- Boyce

PS: Tomorrow I am going to work on getting this running with valgrind...

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to