AMGX
AMGX copied to clipboard
very slow at "Parsing configuration string: selector=AGGRESSIVE_PMIS " stage
The AMGX becomes very slow at the stage "Parsing configuration string: selector=AGGRESSIVE_PMIS " after I increased the matrix size (matrix B). The dimension of matrix are as follows: A: NumGlobalRows 7921 NumGlobalNonzeros 745121 B: NumGlobalRows 12321 NumGlobalNonzeros 1687841 For A, it is fast. but for B it is very slow . Do I have some method to increase this setup process. I have tried to change the selector to "SIZE_2" , but the systems feedback the infors " the selector is not well for this matrix" Regards
What is the full configuration of the solver you use?
What version of code do you use? Have you tried latest revision for main
branch?
SIZE_2
selector is used for aggregation multigrid, AGGRESSIVE_PMIS
is used for classical multigrid - you can see them both as a parameters of respective solvers with the same name, but the subset of acceptable values are exclusive.
How slow are we talking? Can you measure setup speed for the matrix (or maybe even setup for single multigrid level) ?
The following is my json file. My AMGX version is "2.3".
matrix A level 10: need time 0.0164s to setup. matrix B level 10: need time 295.678s level 1: need 0.00533819s level 2 : need 36.3348s.
"config_version": 2, "solver": { "preconditioner": { "interpolator": "D2", "solver": "AMG", "print_grid_stats": 1, "aggressive_levels": 1, "interp_max_elements": 4, "smoother": { "relaxation_factor": 1.2, "scope": "jacobi", "solver": "JACOBI_L1" }, "presweeps": 2, "selector": "PMIS", "coarsest_sweeps": 2, "coarse_solver": "NOSOLVER", "max_iters": 1, "max_row_sum": 0.9, "strength_threshold": 0.15, "min_coarse_rows": 2, "scope": "amg_solver", "max_levels": 10, "cycle": "V", "postsweeps": 2 }, "print_grid_stats": 1, "store_res_history": 1, "solver": "GMRES", "print_solve_stats": 0, "obtain_timings": 0, "max_iters": 500, "monitor_residual": 1, "gmres_n_restart": 40, "convergence": "RELATIVE_INI_CORE", "tolerance": 1e-13, "norm": "L2"
Attachemnt is the matrix B , it is generated from my spectral method for the solution of heat diffusion problem in a general domain. Adiffusion.zip
Hmm, setup for your matrix with your config is quite fast for me, but for some reason solve returns immediately. What do you use for right hand side?
Also, it seems your matrix contains a lot of zeros:
# grep "0.0000000000000000e+00" Adiffusion.txt | wc -l
688702
AMGX should still work with such matrix, but it wouldn't be most efficient.