*************************************************************************************** This code is meant to compare the convergence behaviour of PARALLEL and SERIAL implementation for selected Preconditioner-Solver combination **************** COMPILE TIME PARAMETERS ************** PARALLEL SOLVER TYPE : 2 PRECONDITIONER TYPE : 2 WRITE CONVERGENCE : 1 ******************************************************* *************** WORLD_SIZE : 1 Now setting up the matrices A and M process with rank : 0 is here Grid size: 32 Basis size: 33 MATRIX SETUP COMPLETE ***************************** PARALLEL SOLVER starts ******************************** Dispalying the complete intial solution vector by world_rank : 0 0.840188 0.394383 0.783099 0.79844 0.911647 0.197551 0.335223 0.76823 0.277775 0.55397 0.477397 0.628871 0.364784 0.513401 0.95223 0.916195 0.635712 0.717297 0.141603 0.606969 0.0163006 0.242887 0.137232 0.804177 0.156679 0.400944 0.12979 0.108809 0.998925 0.218257 0.512932 0.839112 0.61264 Dispalying the complete matrix A by world_rank : 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 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 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 Dispalying the complete rhs vector by world_rank : 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 The initial residual(2-norm) is 130.947 The initial residual(inf-norm) is 53.4651 Level 0 has 33 unknowns, 33 unknowns per proc (procs=1) aggregating finished. Level 1 has 15 unknowns, 15 unknowns per proc (procs=1) aggregating finished. Level 2 has 7 unknowns, 7 unknowns per proc (procs=1) aggregating finished. Level 3 has 3 unknowns, 3 unknowns per proc (procs=1) operator complexity: 1.71134 Using a direct coarse solver (UMFPack) Building hierarchy of 4 levels (inclusive coarse solver) took 0.00145982 seconds. Building hierarchy took 0.00147747 seconds ****** AMG Criterion *********** max number of levels 10 Corasen Target 3 number of Pre-Smoothing Steps is : 2 number of Post-Smoothing Steps is : 2 Gamma is 1 Additive MG is NOT being used ********************************* === CGSolver Iter Defect Rate 0 130.947 1 0.899025 0.00686557 2 0.122682 0.136461 3 0.0106154 0.0865278 4 0.000920604 0.0867235 5 3.03378e-05 0.0329542 6 2.60274e-06 0.0857918 7 3.34048e-07 0.128345 === rate=0.059209, T=0.00457431, TIT=0.000653473, IT=7 AMG solving took 0.00465839 seconds AMG building took 2.26095 iterations AMG building together with slving took 0.00613586 Convergence details for the selected solver and preconditioner combination convergence achieved : 1 iterations taken : 7 reduction achieved : 2.55101972310868e-09 convergence rate : 5.92089947984426e-02 time elapsed : 4.57430900000000e-03 The residual(inf_norm) for the selected solver and preconditioner combination is : 2.30147982449580e-07 The residual(2-norm) for the selected solver and preconditioner combination is : 3.34047915597939e-07 ***************************** PARALLEL SOLVER Completed !! ******************************** *************************************************************************************** *************************************************************************************** ***************************** SERIAL SOLVER starts ******************************** Dispalying the complete intial solution vector v 0.84018771715471 0.39438292681909 0.78309922375861 0.79844003347607 0.91164735793678 0.19755136929338 0.33522275571489 0.7682295948119 0.27777471080319 0.55396995579543 0.47739705186216 0.62887092476192 0.36478447279184 0.51340091019562 0.95222972517471 0.9161950680037 0.6357117279599 0.71729692943268 0.1416025553558 0.60696887625706 0.01630057162433 0.24288677062974 0.13723157678602 0.80417675422699 0.15667908925408 0.40094439424618 0.12979044678146 0.10880880202577 0.99892451800356 0.21825690531091 0.5129323944044 0.83911223469261 0.61263983259566 Dispalying the complete matrix A 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 64 -32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 1 The initial residual(2-norm) is 130.947 The initial residual(inf-norm) is 53.4651 ****** AMG Criterion *********** max number of levels 10 Corasen Target 3 number of Pre-Smoothing Steps is : 2 number of Post-Smoothing Steps is : 2 Gamma is 1 Additive MG is NOT being used ********************************* Level 0 has 33 unknowns, 33 unknowns per proc (procs=1) aggregating finished. Level 1 has 15 unknowns, 15 unknowns per proc (procs=1) aggregating finished. Level 2 has 7 unknowns, 7 unknowns per proc (procs=1) aggregating finished. Level 3 has 3 unknowns, 3 unknowns per proc (procs=1) operator complexity: 1.71134 Using a direct coarse solver (UMFPack) Building hierarchy of 4 levels (inclusive coarse solver) took 0.000760548 seconds. Building hierarchy took 0.000798708 seconds === CGSolver Iter Defect Rate 0 130.947 1 0.899025 0.00686557 2 0.122682 0.136461 3 0.0106154 0.0865278 4 0.000920604 0.0867235 5 3.03378e-05 0.0329542 6 2.60274e-06 0.0857918 7 3.34048e-07 0.128345 === rate=0.059209, T=0.00301956, TIT=0.000431365, IT=7 AMG solving took 0.00303539 seconds AMG building took 1.85158 iterations AMG building together with slving took 0.0038341 Convergence details for the selected solver and preconditioner combination convergence achieved : 1 iterations taken : 7 reduction achieved : 2.55101972310868e-09 convergence rate : 5.92089947984426e-02 time elapsed : 3.01955500000000e-03 The residual(inf_norm) for the selected solver and preconditioner combination is : 2.30147982449580e-07 The residual(2-norm) for the selected solver and preconditioner combination is : 3.34047915597939e-07 ***************************** SERIAL SOLVER Completed !! ******************************** *************************************************************************************** *********** Now COmparing parallel and serial solutions ********************* Iter-parallel : 7 Iter-serial : 7 difference in inf-norm is sol_s : 1.00000000882311e+00 sol_p : 1.00000000882311e+00 diff : 0.00000000000000e+00 difference in normalized 2-norm is sol_s : 9.99999995427214e-01 sol_p : 9.99999995427214e-01 diff : 0.00000000000000e+00 i : 0 sol_s : 9.99999999825830e-01 sol_p : 9.99999999825830e-01 diff : 0.00000000000000e+00 i : 1 sol_s : 9.99999996982031e-01 sol_p : 9.99999996982031e-01 diff : 0.00000000000000e+00 i : 2 sol_s : 9.99999995047730e-01 sol_p : 9.99999995047730e-01 diff : 0.00000000000000e+00 i : 3 sol_s : 9.99999992945424e-01 sol_p : 9.99999992945424e-01 diff : 0.00000000000000e+00 i : 4 sol_s : 9.99999990421713e-01 sol_p : 9.99999990421713e-01 diff : 0.00000000000000e+00 i : 5 sol_s : 9.99999988552256e-01 sol_p : 9.99999988552256e-01 diff : 0.00000000000000e+00 i : 6 sol_s : 9.99999988228828e-01 sol_p : 9.99999988228828e-01 diff : 0.00000000000000e+00 i : 7 sol_s : 9.99999989821634e-01 sol_p : 9.99999989821634e-01 diff : 0.00000000000000e+00 i : 8 sol_s : 9.99999992495295e-01 sol_p : 9.99999992495295e-01 diff : 0.00000000000000e+00 i : 9 sol_s : 9.99999995639011e-01 sol_p : 9.99999995639011e-01 diff : 0.00000000000000e+00 i : 10 sol_s : 9.99999998920036e-01 sol_p : 9.99999998920036e-01 diff : 0.00000000000000e+00 i : 11 sol_s : 1.00000000035894e+00 sol_p : 1.00000000035894e+00 diff : 0.00000000000000e+00 i : 12 sol_s : 9.99999999642973e-01 sol_p : 9.99999999642973e-01 diff : 0.00000000000000e+00 i : 13 sol_s : 9.99999998138831e-01 sol_p : 9.99999998138831e-01 diff : 0.00000000000000e+00 i : 14 sol_s : 9.99999994951328e-01 sol_p : 9.99999994951328e-01 diff : 0.00000000000000e+00 i : 15 sol_s : 9.99999992933107e-01 sol_p : 9.99999992933107e-01 diff : 0.00000000000000e+00 i : 16 sol_s : 9.99999991414586e-01 sol_p : 9.99999991414586e-01 diff : 0.00000000000000e+00 i : 17 sol_s : 9.99999991165139e-01 sol_p : 9.99999991165139e-01 diff : 0.00000000000000e+00 i : 18 sol_s : 9.99999991324249e-01 sol_p : 9.99999991324249e-01 diff : 0.00000000000000e+00 i : 19 sol_s : 9.99999991369508e-01 sol_p : 9.99999991369508e-01 diff : 0.00000000000000e+00 i : 20 sol_s : 9.99999989209590e-01 sol_p : 9.99999989209590e-01 diff : 0.00000000000000e+00 i : 21 sol_s : 9.99999988405431e-01 sol_p : 9.99999988405431e-01 diff : 0.00000000000000e+00 i : 22 sol_s : 9.99999986495662e-01 sol_p : 9.99999986495662e-01 diff : 0.00000000000000e+00 i : 23 sol_s : 9.99999988141376e-01 sol_p : 9.99999988141376e-01 diff : 0.00000000000000e+00 i : 24 sol_s : 9.99999990813392e-01 sol_p : 9.99999990813392e-01 diff : 0.00000000000000e+00 i : 25 sol_s : 9.99999994798401e-01 sol_p : 9.99999994798401e-01 diff : 0.00000000000000e+00 i : 26 sol_s : 9.99999999434896e-01 sol_p : 9.99999999434896e-01 diff : 0.00000000000000e+00 i : 27 sol_s : 1.00000000283078e+00 sol_p : 1.00000000283078e+00 diff : 0.00000000000000e+00 i : 28 sol_s : 1.00000000535979e+00 sol_p : 1.00000000535979e+00 diff : 0.00000000000000e+00 i : 29 sol_s : 1.00000000723279e+00 sol_p : 1.00000000723279e+00 diff : 0.00000000000000e+00 i : 30 sol_s : 1.00000000882311e+00 sol_p : 1.00000000882311e+00 diff : 0.00000000000000e+00 i : 31 sol_s : 1.00000000779654e+00 sol_p : 1.00000000779654e+00 diff : 0.00000000000000e+00 i : 32 sol_s : 9.99999999577838e-01 sol_p : 9.99999999577838e-01 diff : 0.00000000000000e+00 *********************** Comparison Complete ************************** ***************************************************************************************