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

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

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

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

Re: [petsc-dev] Slowness of PetscSortIntWithArrayPair in MatAssembly

2019-07-08 Thread Zhang, Junchao via petsc-dev
Is the code public for me to test? --Junchao Zhang On Mon, Jul 8, 2019 at 3:06 PM Fande Kong mailto:fdkong...@gmail.com>> wrote: Thanks Junchao, Tried your code. I did not hit seg fault this time, but the assembly was still slow time mpirun -n 2 ./matrix_sparsity-opt -matstash_legacy

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

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