Re: [petsc-users] error destroying solver context

2020-03-11 Thread Matthew Knepley
On Wed, Mar 11, 2020 at 7:26 PM Adolfo Rodriguez wrote: > I have a situation with a c++ code where I get an error when destroying > the solver context after destroying the matrix. I have the following lines > at the end of my function > > KSPDestroy(); > MatDestroy(); >

[petsc-users] error destroying solver context

2020-03-11 Thread Adolfo Rodriguez
I have a situation with a c++ code where I get an error when destroying the solver context after destroying the matrix. I have the following lines at the end of my function KSPDestroy(); MatDestroy(); PetscObjectDestroy((PetscObject*)); PetscObjectDestroy((PetscObject*)); It is a very simple

Re: [petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Jed Brown
Please check out these resources. https://cmake.org/cmake/help/latest/module/FindPkgConfig.html https://gitlab.com/petsc/petsc/-/merge_requests/2367 Yann Jobic writes: > Hi all, > > I solved my problem, but i don't know if it's the right way to do it. > Libs.private is used in case of static

Re: [petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Yann Jobic
Hi all, I solved my problem, but i don't know if it's the right way to do it. Libs.private is used in case of static linking. So I added: execute_process ( COMMAND pkg-config PETSc --libs --static OUTPUT_VARIABLE STATIC_LIBS) string(STRIP ${STATIC_LIBS} STATIC_LIBS) message("Libs static : "

[petsc-users] cmake, pkg-config and Libs.private

2020-03-11 Thread Yann Jobic
Hi all, I'm trying to create a correct CMakeLists.txt in order to compile a petsc program. I can compile my code, but i cannot link it. I have this link command : /local/lib/openmpi/gcc8/4.0.3/bin/mpicc -g -rdynamic CMakeFiles/Test1.dir/src/dvm_dg1D_qff_2dV.c.o