Old code, new NgSolve -> extremly slow


I needed to redo some simulations and ran an old py file (2 years ?) using the following version of NgSolve

The program is the (certainly not most efficient and shortest) implementation for a nonlinear Fokker-Planck equation (4th order IMEX scheme). But still - in the past the simulation was quick, now every time step takes ‘forever’. If my colleague runs the file (with an 1.5 year old version of NgSolve) it runs as fast as I would expect it to be.

I attached the respective file - what is causing this ‘slow down’ ?

Thank you very much

Attachment: FP_IMEX.py

how long does it take now, how long does the old version take ?
on what kind of computer ?

Hi Mary,

The example is running in 3.6 seconds on my machine (without visualization, the Redraw(blocking=True) is slowing down quite a bit).

I advise to test following things:

  • Is it faster or slower without TaskManager()?
  • Try inv = hmat.Inverse(fes.FreeDofs(), inverse=‘sparsecholesky’)
  • Run a few steps and produce trace output: with TaskManager(10**9):
    Have a look at ng0.trace.html and attach this file and ng0.trace


Good morning,

I have Suse 15.2 running on an HP Elitebook (8 cores, 1.8Ghz).

Couple of times:
*) No gui, with taskmanager: 15.5 sec
*) No gui, without taskmanager 8.6 sec
*) Gui with taskmanager: terminated after 15 minutes
*) Gui without taskmanager: didn’t time it, but runs ‘reasonably’ fast

So it seems like the taskmanager is causing the issue - which is strange, isn’t it ? I also attached the two files.

Thanks a lot !

Attachment: files.tar.gz