Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Barry Smith
Valgrind doesn't report any problems? > On Oct 24, 2016, at 12:09 PM, Anton Popov wrote: > > > > On 10/24/2016 05:47 PM, Hong wrote: >> Barry, >> Your change indeed fixed the error of his testing code. >> As Satish tested, on your branch, ex16 runs smooth. >> >> I do

Re: [petsc-users] question

2016-10-24 Thread Kong, Fande
Using -snes_linesearch_type basic to turn off the line search, you will see that the number of function evaluations is the same as the number of Newton iterations. Fande, On Mon, Oct 24, 2016 at 2:13 PM, Gideon Simpson wrote: > I just mean that if I were working

Re: [petsc-users] question

2016-10-24 Thread Gideon Simpson
I just mean that if I were working a Newton iteration by hand, i.e., x_{n+1} = x_n - J^{-1} F(x_n), I’d be able to count the number of Newton iterations. I’m trying to see how that count would relate to the numbers reported by snes_view. I’m guessing that -snes_monitor is giving a more

Re: [petsc-users] question

2016-10-24 Thread Jed Brown
Gideon Simpson writes: > Ok, so if I’m doing the default Newton Line Search, how would I interpret the > 5 and the 20, vis a vis what I would be doing with pencil and paper? I don't know what you're doing with pencil and paper. It's just counting the number of

Re: [petsc-users] question

2016-10-24 Thread Gideon Simpson
Suppose I’m specifying the Jacobian. -gideon > On Oct 24, 2016, at 4:02 PM, Kong, Fande wrote: > > If you are using the matrix-free method, the number of function evaluations > is way more than the number of Newton iterations. > > Fande, > > On Mon, Oct 24, 2016 at

Re: [petsc-users] question

2016-10-24 Thread Kong, Fande
If you are using the matrix-free method, the number of function evaluations is way more than the number of Newton iterations. Fande, On Mon, Oct 24, 2016 at 2:01 PM, Justin Chang wrote: > Sorry forgot to hit reply all > > On Monday, October 24, 2016, Justin Chang

Re: [petsc-users] question

2016-10-24 Thread Justin Chang
Sorry forgot to hit reply all On Monday, October 24, 2016, Justin Chang wrote: > It depends on your SNES solver. A SNES iteration could involve more than > one function evaluation (e.g., line searching). Also, -snes_monitor may say > 3 iterations whereas -snes_view might

Re: [petsc-users] question

2016-10-24 Thread Gideon Simpson
Ok, so if I’m doing the default Newton Line Search, how would I interpret the 5 and the 20, vis a vis what I would be doing with pencil and paper? -gideon > On Oct 24, 2016, at 3:59 PM, Jed Brown wrote: > > Gideon Simpson writes: > >> I notice

Re: [petsc-users] question

2016-10-24 Thread Jed Brown
Gideon Simpson writes: > I notice that if I use -snes_view, > > I see lines like: > total number of linear solver iterations=20 > total number of function evaluations=5 > Just to clarify, the number of "function evaluations" corresponds to the > number of Newton

[petsc-users] question

