[petsc-users] Need to update matrix in every loop

Barry Smith bsmith at mcs.anl.gov
Sat Aug 8 12:52:05 CDT 2015


> On Aug 8, 2015, at 7:52 AM, sheng liu <ustc.liu at gmail.com> wrote:
> 
> Hello:
>     I have a large sparse symmetric matrix ( about 1000000x1000000), and I need about 10 eigenvalues near 0. The problem is: I need to run the same program about 1000 times, each time I need to change the diagonal matrix elements ( and they are generated randomly). Is there a fast way to implement this problem? Thank you!

  Does each run depend on the previous one or are they all independent?

  If they are independent I would introduce two levels of parallelism: On the outer level have different MPI communicators compute different random diagonal perturbations and on the inner level use a small amount of parallelism for each eigenvalue solve. The outer level of parallelism is embarrassingly parallel.

  Of course, for runs of the eigensolve use -log_summary to make sure it is running efficiently and tune the amount of parallelism in the eigensolve for best performance. 

   Barry




More information about the petsc-users mailing list