0
$\begingroup$

today I tried some evaluation on a DG function space (Fenics 1.2.0). In my calculations I need to use meshes with a large number of cells (~10mio). At the moment it takes a very long time to create a DG function space (in my distinct case a vector function space) for meshes which contains many cells. For example:

from dolfin import *
set_log_level(DEBUG)
mesh = UnitCubeMesh(100,100,100)
H13 = VectorFunctionSpace(mesh, "DG", 1)

A CG function space takes around about 20 seconds for creation. For DG I aborted the job after 10 minutes. For another mesh I waited more than one hour without termination. Is there a way to speed up the DG function space creation.

Thanks a lot in advance

$\endgroup$
3
  • $\begingroup$ I believe this is a bug in 1.2.0, and I have experienced the same thing myself. I believe the bug has been fixed, and that if you upgrade to a more recent version (using e.g. dorsal), this will no longer be an issue. $\endgroup$ Commented May 29, 2013 at 12:48
  • 1
    $\begingroup$ Welcome to SciComp.SE! While FEniCS-related questions are on topic here, they are expected to have some concrete scientific background. This is really a (potential) bug report, and should be posted on the Dolfin issues tracker. (For what it's worth, I can replicate the issue with next on bitbucket.) I'm voting to close this question, but feel free to come back if you have problems with the computational science side of things. $\endgroup$ Commented May 29, 2013 at 13:06
  • $\begingroup$ Thanks for your fast help. Yes, it seems to be a bug and I will visit the bitbucket for more information. $\endgroup$
    – Sebastian
    Commented May 29, 2013 at 13:28

2 Answers 2

0
$\begingroup$

Some code in DofMapBuilder::reorder_local may scale poorly (see Anders' answer). As a workaround you may disable reordering dofs

parameters['reorder_dofs_serial'] = False
H13 = VectorFunctionSpace(mesh, "DG", 1)
$\endgroup$
2
  • $\begingroup$ Thanks, I will try your workaround. Is reordering only needed for parallel runs or are there other reasons why this step is required? $\endgroup$
    – Sebastian
    Commented May 29, 2013 at 15:12
  • $\begingroup$ Only for performance reasons I think. There should be no assumptions on dof ordering in DOLFIN. $\endgroup$ Commented May 29, 2013 at 15:24
1
$\begingroup$

The DG space in this case has 72,000,000 dofs while the dimension of the CG space is only 3,090,903. So expect it to take quite some time longer to create the DG space, especially if the dofs are reordered (which is the default behavior).

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.