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.

bddc preconditioner in parallel on Linux

More
4 years 3 months ago #2297 by BenWilson94
Hello,

I am trying to use multiple instances of NGSolve. However, I have run into an issue whilst using the bddc preconditioner on Ubuntu. The problem occurs when assembling the matrix whilst using a bddc preconditioner, I have attached a simple example to demonstrate this.

When calling the script once on Ubuntu the simulation takes 17.759102821350098 seconds. However, calling two copies of the script in quick succession they take 655.858645439148 and 659.8631296157837 seconds respectively.

This only appears to happen on Ubuntu, whilst running the simulation once on Mac takes 15.266962051391602 seconds, whereas, running two copies of the script takes 20.856684684753418 and 21.241539001464844 respectively.

We wish to run multiple examples using multiprocessing which amplifies this problem.

Kind regards,

Ben
Attachments:
More
4 years 3 months ago #2299 by matthiash
Hi Ben,

BDDC relies on LAPACK to invert dense matrices. I guess that these functions run in parallel, which leads to a slowdown if you run multiple instances. Depending on which library is used (openblas, mkl, etc.), you could try settings following environment variables:

OMP_NUM_THREADS=1
MKL_NUM_THREADS=1
MKL_THREADING_LAYER=sequential

Best,
Matthias
More
4 years 3 months ago #2300 by BenWilson94
Hi Matthias,

That's excellent, that's solved the problem. Thank you so much.

Kind regards,

Ben
Time to create page: 0.139 seconds