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.