haskell-numerics / hmatrix

Linear algebra and numerical computation
379 stars 105 forks source link

Running a linear programming problem always generate an access violation #371

Open stla opened 9 months ago

stla commented 9 months ago

Hello,

I'm using Windows 10. I've installed hmatrix and hmatrix-glpk today, with the libraries openblas and glpk. Each time I try to run a linear programming problem, such as the small one given in example, I get an access violation error. This occurs with simplex and with exact.

ghci> simplex prob constr []

Access violation in generated code when executing data at 0x7ff6bd272010

 Attempting to reconstruct a stack trace...

   Frame        Code address
 * 0x63268fd840 0x7ff6bd272010
 * 0x63268fd848 0x7ff6bd04a04e C:\Users\sdl96354\AppData\Roaming\stack\snapshots\09e128f9\lib\x86_64-windows-ghc-9.4.7\hmatrix-glpk-0.19.0.0-4RHq5CxReXp83FhOW14nEL\libHShmatrix-glpk-0.19.0.0-4RHq5CxReXp83FhOW14nEL.a(#4:glpk.o)+0x3e
                 (c_exact_sparse+0x4a2)
 * 0x63268fd850 0x7ef406e900e0
 * 0x63268fd858 0x1
 * 0x63268fd860 0x23e4881cec0
 * 0x63268fd868 0x7ff6b1c4c5f6 C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\ghc-9.4.7\bin\ghc-9.4.7.exe+0x4bec5f6
 * 0x63268fd870 0xe
 * 0x63268fd878 0x7ff6b1c4c5f6 C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\ghc-9.4.7\bin\ghc-9.4.7.exe+0x4bec5f6
stla commented 9 months ago

It works with GHC 8.10.7.

stla commented 9 months ago

On Linux, it works with GHC 9.x.x.

thermohyaena commented 5 months ago

It works with GHC 8.10.7.

This piece of info helped me a lot!