sometimes, repeatably, continuously allocates memory when calling mat.Inverse

new user on linux.

trying tutorials, all was fine until “navierstokes.py” which always consumes all memory and eventually gets terminated by system oom.

the line causing this is

inv_stokes = a.mat.Inverse(X.FreeDofs())

if i rem it out.

[code]# solve Stokes problem for initial conditions:
#inv_stokes = a.mat.Inverse(X.FreeDofs())

res = f.vec.CreateVector()
res.data = f.vec - a.mat*gfu.vec
#gfu.vec.data += inv_stokes * res
[/code]

it then works, even with another call to Inverse, on another matrix, later on

any ideas why, no messages etc and i can’t find anything so am stuck.

BTW this is using the PPA pre-compiled binaries, i am looking at making an appimage without compilation, so i may have something wrong/missing with my installation, but i think this should work.

BTW2 my distro can’t install debs and doesn’t have anaconda.

as a last resort ii tried adding; inverse=“sparsecholesky”

and it now works, that is, not trying to use infinite memory.

Hi,
my first guess is that there is something with umfpack, if you set inverse=“umfpack” directly does it happen? I cannot reproduce it locally, what version of suitsparse is installed on your system?
Best
Christopher

hi,

“umfpack” didn’t result in any change, however the call is now just never returning, not taking all memory, much more friendly. i updated to a slightly newer version.

haven’t heard of “suitsparse”, didn’t come across a reference in the required packages in the ppa.

i’ll check/install and report what happens

seems to be able to use cuda, so gpu acc. on nvidia, nice. i’ve been hacking on vulkan compute, maybe that’s on its way, i have an AMD gpu so this might not do much ATM.

thanks again.

AFAICT “libamd2” on Focal (20,04) is build from the code in suitsparse 5.7.1 Feb 20, 2020.