[petsc-users] I cannot find my libpetsc.a in my installation pets-3.4.5
Satish Balay
balay at mcs.anl.gov
Mon Sep 25 19:58:05 CDT 2023
On Tue, 26 Sep 2023, Ivan Luthfi wrote:
> Sorry, In the petsc_lib i only found out the libpetsc.so, but not
> libpetsc.a,
>
> are they functionality the same ?
yes.
You would run 'make check' after the build - to verify if PETSc examples are able to compile, link correctly [to this libpetsc.so] - and run
And then - you should be able to use it similarly with your application code.
If there are issues with building your application code - compare the compile command used for the petsc examples with the compile command used for your application code
Note: configure option --with-shared-libraries=1 [default] builds petsc shared library - i.e libpetsc.so. And if you use --with-shared-libraries=0 - it will build petsc as static library - i.e libpetsc.a
A compiler (linker) will look for shared library and use it if found. If not found - it will look for a static version of the library - and use it if found.
Satish
>
> thank you for your recommendation, i will try as your recommendation step
> by step, because the code uses some deprecated function that I have to
> changed to be compiled in the latest version
>
> On Tue, Sep 26, 2023 at 8:44 AM Satish Balay <balay at mcs.anl.gov> wrote:
>
> > We generally recommend getting a basic build going for such use case -
> > and then migrate it to latest version as old versions have more issues
> > [as you might be encountering now]
> >
> > Also - you haven't responded to my follow-up regarding the issue you
> > are encountering.
> >
> > If you are having build issues - you might want to recheck the
> > installation instructions (for petsc-3.4) - and send us relevant logs.
> >
> > Satish
> >
> > On Tue, 26 Sep 2023, Ivan Luthfi wrote:
> >
> > > the reason I install the old version is because i try to run an old code
> > > file that was compiled with the same version
> > >
> > > On Tue, Sep 26, 2023 at 4:20 AM Satish Balay <balay at mcs.anl.gov> wrote:
> > >
> > > >
> > > > What are you looking at? Send 'ls' from PETSC_DIR/PETSC_ARCH/lib
> > > >
> > > > Perhaps its a shared library build - and you have libpetsc.so?
> > > >
> > > > BTW: the current release is 3.19 - and you are attempting to build a
> > super
> > > > old version 3.4.
> > > >
> > > > We recommend using the latest version to avoid build and other
> > > > compatibility issues.
> > > >
> > > > Satish
> > > >
> > > > On Tue, 26 Sep 2023, Ivan Luthfi wrote:
> > > >
> > > > > Dear developers,
> > > > > I cannot find libpetsc.a in my library.
> > > > > Do you have any suggestion how can I figure this out.
> > > > >
> > > >
> > > >
> > >
> >
> >
>
More information about the petsc-users
mailing list