[dune-fem] assert failed in adaptiveleafindexset.hh

Thomas Albrecht Thomas.Albrecht at unibas.ch
Tue May 22 15:41:02 CEST 2012


Hi,

it is a parallel ALUCubeGrid<3,3>. I did do a load balancing after 
creation and none of the grids is empty.

I also looked at the leafIndex_ vector, from which the index is taken. 
There are many numbers in there, quite a few are -1, but that is what 
the vector is initialized to. So the question is, how it can happen that

return leafIndex_[ entity ].first;

can return one of the -1 values.

Thomas

On 05/22/2012 03:35 PM, Tobias Malkmus wrote:
> Hi Thomas
>
> Which grid type are you using ?
>
> Maybe one process has no elements ?
> Then a load balancing after creation of the grid might help.
>
>
> Best Tobias
>
> On 05/22/2012 03:21 PM, Thomas Albrecht wrote:
>> Hi everybody,
>>
>> I am still working on an image registration algorithm, which is an
>> alteration of the dgtest tutorial program. I'm using dune-fem-1.2.1
>>
>> I am getting a segmentation fault when I run the program with more than
>> two processes. After compiling in Debug mode I found out that only after
>> the first adaptive grid refinement I get an assert failed error in line
>> 439:
>>
>> 438: const int idx = codimSet.index( entity );
>> 439: assert( (idx >= 0) && (idx < codimSet.size()) );
>>
>> This is because the line the idx is -1 . It is returned from the 
>> function:
>>
>> //! return leaf index for given entity
>> template <class EntityType>
>> int index ( const EntityType& entity ) const
>> {
>> assert( myCodim_ == EntityType :: codimension );
>> return leafIndex_[ entity ].first;
>> }
>>
>> in codimindexset.hh. By the way: codim is 0.
>>
>> So obviously I have no idea what's going on here, but it must have
>> something to do with the grid adaptation with several processes, which
>> provokes an invalid index to be returned.
>>
>> Do you have any idea?
>>
>> Thanks
>>
>> Thomas
>>
>
>


-- 
Thomas Albrecht, PhD
Postdoctoral Researcher
Department of Mathematics and Computer Science
University of Basel
Bernoullistrasse 16
4056 Basel
Switzerland

tel: +41 61 267 0442
email: thomas.albrecht at unibas.ch





More information about the dune-fem mailing list