Re: [petsc-dev] circular dependencies SLEPc

2019-07-09 Thread Jed Brown via petsc-dev
Matthew Knepley writes: > On Mon, Jul 8, 2019 at 10:37 PM Jed Brown via petsc-dev < > petsc-dev@mcs.anl.gov> wrote: > >> "Smith, Barry F. via petsc-dev" writes: >> >> >> On Jul 8, 2019, at 9:53 PM, Jakub Kruzik via petsc-dev < >> petsc-dev@mcs.anl.gov> wrote: >> >> >> >> Just to clarify, the sug

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Jed Brown via petsc-dev
"Smith, Barry F." writes: >> There is some nontrivial infrastructure that would be needed for this >> model. >> >> 1. This new component needs to be built into a new library such as >> libpetsc-plugin.a (when static). >> >> 2. Users need to know when they should link this module. They'll nee

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Smith, Barry F. via petsc-dev
> On Jul 8, 2019, at 10:37 PM, Jed Brown wrote: > > "Smith, Barry F. via petsc-dev" writes: > >>> On Jul 8, 2019, at 9:53 PM, Jakub Kruzik via petsc-dev >>> wrote: >>> >>> Just to clarify, the suggested solution is a plug-in sitting anywhere in >>> the PETSc source tree with postponed co

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Jed Brown via petsc-dev
"Smith, Barry F. via petsc-dev" writes: >> On Jul 8, 2019, at 9:53 PM, Jakub Kruzik via petsc-dev >> wrote: >> >> Just to clarify, the suggested solution is a plug-in sitting anywhere in the >> PETSc source tree with postponed compilation and using >> __attribute__((constructor)) to register

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Smith, Barry F. via petsc-dev
> On Jul 8, 2019, at 9:53 PM, Jakub Kruzik via petsc-dev > wrote: > > Just to clarify, the suggested solution is a plug-in sitting anywhere in the > PETSc source tree with postponed compilation and using > __attribute__((constructor)) to register (as in libCEED) for static libraries? Yes,

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Jakub Kruzik via petsc-dev
Just to clarify, the suggested solution is a plug-in sitting anywhere in the PETSc source tree with postponed compilation and using __attribute__((constructor)) to register (as in libCEED) for static libraries? I could try to do that for the computation of eigenvector-based deflation space fo

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Smith, Barry F. via petsc-dev
Sorry for the confusion surrounding this issue. Your code needs to go in its own standalone library that links against both PETSc and SLEPc. You can just the mechanism Jed suggested to have your library call PCRegister() when it is utilized (see previous emails/discussion). You could perhaps

Re: [petsc-dev] circular dependencies SLEPc

