> On May 6, 2015, at 4:16 AM, siddhesh godbole <[email protected]> 
> wrote:
> 
> Hello,
> 
> I want to close the PETSc environment in the middle of my C program but want 
> to retain the matrices generated in PETSc and access them using C program. 
> How can i /(Can I) do this? 
> 
> To be precise, i am solving eigenvalue system using SLEPc and i am using the 
> results to decouple the system matrices. Now i want to run the Newmark 
> integration code on those matrices. I am getting very slow performance by 
> PETSc routines such as
> MatGetColumnVector()
> VecGetArray()
> MatAXPY()
> VecAXPBYPCZ()
>  So i just want to close the PETSc environment and retain these matrices and 
> solve using available Newmark code in C using mpi.  Need your inputs.
> 
   You cannot call PetscFinalize() and then continue to use PETSc matrices; but 
you can avoid using routines that are slow for you. Now MatGetColumnVector() 
and MatAXPY() can be slow depending on the matrices nonzero structure but 
VecGetArray() and VecAXPBYPCZ() will never be slow. Perhaps you need to look at 
the timings more carefully to see where the time is being spent. For example 
run with -log_summary and email the results to us so we can determine what is 
causing your slow performance.

  Barry

   
> Thank you very much
> 
> Siddhesh M Godbole
> 
> 5th year Dual Degree,
> Civil Eng & Applied Mech.
> IIT Madras

Reply via email to