[petsc-dev] How do I build a shared library for exodus?

Matthew Knepley knepley at gmail.com
Wed Jan 22 11:32:30 CST 2014


On Wed, Jan 22, 2014 at 11:28 AM, Satish Balay <balay at mcs.anl.gov> wrote:

> On Wed, 22 Jan 2014, Blaise A Bourdin wrote:
>
> >
> > On Jan 21, 2014, at 11:01 PM, Jed Brown <jed at jedbrown.org> wrote:
> >
> > > Blaise A Bourdin <bourdin at lsu.edu> writes:
> > >
> > >> Hi,
> > >>
> > >> For some reason, I would need to generate a shared library for
> > >> exodusII, but the Makefile included in the source distribution does
> > >> not have a rule for this. Is there an easy way to modify the build
> > >> system package in order to generate the shared library?
> > >
> > > The Makefile.standalone does not have rules for shared.  Perhaps
> > > upstream exodus (now at version 6.02) is recommending the CMake build?
>
> If upstream recommends cmake - perhaps we should stick to that? We
> already have a bunch of packages that require cmake.
>

I of course disagree. We can use the PETSc shared build rules.

   Matt


> balay at asterix /home/balay/petsc (master)
> $ git grep framework.require |grep PETSc.packages.cmake
> config/PETSc/packages/clique.py:    self.cmake           =
> framework.require('PETSc.packages.cmake',self)
> config/PETSc/packages/elemental.py:    self.cmake           =
> framework.require('PETSc.packages.cmake',self)
> config/PETSc/packages/metis.py:    self.cmake           =
> framework.require('PETSc.packages.cmake',self)
> config/PETSc/packages/parmetis.py:    self.cmake           =
> framework.require('PETSc.packages.cmake',self)
> config/cmakeboot.py:   self.cmake         =
> self.framework.require('PETSc.packages.cmake',       None)
>
>
> > > I'd rather not have exodusii.py depend on CMake if we can help it
> > > (buggy, bad logging, another thing to compile), so maybe we need to add
> > > a shared rule?  Or embrace the beast?
> >
> > let’s say we do want to mess with cmake. What is the typical way to add
> the shared rule?
> >    - patch Makefile.standalone in exodusii.py?
> >    - repackage exodus and serve it from the petsc servers?
>
> Perhaps upstream exodus tarball should support sharedlibrary/static
> library as a build option? elemental.py appears to have the followig
> code commented..
>
> if self.sharedLibraries.useShared:
>   args.append('-DSHARE_LIBRARIES=ON')
>
> Satish
>
> > Is there a BuildSystem way to know that the linker flag to build a
> shared library is -shared under linux and -dynamiclib under mac OS? If so,
> can we simply build the shared library in exodusii.py?
> >
> > Blaise
> >
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140122/0de07645/attachment.html>


More information about the petsc-dev mailing list