2019-07-08 Thread Pierre Jolivet via petsc-dev
Hello, I’m not sure what’s the status about this issue. I’m trying to register a PC that is using EPSSolve during PCSetUp, but it’s falling because of undefined references to EPSSomething when linking libpetsc.so How could I fix this, appart from removing my PC from PETSc and compiling this as a

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Matthew Knepley via petsc-dev
On Wed, Jun 26, 2019 at 4:11 PM Jed Brown wrote: > Matthew Knepley writes: > > > On Wed, Jun 26, 2019 at 3:42 PM Jed Brown via petsc-dev < > > petsc-dev@mcs.anl.gov> wrote: > > > >> "Smith, Barry F." writes: > >> > >> >> On Jun 26, 2019, at 1:53 PM, Jed Brown wrote: > >> >> > >> >> "Smith, Bar

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
Matthew Knepley writes: > On Wed, Jun 26, 2019 at 3:42 PM Jed Brown via petsc-dev < > petsc-dev@mcs.anl.gov> wrote: > >> "Smith, Barry F." writes: >> >> >> On Jun 26, 2019, at 1:53 PM, Jed Brown wrote: >> >> >> >> "Smith, Barry F." writes: >> >> >> >>> It is still a PC, it may as part of its

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
"Smith, Barry F." writes: >> On Jun 26, 2019, at 1:53 PM, Jed Brown wrote: >> >> "Smith, Barry F." writes: >> >>> It is still a PC, it may as part of its computation solve an eigenvalue >>> problem but its use is as a PC, hence does not belong in SLEPc. >> >> Fine; it does not belong in sr

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
"Smith, Barry F." writes: >> On Jun 26, 2019, at 1:53 PM, Jed Brown wrote: >> >> "Smith, Barry F." writes: >> >>> It can be a plug-in whose source sits in the PETSc source tree, even in >>> the PC directory. It gets built by the PETSc build system after the >>> build system installs PETSc

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
> On Jun 26, 2019, at 1:53 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >> It is still a PC, it may as part of its computation solve an eigenvalue >> problem but its use is as a PC, hence does not belong in SLEPc. > > Fine; it does not belong in src/ksp/pc/. Why not? From the c

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
> On Jun 26, 2019, at 1:53 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >> It can be a plug-in whose source sits in the PETSc source tree, even in the >> PC directory. It gets built by the PETSc build system after the >> build system installs PETSc and SLEPc (in the Spack world it

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
"Smith, Barry F." writes: > It is still a PC, it may as part of its computation solve an eigenvalue > problem but its use is as a PC, hence does not belong in SLEPc. Fine; it does not belong in src/ksp/pc/.

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
"Smith, Barry F." writes: > It can be a plug-in whose source sits in the PETSc source tree, even in the > PC directory. It gets built by the PETSc build system after the > build system installs PETSc and SLEPc (in the Spack world it would have its > own Spack file that just depends on PETSc

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
It can be a plug-in whose source sits in the PETSc source tree, even in the PC directory. It gets built by the PETSc build system after the build system installs PETSc and SLEPc (in the Spack world it would have its own Spack file that just depends on PETSc and SLEPc). Pretty easy to setup (

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
It is still a PC, it may as part of its computation solve an eigenvalue problem but its use is as a PC, hence does not belong in SLEPc. Barry > On Jun 26, 2019, at 1:22 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >>> You can implement and register a PC in SLEPc (it would go i

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
Jed Brown writes: > Patrick Sanan writes: > >> How about a plug-in PC implementation, compiled as its own dynamic library, >> depending on both SLEPc and PETSc? > > Of course, but such a thing would need its own continuous integration, etc. We could develop a better system for packaging and dis

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
"Smith, Barry F." writes: >> You can implement and register a PC in SLEPc (it would go in libslepc.so). > > It makes no sense to have a PC in SLEPc. We're talking about a PC that is implemented by iteratively solving an eigenproblem.

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
Patrick Sanan writes: > How about a plug-in PC implementation, compiled as its own dynamic library, > depending on both SLEPc and PETSc? Of course, but such a thing would need its own continuous integration, etc.

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
> On Jun 26, 2019, at 12:39 PM, Fande Kong via petsc-dev > wrote: > > It would be great if SLEPc can be merged into PETSc. Just like what we did > for TAO. Then we do not have all these issues at all. Next week libMesh and the following week Trilinos Barry > > Any particular reason w

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
> On Jun 26, 2019, at 10:55 AM, Jed Brown wrote: > > "Smith, Barry F. via petsc-dev" writes: > >>> On Jun 26, 2019, at 9:56 AM, Balay, Satish via petsc-dev >>> wrote: >>> >>> On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote: >>> Hello, as I mentioned in PR #1819, I w

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Matthew Knepley via petsc-dev
On Wed, Jun 26, 2019 at 1:48 PM Balay, Satish via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > Even if SLEPc were merged to PETSc - we would normally avoid circular > dependencies between components - i.e avoid slepc calls from pc/ksp > [this would break --with-single-library=0 build] > Totally ag

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Balay, Satish via petsc-dev
Even if SLEPc were merged to PETSc - we would normally avoid circular dependencies between components - i.e avoid slepc calls from pc/ksp [this would break --with-single-library=0 build] Satish On Wed, 26 Jun 2019, Fande Kong via petsc-dev wrote: > It would be great if SLEPc can be merged into P

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Fande Kong via petsc-dev
It would be great if SLEPc can be merged into PETSc. Just like what we did for TAO. Then we do not have all these issues at all. Any particular reason we can not merge SLEPc into PETSc? Fande, On Wed, Jun 26, 2019 at 11:22 AM Jed Brown via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > Matthew Kne

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
Matthew Knepley writes: > On Wed, Jun 26, 2019 at 1:05 PM Jed Brown wrote: > >> Matthew Knepley writes: >> >> > On Wed, Jun 26, 2019 at 12:45 PM Jed Brown wrote: >> > >> >> Matthew Knepley writes: >> >> >> >> >> You can implement and register a PC in SLEPc (it would go in >> >> libslepc.so).

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
Matthew Knepley writes: > On Wed, Jun 26, 2019 at 12:45 PM Jed Brown wrote: > >> Matthew Knepley writes: >> >> >> You can implement and register a PC in SLEPc (it would go in >> libslepc.so). >> >> >> > >> > I think this is the bad workflow solution. What Barry suggested will work >> > and be M

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Matthew Knepley via petsc-dev
On Wed, Jun 26, 2019 at 12:45 PM Jed Brown wrote: > Matthew Knepley writes: > > >> You can implement and register a PC in SLEPc (it would go in > libslepc.so). > >> > > > > I think this is the bad workflow solution. What Barry suggested will work > > and be MUCH easier for a developer. Isn't > >

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
Matthew Knepley writes: >> You can implement and register a PC in SLEPc (it would go in libslepc.so). >> > > I think this is the bad workflow solution. What Barry suggested will work > and be MUCH easier for a developer. Isn't > the point of our tools to make our lives easier, not to enforce rule

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Matthew Knepley via petsc-dev
On Wed, Jun 26, 2019 at 11:55 AM Jed Brown via petsc-dev < petsc-dev@mcs.anl.gov> wrote: > "Smith, Barry F. via petsc-dev" writes: > > >> On Jun 26, 2019, at 9:56 AM, Balay, Satish via petsc-dev < > petsc-dev@mcs.anl.gov> wrote: > >> > >> On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote: > >

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jed Brown via petsc-dev
"Smith, Barry F. via petsc-dev" writes: >> On Jun 26, 2019, at 9:56 AM, Balay, Satish via petsc-dev >> wrote: >> >> On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote: >> >>> Hello, >>> >>> as I mentioned in PR #1819, I would like to use SLEPc in PETSc. >>> >>> Currently when PETSc is co

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Smith, Barry F. via petsc-dev
> On Jun 26, 2019, at 9:56 AM, Balay, Satish via petsc-dev > wrote: > > On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote: > >> Hello, >> >> as I mentioned in PR #1819, I would like to use SLEPc in PETSc. >> >> Currently when PETSc is configured with --download-slepc, it defines >> PET

Re: [petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Balay, Satish via petsc-dev
On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote: > Hello, > > as I mentioned in PR #1819, I would like to use SLEPc in PETSc. > > Currently when PETSc is configured with --download-slepc, it defines > PETSC_HAVE_SLEPC and each compilation of PETSc recompiles SLEPc. yes - slepc uses petsc,

[petsc-dev] circular dependencies SLEPc

2019-06-26 Thread Jakub Kruzik via petsc-dev
Hello, as I mentioned in PR #1819, I would like to use SLEPc in PETSc. Currently when PETSc is configured with --download-slepc, it defines PETSC_HAVE_SLEPC and each compilation of PETSc recompiles SLEPc. The first way to use SLEPc is from an example. That should be easy, all we need is to a