[dune-fem] Segmentation fault when creating a new space for several times

Agnese, Marco m.agnese13 at imperial.ac.uk
Thu Jun 18 18:18:31 CEST 2015


Hi Tobias,
thank you for the explanation.

> I will re write the TupleMapper so that is adaptive only if the
> gridPart is adaptive.
When it will be ready, please let me know so I can test it inside my code.

Cheers,
Marco.
________________________________________
From: Tobias Malkmus [tomalk at mathematik.uni-freiburg.de]
Sent: Thursday, June 18, 2015 4:10 PM
To: Agnese, Marco; dune-fem at dune-project.org
Subject: Re: [dune-fem] Segmentation fault when creating a new space for several times

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Marco, Andreas

I would not consider this as a bug within the TupleSpace.

On 06/18/2015 04:00 PM, Agnese, Marco wrote:
> Hi Andreas,
>
> you said that the problem is present only for the tuple space and
> not for an ordinary space. I looked at the code of the tuple space
> and I think the problem arises here
>
> ~GenericCombinedDiscreteFunctionSpace () {
> DofManagerType::instance( gridPart().grid() ).removeIndexSet(
> *blockMapper_ ); Traits::deleteBlockMapper( blockMapper_ );
> Traits::deleteSpaces( spaceTuple_ ); }
>
> since gridPart() will return garbage. Am I right?
>
> Why the same thing doesn't happen with an ordinary space? The
> destructor shouldn't do something similar?

In this setting the GridPart is non adaptive.
"ordinary" spaces do not register their dofMappers for non adaptive
gPs. Hence they don't have to sign them of on destruction (no call to
gridPart_).


If you run Marcos example with an adaptive grid part similar problems
are arising.

> (Maybe I am telling something very stupid but I have no idea of the
> mechanism and I don't know why you need to remove the index set:))
>
At the moment the TupleMapper is adaptive in each case.
I will re write the TupleMapper so that is adaptive only if the
gridPart is adaptive.


Nevertheless, if you pass a reference to an object, you should take
care that the reference lives at least as longer as the object itself.

Best Tobias

>
> Cheers, Marco. _______________________________________________
> dune-fem mailing list dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem
>
>


- --
Tobias Malkmus                 <tomalk at mathematik.uni-freiburg.de>

Mathematisches Institut               Tel: +49 761 203 5627
Abt. für Angewandte Mathematik        Universität Freiburg
Hermann-Herder-Str. 10
79104 Freiburg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJVgt9XAAoJEBMY7DHvcWNgahoH/3jQ4hl3EN7q94quzB8HGsJg
1+0KnQl9okdO8TV2rH1Y6+rzqlcz/s+cot+MTMV8/GexF8ra6JbWJ1mOZcOWoUlo
7ivxjTpIyWg9mWJgGioxV48VX2v+WVx2iNYoIdKfHEkuwlR6J9wg5Plmo//JqXwW
h2R0WqAwVHK0geZIpYFyTY7/5PqwgVxF+ItdlOdHSwFgKIceAIXW7eAAb2T/zdZH
Qq2bCVj7Xewvq820mjIQzb+q9WMZwdaptMNLJQF374b3u3AKGoTyEiIm5XcxRV2u
GGAlhISmM25D5vR21fANaB33Cyjsm7y7HB5/JtbRGIzT6/RPNhgupO5OCBbv92E=
=eRUj
-----END PGP SIGNATURE-----



More information about the dune-fem mailing list