halbux / sparselizard

C++ FEM library | user-friendly | multi-physics | hp-adaptive | HPC
http://www.sparselizard.org
Other
332 stars 62 forks source link

Which petsc lib to link? #35

Closed ceanwang closed 3 years ago

ceanwang commented 3 years ago

Hi,

The path of my petsc lib on my system is c:/msys64/mingw64/lib/petsc. Under it, there are 12 sub folders named from cmo, cso,...,zto. Under cmo folder, there are libpetsc-cmo.a, petsc-cmo.dll.a,...,libpetscvec.a, totally 10 libs.

In sparselizard/cMake/SetupPETSC.cmake, which libs are needed to be found? There is no libpetsc.a.

FIND_LIBRARY(PETSC_LIBRARIES
    NAMES petsc
    PATHS
    "c:/msys64/mingw64/lib/petsc/cmo"
    )

SLEPC package has the same question.

For MUMPS, there are libcmumps_mpi.a, libcmumps_seg.a and libcmumps_shm.a. and libdmumps_mpi.a, libdmumps_seg.a and libdmumps_shm.a. and libemumps.a. and a lot with the name like libmumps-zso.a. and libzmumps_mpi.a, libzmumps_seg.a and libzmumps_shm.a.

Regards,

Cean

halbux commented 3 years ago

Hi Cean,

There should be a libpetsc.so /.a / .dll (whatever the extension on your operating system). Same for libslepc.so Did you try to ctrl+f string "libpetsc" ? By the way: did you compile petsc with MPI enabled? If yes I would suggest you configure it without instead (see configure command in install_external_libs folder, petsc install script.

Alex

ceanwang commented 3 years ago
No where to find this single lib. I just installed as a package. Haven’t figure out how to compile it. Sent from Mail for Windows 10 From: Alexandre HalbachSent: Monday, January 18, 2021 12:33 AMTo: halbux/sparselizardCc: ceanwang; AuthorSubject: Re: [halbux/sparselizard] Which petsc lib to link? (#35) Hi Cean,There should be a libpetsc.so /.a / .dll (whatever the extension on your operating system). Same for libslepc.soDid you try to ctrl+f string "libpetsc" ?By the way: did you compile petsc with MPI enabled? If yes I would suggest you configure it without instead (see configure command in install_external_libs folder, petsc install script.Alex—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. 
ceanwang commented 3 years ago
It seems MSYS2’s petsc build is ./configured PETSc with the option --with-single-library=0 I dropped an issue at their GitHub site asking for a single lib file. From: Alexandre HalbachThere should be a libpetsc.so /.a / .dll (whatever the extension on your operating system). Same for libslepc.so
halbux commented 3 years ago

ok. The best I can do to help you is to redirect you to the document on how to compile petsc in sparselizard for native windows (see download section on sparselizard.org). The other recommendation is to switch to native Linux, this will also give you the best performance

Alex