tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Nutils cases are extremely slower than the rest

Open MakisH opened this issue 10 months ago • 4 comments

As stated in the Nutils Book, Nutils is not (yet) the fastest tool in its class. I experience that in our perpendicular-flap tutorial, where especially our fluid-nutils case is taking orders of magnitude longer than the rest of the solvers (half a day instead of a couple of minutes).

Following the official suggestions, I tried something like

OMP_NUM_THREADS=1 NUTILS_NPROCS=4 python myscript.py

without a directly visible impact (did not measure). I also commented-out the VTK output at the end of each coupling time window.

However, I think that we should first have a closer look and check if we are doing any extremely unnecessary work (e.g., too tight convergence measures, too much output, etc). The mesh already seems to be very coarse.

@gertjanvanzwieten @uekerman do you maybe have any quick ideas?

If we could drop the simulation time to a couple of minutes (or anything less than an hour), we could also integrate this in our system tests.

MakisH avatar Apr 03 '24 08:04 MakisH

IIRC installing mkl should held to some extend. Then, Nutils picks a different solver backend.

Note that the fluid-nutils case uses different numerics than the other fluid cases. We solve for velocities and pressure simultaneously and we use H2-H1 elements. Cheaper would be to use H1-H1 + stabilization, but I also like that we keep the code + formulation here as simple as possible. And we use second-order in time, which we need for testing the waveforms.

If we find anything quick and simple, OK, but I would not want to change the numerics here.

For the systemtests, I would simply compute a few timesteps.

uekerman avatar Apr 03 '24 08:04 uekerman

There is already https://github.com/precice/tutorials/pull/429 which touches the case quite a bit.

uekerman avatar Apr 03 '24 08:04 uekerman

Update: @uekerman wanted to have a closer look into the numerics, but after the currently semi-done release cycle.

MakisH avatar Apr 03 '24 17:04 MakisH

The participant micro-nutils in the two-scale heat conduction tutorial is also extremely slow compared to other micro simulations of similar kind, and I have a feeling that the numerics there has a lot of potential for improvement.

IshaanDesai avatar Apr 04 '24 11:04 IshaanDesai