Error loading complex PETSc, SLEPc Library

Hi,
i’ve installed the newest Windows binarys and im not able to run complex PETSc examples because FreeFem can’t load PETSc-complex.dll even though the file exists.
I have no problems with normal PETS examples.

Log:

– FreeFem++ v4.6 (Fri, Apr 03, 2020 2:08:08 PM - git v4.6)
Load: lg_fem lg_mesh lg_mesh3 eigenvalue
1 : load “PETSc-complex”
Load error: PETSc-complex
fail:
list prefix: ‘C:\Program Files (x86)\FreeFem++\.’ list suffix: ‘’ , ‘.dll’
current line = 1
Load error : PETSc-complex
line number :1, PETSc-complex
error Load error : PETSc-complex
line number :1, PETSc-complex
code = 2 mpirank: 0

1 Like

I think there is something wrong with your freefem++.pref, because the list of prefixes seems messed up. Could you make sure the correct path with all the .dll is properly set in the list?

Hi prj, thanks for your reply.

My freefem++.pref looks like:

loadpath += “!\.”
includepath += “!\idp”

The freefem++.pref, all *.dll files and *.exe files are in the folder:
C:\Program Files (x86)\FreeFem++\

Other *.dll files load properly.

Is there somethng I overlook?

That is weird. Could you try to run with the additional parameter -v 10000 and paste the full log here, please?

I think these are the important lines when loading the working PETSc lib:

1 : load "PETSc" ****  PETSc.cpp ****

– addInitFunct: 10000 1 PETSc.cpp
test LoadLibrary(C:\Program Files (x86)\FreeFem++\.\PETSc) = 0x1fbd0000
(load: loadLibary C:\Program Files (x86)\FreeFem++\.\PETSc = 0) callInitsFunct : 1

addInitFunct : 10000 call : 1 (
loadfile PETSc.cpp
PETSc (d)

Important Lines when loading the not working PETSc-complex lib:

1 : load "PETSc-complex" 

test LoadLibrary(C:\Program Files (x86)\FreeFem++\.\PETSc-complex) = 0

try loadLibary: C:\Program Files (x86)\FreeFem++\.\PETSc-complex
fail: 126
test LoadLibrary(C:\Program Files (x86)\FreeFem++\.\PETSc-complex.dll) = 0

try loadLibary: C:\Program Files (x86)\FreeFem++\.\PETSc-complex.dll
fail: 126

Load error: PETSc-complex
fail:
list prefix: 'C:\Program Files (x86)\FreeFem++\.' list suffix: ‘’ , ‘.dll’
current line = 1

Full log:

C:\Users\bbszi\Documents\Praktikum_Moedder\FreeFem>FreeFem++ loadlib.edp -v 10000
verbosity 10000
file: loadlib.edp
– FreeFem++ v4.6 (Fri, Apr 03, 2020 2:08:08 PM - git v4.6)
file :loadlib.edp verbosity= 10000
Load: callInitsFunct : 2

addInitFunct : -10000 call : 1 (
add ExistDestroy
)
addInitFunct : -20 call : 1 ( lg_fem OneFFSlverVS 47 47
OneFFSlverVS 47 47
OneFFSlverVS 63 63
OneFFSlverVS 63 63
** ChangeSolver SPARSESOLVER ← GMRES
** ChangeSolver SPARSESOLVERSYM ← GMRES
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 49 49
OneFFSlverVS 49 49
** ChangeSolver SPARSESOLVER ← UMFPACK
OneFFSlverVS 58 58
OneFFSlverVS 58 58
** ChangeSolver SPARSESOLVERSYM ← CHOLMOD
OneFFSlverVS 47 47
OneFFSlverVS 47 47
OneFFSlverVS 63 63
OneFFSlverVS 63 63
** ChangeSolver SPARSESOLVER ← GMRES
** ChangeSolver SPARSESOLVERSYM ← GMRES
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 31 31
OneFFSlverVS 49 49
OneFFSlverVS 49 49
** ChangeSolver SPARSESOLVER ← UMFPACK
OneFFSlverVS 58 58
OneFFSlverVS 58 58
** ChangeSolver SPARSESOLVERSYM ← CHOLMOD

     add ExistDestroy

     add ExistDestroy

     add ExistDestroy

) lg_mesh glumesh2D lg_mesh3 eigenvalue
–lex open :loadlib.edp
Block::open 0x10e390a0 0
1 : load “PETSc-complex” test LoadLibrary(C:\Program Files (x86)\FreeFem++\.\PETSc-complex) = 0

try loadLibary: C:\Program Files (x86)\FreeFem++\.\PETSc-complex
fail: 126
test LoadLibrary(C:\Program Files (x86)\FreeFem++\.\PETSc-complex.dll) = 0

try loadLibary: C:\Program Files (x86)\FreeFem++\.\PETSc-complex.dll
fail: 126

Load error: PETSc-complex
fail:
list prefix: 'C:\Program Files (x86)\FreeFem++\.' list suffix: ‘’ , ‘.dll’
current line = 1
Load error : PETSc-complex
line number :1, PETSc-complex
error Load error : PETSc-complex
line number :1, PETSc-complex
code = 2 mpirank: 0

I have been able to reproduce the issue, it should be fixed for the next release, I’ll push a fix soon on the develop branch. In the meantime, could you please download libssp-0.dll (from my personal webpage) and put it in the FreeFEM folder with all the other .dll? This fixed the issue on my installation. Thank you for reporting this.

Here is the corresponding commit: c01f2d7.

Hi Very much appreciated to provide a temporary fix with the libssp-0.dll, but I can’t download it from your personal webpage. Any help?

I’ve removed it since then. Do you need it? I’ll upload it again if so.

Yes please, thank you.

No problem, good to know some of you are using PETSc/SLEPc in complex on Windows! The link should be up again. Let me know if you run into some other issue.

Yes indeed. Thanks very much for prompt reply. And so far it is working.

Hi,

I have the same problem with the example “blasius-stability-1d-SLEPc-complex.edp” on windows 10 with FreeFem++ 4.7. It gives

13 : load “PETSc-complex”
Load error: PETSc-complex
fail:
list prefix: ‘C:\Program Files (x86)\FreeFem++4.7\.’ list suffix: ‘’ , ‘.dll’
current line = 13 mpirank 0 / 2
Load error : PETSc-complex
line number :13, PETSc-complex
error Load error : PETSc-complex
line number :13, PETSc-complex
code = 2 mpirank: 0

The file PETSc-complex.dll is in the install directory of freefem++.
My freefem++.pref file is

loadpath += “!.”
includepath += “!\idp”

Is libssp-0.dll the solution for this problem ? Is this file available somewhere ?

Many thanks for your attention

Consider downloading the latest available .exe. This is fixed in version 4.10.

Thank you very much.
PETSc-complex is now loading and some examples are working with it (Helmoltz and Maxwell).
Some others give PETSC ERROR but I will build my own models now.

Hello
我刚装的 freefem++ 4.11,也出现了同样的问题。
Load error: PETSc
fail:
list prefix: 'D:\freefem++\FreeFem++\.' '!.' list suffix: ‘’ , ‘.dll’
current line = 40
Load error : PETSc
line number :40, PETSc
error Load error : PETSc
line number :40, PETSc
code = 2 mpirank: 0

You need to use FreeFem++-mpi, not FreeFem++.

Ok, thank you very much.