[petsc-users] Fwd: Fwd: same petsc problem
Mark Adams
mfadams at lbl.gov
Mon Jul 13 15:23:42 CDT 2015
Please respond to all, to get the petsc mailing list.
The out file here looks fine. It would help of you run in debug mode (and
get -g) so that gdb can give line numbers.
If the error is in the dot product it looks like you are getting an Inf or
Nan someplace. If the first evaluation of the norm was the problem then
run the bad code and add a VecView and MatView, and add a VecNorm and
MatNorm so that the error happens in your code, just to check. If you had
1e200 number in the vector then the 2 norm would give you this trap for
overflow. You could test with the inf norm and it works then it is an
overflow problem.
---------- Forwarded message ----------
From: Greg Miller <grgmiller at ucdavis.edu>
Date: Mon, Jul 13, 2015 at 3:54 PM
Subject: Re: Fwd: same petsc problem
To: Mark Adams <mfadams at lbl.gov>
Cc: "treb at lbl.gov" <treb at lbl.gov>
thanks. here it is.
I'm not getting the nan problem with this code - not sure why. NaN was
showing up KSP_solve in the first evaluation of the vector norm.
In going from my original example to the minimal code I mailed today the
matrix coefficients got rounded through asci printing.
That's the only difference I can think of. The gdb stack from the old code
is shown below.
G
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff6c4ed15 in ddot_ () from /usr/lib/libblas.so.3
(gdb) where
#0 0x00007ffff6c4ed15 in ddot_ () from /usr/lib/libblas.so.3
#1 0x00000000008f87da in VecNorm_Seq (xin=0x22e7ca0, type=NORM_2,
z=0x7fffffffba30)
at /home/usr/local/src/petsc-3.5.3/src/vec/vec/impls/seq/bvec2.c:614
#2 0x00000000008c9eea in VecNorm (x=0x22e7ca0, type=NORM_2,
val=0x7fffffffba30)
at /home/usr/local/src/petsc-3.5.3/src/vec/vec/interface/rvector.c:242
#3 0x00000000008cab40 in VecNormalize (x=0x22e7ca0, val=0x7fffffffbaa0) at
/home/usr/local/src/petsc-3.5.3/src/vec/vec/interface/rvector.c:337
#4 0x0000000000d44a9d in KSPGMRESCycle (itcount=0x7fffffffbb08,
ksp=0x2288ff0)
at /home/usr/local/src/petsc-3.5.3/src/ksp/ksp/impls/gmres/gmres.c:161
#5 0x0000000000d453e3 in KSPSolve_GMRES (ksp=0x2288ff0) at
/home/usr/local/src/petsc-3.5.3/src/ksp/ksp/impls/gmres/gmres.c:235
On 07/13/2015 11:54 AM, Mark Adams wrote:
> Greg, I am forwarding this to the PETSc mailing list.
>
> Please send the entire output from this run. As I recall you were
getting a message that all values were not the same on all processors in
GMRES. I have seen this when I get NaNs in the system.
>
> While you are doing this you should use a simple solver like change:
>
> -pressure_pc_type gamg
>
> to
>
> -pressure_pc_type jacobi
>
>
> And add:
>
> *-*pressure_*ksp_monitor_true_residual*
>
> Mark
>
>
> ---------- Forwarded message ----------
> From: *Greg Miller* <grgmiller at ucdavis.edu <mailto:grgmiller at ucdavis.edu>>
> Date: Mon, Jul 13, 2015 at 2:08 PM
> Subject: same petsc problem
> To: Mark Adams <mfadams at lbl.gov <mailto:mfadams at lbl.gov>>
> Cc: David Trebotich <treb at hpcrd.lbl.gov <mailto:treb at hpcrd.lbl.gov>>
>
>
> Hi Mark. I'm still stuck on the same petsc problem. Would you please
try the attached minimal example and advise me?
>
> I'm running this without MPI:
> make DIM=2 DEBUG=TRUE MPI=FALSE USE_PETSC=TRUE test
>
> There is no input file.
>
> Thank you,
> Greg
>
> --
> Greg Miller
> Department of Chemical Engineering and Materials Science
> University of California, Davis
> One Shields Avenue
> Davis, CA 95616
> grgmiller at ucdavis.edu <mailto:grgmiller at ucdavis.edu>
>
--
Greg Miller
Department of Chemical Engineering and Materials Science
University of California, Davis
One Shields Avenue
Davis, CA 95616
grgmiller at ucdavis.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150713/d58a2e78/attachment.html>
-------------- next part --------------
row 0 6
row 1 6
row 2 6
row 3 6
row 4 6
row 5 5
row 6 9
row 7 9
row 8 9
row 9 9
row 10 9
row 11 6
row 12 9
row 13 9
row 14 9
row 15 9
row 16 9
row 17 9
row 18 9
row 19 9
row 20 9
row 21 7
row 22 8
row 23 8
row 24 10
row 25 8
row 26 7
row 27 7
Mat Object: 1 MPI processes
type: seqaij
row 0: (0, -35.1605) (1, 65.5802) (2, -1.97531) (6, -21.7284) (7, -8.69136) (8, 1.97531)
row 1: (0, 18.2167) (1, -28.5322) (2, 38.7599) (6, 0.746228) (7, -28.3567) (8, -0.834019)
row 2: (1, 22.2973) (2, -28.476) (3, 34.6232) (7, 0.458272) (8, -28.4128) (9, -0.489877)
row 3: (2, 24.0504) (3, -28.4606) (4, 32.8546) (8, 0.330562) (9, -28.4283) (10, -0.346687)
row 4: (3, 25.0255) (4, -28.4542) (5, 31.8732) (9, 0.258497) (10, -28.4347) (11, -0.268252)
row 5: (3, -4.68871) (4, 23.5369) (5, -25.1004) (9, -1.17295) (10, 1.95232)
row 6: (0, -21.7284) (1, -8.69136) (2, 1.97531) (6, -13.4321) (7, 74.2716) (8, -3.95062) (12, -21.7284) (13, -8.69136) (14, 1.97531)
row 7: (0, 0.746228) (1, -28.3567) (2, -0.834019) (6, 17.4705) (7, -0.175583) (8, 39.594) (12, 0.746228) (13, -28.3567) (14, -0.834019)
row 8: (1, 0.458272) (2, -28.4128) (3, -0.489877) (7, 21.839) (8, -0.0632099) (9, 35.1131) (13, 0.458272) (14, -28.4128) (15, -0.489877)
row 9: (2, 0.330562) (3, -28.4283) (4, -0.346687) (8, 23.7198) (9, -0.0322499) (10, 33.2013) (14, 0.330562) (15, -28.4283) (16, -0.346687)
row 10: (2, -0.260152) (3, -0.437726) (4, 28.4347) (5, 0.268252) (8, -0.221588) (9, 22.4942) (10, -101.62) (11, 23.8508) (15, -0.102103)
row 11: (3, -2.04803) (4, -0.924419) (9, -1.4638) (10, 21.5832) (11, -21.9234) (16, 0.24403)
row 12: (6, -21.7284) (7, -8.69136) (8, 1.97531) (12, -13.4321) (13, 74.2716) (14, -3.95062) (17, -21.7284) (18, -8.69136) (19, 1.97531)
row 13: (6, 0.746228) (7, -28.3567) (8, -0.834019) (12, 17.4705) (13, -0.175583) (14, 39.594) (17, 0.746228) (18, -28.3567) (19, -0.834019)
row 14: (7, 0.458272) (8, -28.4128) (9, -0.489877) (13, 21.839) (14, -0.0632099) (15, 35.1131) (18, 0.458272) (19, -28.4128) (20, -0.489877)
row 15: (8, 0.330562) (9, -28.4283) (10, -0.346687) (14, 23.7198) (15, -0.0322499) (16, 33.2013) (19, 0.330562) (20, -28.4283) (21, -0.346687)
row 16: (2, -1.43812) (3, -1.05908) (8, -1.19288) (9, -1.0564) (10, 26.6807) (11, 0.251705) (14, -0.947652) (15, 22.3132) (16, -22.8819)
row 17: (12, -21.7284) (13, -8.69136) (14, 1.97531) (17, -13.4321) (18, 74.2716) (19, -3.95062) (22, -21.7284) (23, -8.69136) (24, 1.97531)
row 18: (12, 0.746228) (13, -28.3567) (14, -0.834019) (17, 17.4705) (18, -0.175583) (19, 39.594) (22, 0.746228) (23, -28.3567) (24, -0.834019)
row 19: (13, 0.458272) (14, -28.4128) (15, -0.489877) (18, 21.839) (19, -0.0632099) (20, 35.1131) (23, 0.458272) (24, -28.4128) (25, -0.489877)
row 20: (7, -1.02473) (8, -0.857944) (13, -0.781619) (14, -0.945398) (15, 27.9803) (16, 0.346687) (19, 21.0838) (20, -78.2499) (21, 14.7093)
row 21: (8, -1.094) (9, -0.673167) (14, -0.785496) (15, -0.364666) (19, -0.476994) (20, 13.0907) (21, -13.1469)
row 22: (17, -21.7284) (18, -8.69136) (19, 1.97531) (22, -13.4321) (23, 74.2716) (24, -3.95062) (26, -23.7037) (27, -4.74074)
row 23: (12, -0.24058) (13, -0.303069) (17, -0.853082) (18, 28.1873) (19, 0.602186) (22, 10.851) (23, -87.873) (24, 25.3844)
row 24: (12, -1.04197) (13, -1.33743) (14, -1.63289) (17, -0.34607) (18, -1.0998) (19, 27.4759) (20, 0.489877) (23, 17.1101) (24, -57.1114) (25, 11.5568)
row 25: (13, -1.21096) (14, -1.02948) (18, -0.585132) (19, -0.566495) (20, 13.7822) (21, 0.170786) (24, 9.71461) (25, -9.71461)
row 26: (17, -1.21074) (18, -2.8074) (22, 21.857) (23, 7.22334) (24, -1.97531) (26, -83.6509) (27, 55.2064)
row 27: (17, -2.43975) (18, -1.57133) (22, -1.71799) (23, 22.8805) (24, 1.30738) (26, 3.39083) (27, -3.39083)
Residual norms for pressure_ solve.
0 KSP Residual norm 4.923369547386e-01
Residual norms for pressure_ solve.
0 KSP unpreconditioned resid norm 4.923369547386e-01 true resid norm 4.923369547386e-01 ||r(i)||/||b|| 1.000000000000e+00
1 KSP Residual norm 4.922202028746e-01
1 KSP unpreconditioned resid norm 4.922202028746e-01 true resid norm 4.922202028746e-01 ||r(i)||/||b|| 9.997628618716e-01
2 KSP Residual norm 4.884171926867e-01
2 KSP unpreconditioned resid norm 4.884171926867e-01 true resid norm 4.884171926867e-01 ||r(i)||/||b|| 9.920384565607e-01
3 KSP Residual norm 4.884158417184e-01
3 KSP unpreconditioned resid norm 4.884158417184e-01 true resid norm 4.884158417184e-01 ||r(i)||/||b|| 9.920357125695e-01
4 KSP Residual norm 4.470765043654e-01
4 KSP unpreconditioned resid norm 4.470765043654e-01 true resid norm 4.470765043654e-01 ||r(i)||/||b|| 9.080701744252e-01
5 KSP Residual norm 4.418322507016e-01
5 KSP unpreconditioned resid norm 4.418322507016e-01 true resid norm 4.418322507016e-01 ||r(i)||/||b|| 8.974184173036e-01
6 KSP Residual norm 4.188637340252e-01
6 KSP unpreconditioned resid norm 4.188637340252e-01 true resid norm 4.188637340252e-01 ||r(i)||/||b|| 8.507663907690e-01
7 KSP Residual norm 4.121772624283e-01
7 KSP unpreconditioned resid norm 4.121772624283e-01 true resid norm 4.121772624283e-01 ||r(i)||/||b|| 8.371853025885e-01
8 KSP Residual norm 3.699313881279e-01
8 KSP unpreconditioned resid norm 3.699313881279e-01 true resid norm 3.699313881279e-01 ||r(i)||/||b|| 7.513784707150e-01
9 KSP Residual norm 3.104187604144e-01
9 KSP unpreconditioned resid norm 3.104187604144e-01 true resid norm 3.104187604144e-01 ||r(i)||/||b|| 6.305006305675e-01
10 KSP Residual norm 3.077010361824e-01
10 KSP unpreconditioned resid norm 3.077010361824e-01 true resid norm 3.077010361824e-01 ||r(i)||/||b|| 6.249805813292e-01
11 KSP Residual norm 3.051952402306e-01
11 KSP unpreconditioned resid norm 3.051952402306e-01 true resid norm 3.051952402304e-01 ||r(i)||/||b|| 6.198909858239e-01
12 KSP Residual norm 2.709385521570e-01
12 KSP unpreconditioned resid norm 2.709385521570e-01 true resid norm 2.709385521554e-01 ||r(i)||/||b|| 5.503112239448e-01
13 KSP Residual norm 2.386366196188e-01
13 KSP unpreconditioned resid norm 2.386366196188e-01 true resid norm 2.386366196097e-01 ||r(i)||/||b|| 4.847018232389e-01
14 KSP Residual norm 2.257613135506e-01
14 KSP unpreconditioned resid norm 2.257613135506e-01 true resid norm 2.257613135839e-01 ||r(i)||/||b|| 4.585504122959e-01
15 KSP Residual norm 1.886883992310e-01
15 KSP unpreconditioned resid norm 1.886883992310e-01 true resid norm 1.886883993467e-01 ||r(i)||/||b|| 3.832505310247e-01
16 KSP Residual norm 1.818048492335e-01
16 KSP unpreconditioned resid norm 1.818048492335e-01 true resid norm 1.818048491539e-01 ||r(i)||/||b|| 3.692691507392e-01
17 KSP Residual norm 1.736886772705e-01
17 KSP unpreconditioned resid norm 1.736886772705e-01 true resid norm 1.736886768270e-01 ||r(i)||/||b|| 3.527841555571e-01
18 KSP Residual norm 1.484702394947e-01
18 KSP unpreconditioned resid norm 1.484702394947e-01 true resid norm 1.484702386630e-01 ||r(i)||/||b|| 3.015622476314e-01
19 KSP Residual norm 1.178484176398e-01
19 KSP unpreconditioned resid norm 1.178484176398e-01 true resid norm 1.178484175828e-01 ||r(i)||/||b|| 2.393653705019e-01
20 KSP Residual norm 1.106207614087e-01
20 KSP unpreconditioned resid norm 1.106207614087e-01 true resid norm 1.106207612921e-01 ||r(i)||/||b|| 2.246850662487e-01
21 KSP Residual norm 1.106155060584e-01
21 KSP unpreconditioned resid norm 1.106155060584e-01 true resid norm 1.106155059424e-01 ||r(i)||/||b|| 2.246743919541e-01
22 KSP Residual norm 9.609555157125e-02
22 KSP unpreconditioned resid norm 9.609555157125e-02 true resid norm 9.609555205064e-02 ||r(i)||/||b|| 1.951824885899e-01
23 KSP Residual norm 8.367065614726e-02
23 KSP unpreconditioned resid norm 8.367065614726e-02 true resid norm 8.367066170257e-02 ||r(i)||/||b|| 1.699459301141e-01
24 KSP Residual norm 2.718415845570e-02
24 KSP unpreconditioned resid norm 2.718415845570e-02 true resid norm 2.718416055501e-02 ||r(i)||/||b|| 5.521454421280e-02
25 KSP Residual norm 1.378176148571e-02
25 KSP unpreconditioned resid norm 1.378176148571e-02 true resid norm 1.378177035106e-02 ||r(i)||/||b|| 2.799255716722e-02
26 KSP Residual norm 3.455821884476e-03
26 KSP unpreconditioned resid norm 3.455821884476e-03 true resid norm 3.455825493563e-03 ||r(i)||/||b|| 7.019228315692e-03
27 KSP Residual norm 6.380274205376e-04
27 KSP unpreconditioned resid norm 6.380274205376e-04 true resid norm 6.380338669111e-04 ||r(i)||/||b|| 1.295929263018e-03
28 KSP Residual norm 6.625134431068e-08
28 KSP unpreconditioned resid norm 6.625134431068e-08 true resid norm 6.625015715291e-08 ||r(i)||/||b|| 1.345626334064e-07
29 KSP Residual norm 4.684635384134e-08
29 KSP unpreconditioned resid norm 4.684635384134e-08 true resid norm 6.625014848465e-08 ||r(i)||/||b|| 1.345626158000e-07
30 KSP Residual norm 3.824977316131e-08
30 KSP unpreconditioned resid norm 3.824977316131e-08 true resid norm 6.625014556439e-08 ||r(i)||/||b|| 1.345626098686e-07
31 KSP Residual norm 3.312522563283e-08
31 KSP unpreconditioned resid norm 3.312522563283e-08 true resid norm 6.625014419208e-08 ||r(i)||/||b|| 1.345626070813e-07
32 KSP Residual norm 2.962807588852e-08
32 KSP unpreconditioned resid norm 2.962807588852e-08 true resid norm 6.625014312140e-08 ||r(i)||/||b|| 1.345626049066e-07
33 KSP Residual norm 2.704659296230e-08
33 KSP unpreconditioned resid norm 2.704659296230e-08 true resid norm 6.625014256292e-08 ||r(i)||/||b|| 1.345626037722e-07
34 KSP Residual norm 2.504026867936e-08
34 KSP unpreconditioned resid norm 2.504026867936e-08 true resid norm 6.625014212629e-08 ||r(i)||/||b|| 1.345626028854e-07
35 KSP Residual norm 2.342301905016e-08
35 KSP unpreconditioned resid norm 2.342301905016e-08 true resid norm 6.625014195008e-08 ||r(i)||/||b|| 1.345626025275e-07
36 KSP Residual norm 2.208342862904e-08
36 KSP unpreconditioned resid norm 2.208342862904e-08 true resid norm 6.625014144127e-08 ||r(i)||/||b|| 1.345626014940e-07
37 KSP Residual norm 2.095017572030e-08
37 KSP unpreconditioned resid norm 2.095017572030e-08 true resid norm 6.625014118907e-08 ||r(i)||/||b|| 1.345626009818e-07
38 KSP Residual norm 1.997520552365e-08
38 KSP unpreconditioned resid norm 1.997520552365e-08 true resid norm 6.625014124616e-08 ||r(i)||/||b|| 1.345626010977e-07
39 KSP Residual norm 1.912480064732e-08
39 KSP unpreconditioned resid norm 1.912480064732e-08 true resid norm 6.625014105825e-08 ||r(i)||/||b|| 1.345626007161e-07
40 KSP Residual norm 1.837451200031e-08
40 KSP unpreconditioned resid norm 1.837451200031e-08 true resid norm 6.625014083281e-08 ||r(i)||/||b|| 1.345626002582e-07
41 KSP Residual norm 1.770612105494e-08
41 KSP unpreconditioned resid norm 1.770612105494e-08 true resid norm 6.625014094251e-08 ||r(i)||/||b|| 1.345626004810e-07
42 KSP Residual norm 1.710573659738e-08
42 KSP unpreconditioned resid norm 1.710573659738e-08 true resid norm 6.625014076184e-08 ||r(i)||/||b|| 1.345626001140e-07
43 KSP Residual norm 1.656255700123e-08
43 KSP unpreconditioned resid norm 1.656255700123e-08 true resid norm 6.625014071043e-08 ||r(i)||/||b|| 1.345626000096e-07
44 KSP Residual norm 1.606803939624e-08
44 KSP unpreconditioned resid norm 1.606803939624e-08 true resid norm 6.625014079681e-08 ||r(i)||/||b|| 1.345626001851e-07
45 KSP Residual norm 1.561532654349e-08
45 KSP unpreconditioned resid norm 1.561532654349e-08 true resid norm 6.625014080144e-08 ||r(i)||/||b|| 1.345626001944e-07
46 KSP Residual norm 1.519884198109e-08
46 KSP unpreconditioned resid norm 1.519884198109e-08 true resid norm 6.625014027942e-08 ||r(i)||/||b|| 1.345625991341e-07
47 KSP Residual norm 1.481399800623e-08
47 KSP unpreconditioned resid norm 1.481399800623e-08 true resid norm 6.625014073146e-08 ||r(i)||/||b|| 1.345626000523e-07
48 KSP Residual norm 1.445698111629e-08
48 KSP unpreconditioned resid norm 1.445698111629e-08 true resid norm 6.625014047947e-08 ||r(i)||/||b|| 1.345625995405e-07
49 KSP Residual norm 1.412459174219e-08
49 KSP unpreconditioned resid norm 1.412459174219e-08 true resid norm 6.625014029691e-08 ||r(i)||/||b|| 1.345625991697e-07
50 KSP Residual norm 1.381412275085e-08
50 KSP unpreconditioned resid norm 1.381412275085e-08 true resid norm 6.625014018839e-08 ||r(i)||/||b|| 1.345625989493e-07
Linear solve did not converge due to DIVERGED_ITS iterations 50
KSP diverged. reason= -3
More information about the petsc-users
mailing list