2016-10-24 Thread Gideon Simpson
I notice that if I use -snes_view, I see lines like: total number of linear solver iterations=20 total number of function evaluations=5 Just to clarify, the number of "function evaluations" corresponds to the number of Newton (or Newton like) steps, and the total "number of linear solver

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Hong
Anton: > > If replacing superlu_dist with mumps, does your code work? > > yes > You may use mumps in your code, or tests different options for superlu_dist: -mat_superlu_dist_equil: Equilibrate matrix (None) -mat_superlu_dist_rowperm Row permutation (choose one of) LargeDiag NATURAL (None)

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Anton
On 10/24/16 8:21 PM, Hong wrote: Anton : If replacing superlu_dist with mumps, does your code work? yes Hong On 10/24/2016 05:47 PM, Hong wrote: Barry, Your change indeed fixed the error of his testing code. As Satish tested, on your branch, ex16 runs smooth. I do not

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Hong
Anton : If replacing superlu_dist with mumps, does your code work? Hong > > On 10/24/2016 05:47 PM, Hong wrote: > > Barry, > Your change indeed fixed the error of his testing code. > As Satish tested, on your branch, ex16 runs smooth. > > I do not understand why on maint or master branch, ex16

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Anton Popov
On 10/24/2016 05:47 PM, Hong wrote: Barry, Your change indeed fixed the error of his testing code. As Satish tested, on your branch, ex16 runs smooth. I do not understand why on maint or master branch, ex16 creases inside superlu_dist, but not with mumps. I also confirm that ex16 runs

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Hong
Barry, Your change indeed fixed the error of his testing code. As Satish tested, on your branch, ex16 runs smooth. I do not understand why on maint or master branch, ex16 creases inside superlu_dist, but not with mumps. Hong On Mon, Oct 24, 2016 at 9:34 AM, Satish Balay

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Satish Balay
On Mon, 24 Oct 2016, Barry Smith wrote: > > > [Or perhaps Hong is using a different test code and is observing bugs > > with superlu_dist interface..] > >She states that her test does a NEW MatCreate() for each matrix load (I > cut and pasted it in the email I just sent). The bug I fixed

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Barry Smith
> On Oct 24, 2016, at 9:24 AM, Kong, Fande wrote: > > > > On Mon, Oct 24, 2016 at 8:07 AM, Kong, Fande wrote: > > > On Sun, Oct 23, 2016 at 3:56 PM, Barry Smith wrote: > >Thanks Satish, > > I have fixed this in

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Barry Smith
> [Or perhaps Hong is using a different test code and is observing bugs > with superlu_dist interface..] She states that her test does a NEW MatCreate() for each matrix load (I cut and pasted it in the email I just sent). The bug I fixed was only related to using the SAME matrix from one

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Satish Balay
Yes - but this test code [that Hong is also using] is buggy due to using MatLoad() twice - so the corrupted Matrix does have wierd behavior later in PC. With your fix - the test code rpovided by Anton behaves fine for me. So Hong would have to restart the diagnosis - and I suspect all the wierd

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Kong, Fande
On Mon, Oct 24, 2016 at 8:07 AM, Kong, Fande wrote: > > > On Sun, Oct 23, 2016 at 3:56 PM, Barry Smith wrote: > >> >>Thanks Satish, >> >> I have fixed this in barry/fix-matmpixxxsetpreallocation-reentrant >> (in next for testing) >> >>

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Barry Smith
Hong wrote: (Note that it creates a new Mat each time so shouldn't be affected by the bug I fixed; it also "works" with MUMPs but not superlu_dist.) It is not problem with Matload twice. The file has one matrix, but is loaded twice. Replacing pc with ksp, the code runs fine. The error

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Kong, Fande
On Sun, Oct 23, 2016 at 3:56 PM, Barry Smith wrote: > >Thanks Satish, > > I have fixed this in barry/fix-matmpixxxsetpreallocation-reentrant > (in next for testing) > > Fande, > > This will also make MatMPIAIJSetPreallocation() work properly with >

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Satish Balay
Since the provided test code dosn't crash [and is valgrind clean] - with this fix - I'm not sure what bug Hong is chasing.. Satish On Mon, 24 Oct 2016, Barry Smith wrote: > > Anton, > >Sorry for any confusion. This doesn't resolve the SuperLU_DIST issue which > I think Hong is working

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Barry Smith
Anton, Sorry for any confusion. This doesn't resolve the SuperLU_DIST issue which I think Hong is working on, this only resolves multiple loads of matrices into the same Mat. Barry > On Oct 24, 2016, at 5:07 AM, Anton Popov wrote: > > Thank you Barry, Satish,

Re: [petsc-users] SuperLU_dist issue in 3.7.4 failure of repeated calls to MatLoad() or MatMPIAIJSetPreallocation() with the same matrix

2016-10-24 Thread Anton Popov
Thank you Barry, Satish, Fande! Is there a chance to get this fix in the maintenance release 3.7.5 together with the latest SuperLU_DIST? Or next release is a more realistic option? Anton On 10/24/2016 01:58 AM, Satish Balay wrote: The original testcode from Anton also works [i.e is