This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Multithreading error

+1 vote

Hi,

when I run my program with more than 1 thread i.e. for example, by setting parameters["num_threads"] = 2, my program crashes with the following output

Solving linear system of size 136161 x 136161 (PETSc Krylov solver).
*** Warning: Form::coloring does not properly consider form type.
Coloring mesh.
*** Error in `python': double free or corruption (fasttop): 0x0000000016611710 ***

It works fine with just 1 thread. Also, multi-threading works when I used the previous version of Fenics. Has anyone have this problem ?

Thanks!

asked Jun 17, 2014 by lee FEniCS User (1,170 points)

2 Answers

+1 vote

I have experience similar issues with recent FEniCS. Not sure it helps but you might want to try another linear algebra backend. Multithreading has unfortunately never been fully supported in DOLFIN, as there are still a number of known issues.

I suggest you report an issue at bitbucket, with a minimal example reproducing the error.

answered Jun 17, 2014 by johanhake FEniCS Expert (22,480 points)
+1 vote

Errors can occur when PETSc is compiled in debug mode. Unfortunately, the linear algebra backends and are generally not thread-safe, but we use some knowledge of how they work to permit threaded insertion via mesh colouring. PETSc doesn't seem to like this when it is compiled in debug mode.

answered Jun 23, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
...