Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

[Bug report] BLAS : Bad memory unallocation!

More
3 years 10 months ago #2718 by Guosheng Fu
Hello,

I encountered the following bug:
I use a div-conforming HDG to solve the vector-Poisson equation. (see attached code)
When using a high-order version (order >= 8), the assembly of stiffness matrix using TaskManager() give me an error message
Code:
with TaskManager(): a.Assemble() ... >> BLAS : Bad memory unallocation!
And the returned results are incorrect.

(1) This bug is not observed for lower order HDG cases (order <8), or other high order methods like VectorH1 space. (When condensation is turned off, the bug is also not observed)
(2) This bug is not observed when TaskManager is turned off.
(3) TaskManager is also not compatible with DG stiffness matrices.

I am using NGSolve-6.2.2004-128-gc8324807

Best,
Guosheng
More
3 years 10 months ago #2719 by matthiash
Hi Guosheng,

This error seems to come from openblas ( just found this: github.com/xianyi/OpenBLAS/issues/1882 )

How many threads are you running?
Does it run if you set the environment variable NGS_NUM_THREADS to 1? If so, what's the maximum number without errors?

Did you compile the version yourself or are you using the Ubuntu nightly build?

Best,
Matthias
More
3 years 10 months ago #2721 by Guosheng Fu
Hi Matthias,

I compile the code myself. The machine has 8 dual cores. The blacs/lapack library was found within intel MKL.

With 4 threads, the code runs without error.
With 8 threads, the code runs without error most of time, but occasionally (roughly 1 out of 6 runs) it produces the bug.

Best,
Guosheng
More
3 years 10 months ago #2742 by matthiash
I cannot reproduces the issue with a 8x2 core machine (also linking with Intel MKL).

Did you set MKL_THREADING_LAYER (either "gnu", "intel" or "sequential") or MKL_NUM_THREADS? Try different settings and check, if it makes any difference. If MKL_NUM_THREADS=1 is not working either, I guess the error message is from another blas library.

To check your build settings, please attach my_build_dir/CMakeLists.txt and my_build_dir/ngsolve/CMakeLists.txt and the output of
ldd `which ngs`

Best,
Matthias
Time to create page: 0.149 seconds