[petsc-users] slepc4py: How to create a matrix in serial then find its eigenvalues in parallel?
Matthew Knepley
knepley at gmail.com
Mon Jun 9 15:56:46 CDT 2014
On Mon, Jun 9, 2014 at 3:43 PM, Alex Eftimiades <alexeftimiades at gmail.com>
wrote:
> I have a routine that creates a matrix in parallel by spawning
> subprocesse. This is to say it is run from a serial python interpreter, but
> spawns subprocesses so that it works in parallel. The result is a scipy
> csr_matrix.
>
> What would be the best way use slepsc4py to solve for eigenvalues and
> eigenvectors in parallel? I tried a rather awkward method (described
> below), but I suspect there is a better way to go about doing this.
>
> I have currently tried saving the csr data to a file, reading it with a
> new python interpreter spawned with mpiexec, and writing the resulting
> eigenvalues and eigenvectors to a file. However, something is going wrong
> as I read in the file from the python interpreter spawned with mpiexec.
>
I suggest using the PetscBinaryViewer to read and write the file. This way
you can save it in serial, but read it in parallel.
Thanks,
Matt
> Thanks,
> Alex Eftimiades
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140609/c777764b/attachment.html>
More information about the petsc-users
mailing list