[petsc-users] EPSSolve in a loop
Dharmendar Reddy
dharmareddy84 at gmail.com
Sat May 4 17:31:04 CDT 2013
On Sat, May 4, 2013 at 9:54 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Dharmendar Reddy <dharmareddy84 at gmail.com> writes:
>
> >> You are right, The time per solve increases in both case, see the
> > attached plot.
> >
> > I have attached the stage wise log_summary .
>
> Thanks.
>
> ##########################################################
> # #
> # WARNING!!! #
> # #
> # This code was compiled with a debugging option, #
> # To get timing results run ./configure #
> # using --with-debugging=no, the performance will #
> # be generally two or three times faster. #
> # #
> ##########################################################
>
>
> Here are some relevant events:
>
>
> --- Event Stage 1: Solve Step : 1
>
> IPOrthogonalize 90 1.0 7.7698e-02 1.0 3.04e+06 1.0 0.0e+00 0.0e+00
> 5.4e+02 0 1 0 0 0 18 67 0 0 32 39
> IPInnerProduct 896 1.0 5.1215e-02 1.0 1.60e+06 1.0 0.0e+00 0.0e+00
> 0.0e+00 0 0 0 0 0 12 35 0 0 0 31
> VecMAXPBY 179 1.0 2.0418e-02 1.0 1.44e+06 1.0 0.0e+00 0.0e+00
> 0.0e+00 0 0 0 0 0 5 32 0 0 0 71
> VecScale 89 1.0 9.6772e-03 1.0 7.92e+03 1.0 0.0e+00 0.0e+00
> 0.0e+00 0 0 0 0 0 2 0 0 0 0 1
> VecReduceArith 448 1.0 3.6906e-02 1.0 1.48e+06 1.0 0.0e+00 0.0e+00
> 0.0e+00 0 0 0 0 0 9 32 0 0 0 40
>
>
> --- Event Stage 111: Solve Step : 111
>
> IPOrthogonalize 90 1.0 1.5872e+01 1.0 3.04e+06 1.0 0.0e+00 0.0e+00
> 5.4e+02 1 1 0 0 0 83 67 0 0 32 0
> IPInnerProduct 896 1.0 9.5349e+00 1.0 1.60e+06 1.0 0.0e+00 0.0e+00
> 0.0e+00 1 0 0 0 0 50 35 0 0 0 0
> VecMAXPBY 179 1.0 6.3249e+00 1.0 1.44e+06 1.0 0.0e+00 0.0e+00
> 0.0e+00 1 0 0 0 0 33 32 0 0 0 0
> VecScale 89 1.0 3.1402e+00 1.0 7.92e+03 1.0 0.0e+00 0.0e+00
> 0.0e+00 0 0 0 0 0 16 0 0 0 0 0
> VecReduceArith 448 1.0 9.5169e+00 1.0 1.48e+06 1.0 0.0e+00 0.0e+00
> 0.0e+00 1 0 0 0 0 49 32 0 0 0 0
>
>
> VecScale is simple and does exactly the same amount of work in both
> cases, so I think the problem is in memory management. It doesn't look
> like you are using enough memory to be swapping and I don't think there
> are any CHKMEMQ statements in here. You could try running with '-malloc
> 0', and/or in optimized mode.
>
There is no CHKMEMQ statements. I will try running the optimized modes.
Aren't the different eps objects independent ? All the objects are created
only once. Every time i call solve, all i do is EPSSetOperators and
EPSSolve.
The code is designed to provide a eigensolver to the user, without worrying
about the slepc and petsc objects inside, if i have to resue the eps
objects for all solvers then i may have to share the eps between different
instances of eigenSolver, i am not sure how easily i can do that.
I am running the code on dual 8-core Xeon X5 with 32 GB memory. I hardly
use 1 to 2 % of memory. What do you mean by memory management problem ?
> It looks like you create one EPS per loop iteration, but don't destroy
> any of them until the end. If you don't need all the EPS at once, you
> should either reuse one throughout the loop or destroy the new one each
> step after using it.
>
I need to reuse the eps objects, There is an outer loop
do jc=1,numSolve
computeOperators (A1,B1,A2,B2,A3,B3)
do ic=1,111
eigenSolver(ic)%solve
end do
ComputeOtherQuantities based on eigenvectors
end do
--
-----------------------------------------------------
Dharmendar Reddy Palle
Graduate Student
Microelectronics Research center,
University of Texas at Austin,
10100 Burnet Road, Bldg. 160
MER 2.608F, TX 78758-4445
e-mail: dharmareddy84 at gmail.com
Phone: +1-512-350-9082
United States of America.
Homepage: https://webspace.utexas.edu/~dpr342
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130504/d29cec68/attachment.html>
More information about the petsc-users
mailing list