[Dune] UG grid - limit on grid size?

Oliver Sander sander at mi.fu-berlin.de
Wed Oct 5 15:34:15 CEST 2011


>> What do you mean by 128x128x32x6 elements?
> I construct the cubed sphere by arranging 6 cubes, each subdivided into
> 128x128x32 elements, around a (hollow) cube. I then bend and 'glue' the
> 24 faces together (I needed to build myself a 3d foam model to figure
> out how to do that...).

Can we get a photo :-)

>>
>> How much ram does your machine have?
>
> 3.9GB

This may just not be enough.  UG's data structures are quite involved.
In particular calling

uggrid = new Dune::UGGrid<3>(10000);  // i.e.: give me 10GB

doesn't really give you 10GB if you don't have them.

Please try a bigger machine and see if you get the same error.


>
>> Are you using the StructuredGridFactory?
> No, just GridFactory.

Can you try and create a grid of the same size using the 
StructuredGridFactory?
If you can then it is not a memory issue.

cheers,
Oliver


>
> Thanks,
>
> Eike
>
> Can you please file a bug
>> with a small test program so this doesn't get lost?
>>
>> Thanks,
>> Oliver
>>
>> Am 05.10.2011 15:07, schrieb Eike Mueller:
>>> Hi Oliver,
>>>
>>> this works, thanks a lot! After recompiling UG I can go up to
>>> 64x64x16x6, but if I try 128x128x32x6 (~ 2^22, but again, it's a serial
>>> run) I now get this:
>>>
>>> ERROR in InsertElement: ==> NdElPtrArray_GetMemAndCheckIDs( ) ERROR: No
>>> memory for MGNDELEMBLK(theMG,j)
>>> ERROR in InsertElement: ERROR by calling
>>> NdElPtrArray_GetMemAndCheckIDs()
>>> terminate called after throwing an instance of 'Dune::GridError'
>>>
>>> I tried increasing the heap size in the uggrid construction
>>>
>>> uggrid = new Dune::UGGrid<3>(10000);
>>>
>>> but I still get the same error message.
>>>
>>> Cheers,
>>>
>>> Eike
>>>
>>> Oliver Sander wrote:
>>>> Hi Eike!
>>>> This is a known problem. Please see the FAQ entry 4.2 on the dune
>>>> homepage
>>>> for an explanation and a workaround.
>>>> Cheers,
>>>> Oliver
>>>>
>>>> Am 05.10.2011 14:23, schrieb Eike Mueller:
>>>>> Dear Dune-list,
>>>>>
>>>>> I've used the UG grid factory to construct a UG grid on spherical
>>>>> shell
>>>>> like this [1], basically following the instructions in [2]. It all
>>>>> works
>>>>> fine, but fails (or rather hangs) once my grid reaches a certain
>>>>> size (I
>>>>> found that if the number of elements is 25x25x25x6 = 93750 it's ok,
>>>>> but
>>>>> for 26x26x26x6 = 105456 it fails). The number of nodes is about the
>>>>> same
>>>>> as the number of elements. I do not get a runtime error message,
>>>>> but it
>>>>> just hangs in
>>>>>
>>>>> uggrid = new Dune::UGGrid<3>;
>>>>> uggrid = factory.createGrid();
>>>>>
>>>>> Now, I might be getting the memory allocation wrong (I've tried
>>>>> passing
>>>>> a larger heapsize to to Dune::UGGrid<3> constructor), but I also saw
>>>>> this discussion here [3] saying that there are limits on the size
>>>>> of the
>>>>> UG grid that can be constructed (I do not compile with -DNDEBUG and
>>>>> this
>>>>> is a serial run and from how I understand it the limit should be 2^32
>>>>> elements in serial runs?).
>>>>>
>>>>> Basically, I've got a class called Cubedsphere, which has the private
>>>>> data field
>>>>>
>>>>> Dune::GridFactory<Dune::UGGrid<3>> factory;
>>>>> Dune::UGGrid<3>* uggrid;
>>>>>
>>>>> In the constructor I generate my grid vertices (I know the exact
>>>>> expressions for the positions, so don't need to read them from
>>>>> file) by
>>>>> first calling
>>>>>
>>>>> factory.insertVertex(vertex);
>>>>>
>>>>> for all vertices and storing their ids and positions (both as unsigned
>>>>> ints) in a lookup table and then generating the elements from the
>>>>> entries in the lookup table with
>>>>>
>>>>> factory.insertElement(cube,vertices);
>>>>>
>>>>> When all this is done I call
>>>>>
>>>>> uggrid = new Dune::UGGrid<3>;
>>>>> uggrid = factory.createGrid();
>>>>>
>>>>> in the constructor and the class also has a method
>>>>>
>>>>> Dune::UGGrid<3>* getUGGrid() { return uggrid; };
>>>>>
>>>>> for returning a reference to the uggrid pointer.
>>>>>
>>>>>
>>>>>
>>>>> Thank you very much for any help,
>>>>>
>>>>> Eike
>>>>>
>>>>>
>>>>>
>>>>> [1] http://people.bath.ac.uk/em459/dune.html
>>>>> [2]
>>>>> http://www.dune-project.org/doc/doxygen/html/classDune_1_1GridFactory_3_01UGGrid_3_01dimworld_01_4_01_4.html
>>>>>
>>>>>
>>>>>
>>>>> [3]
>>>>> http://www.dune-project.org/flyspray/index.php?do=details&task_id=250#comment2700
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Dune mailing list
>>>>> Dune at dune-project.org
>>>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>>
>>>
>>
>




More information about the Dune mailing list