[petsc-users] help: use real and complex petsc together

Jose E. Roman jroman at dsic.upv.es
Fri Mar 31 08:01:00 CDT 2023


I don't know enough about dlopen to answer you question. Maybe other people can comment. My suggestion is that you do everything in complex scalars and avoid complications trying to mix real and complex.

Regarding the second question, if I am not wrong PetscInitialize/PetscFinalize can be called several times, so it should not be a problem.

Jose


> El 31 mar 2023, a las 6:14, Gong Ding <gongding at cn.cogenda.com> escribió:
> 
> Dear petsc developer,
> 
> We are considering use complex matrix for eigen value decomposition via slepc will keep DC/Tran simulation in real world.
> 
> We can, compiler each solver (AC, DC, Tran, etc) as dynamic library (.so), and load them by dlopen.
> 
> So, is it possible, each time we load a solver, which links to real/comples petsc,  to do the simulation. After that, we dlclose it and load next solver.
> 
> And another question is, we must keep MPI commnucator in the main code and call PetscInitialize/PetscFinalize in the so, it seems petsc support this mechanism, right?
> 
> 
> Gong Ding
> 
> 



More information about the petsc-users mailing list