Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on getting NNZ of the preconditioner with Euclid ILU #1227

Closed
RickGY opened this issue Feb 5, 2025 · 1 comment
Closed

Question on getting NNZ of the preconditioner with Euclid ILU #1227

RickGY opened this issue Feb 5, 2025 · 1 comment

Comments

@RickGY
Copy link

RickGY commented Feb 5, 2025

Hi,

I'm trying to run some experiments with Euclid's ILU preconditioner. It would be very helpful if there's some way to access and report the nnz of the L and U matrix built as the preconditioner, for profiling purpose. In particular, I'm wondering if it's possible to integrate that into the workflow similar to the one in src/test/ij.c:

if (eu_level > -1) { HYPRE_EuclidSetLevel(pcg_precond, eu_level); }
if (eu_ilut) { HYPRE_EuclidSetILUT(pcg_precond, eu_ilut); }
if (eu_sparse_A) { HYPRE_EuclidSetSparseA(pcg_precond, eu_sparse_A); }
if (eu_row_scale) { HYPRE_EuclidSetRowScale(pcg_precond, eu_row_scale); }
if (eu_bj) { HYPRE_EuclidSetBJ(pcg_precond, eu_bj); }
HYPRE_EuclidSetStats(pcg_precond, eu_stats);
HYPRE_EuclidSetMem(pcg_precond, eu_mem);

/*HYPRE_EuclidSetParams(pcg_precond, argc, argv);*/

HYPRE_PCGSetPrecond(pcg_solver,
                   (HYPRE_PtrToSolverFcn) HYPRE_EuclidSolve,
                   (HYPRE_PtrToSolverFcn) HYPRE_EuclidSetup,
                   pcg_precond);
HYPRE_PCGSetup(pcg_solver, (HYPRE_Matrix) parcsr_M,
                     (HYPRE_Vector) b, (HYPRE_Vector) x);
HYPRE_PCGSolve(pcg_solver, (HYPRE_Matrix)parcsr_A,
                     (HYPRE_Vector)b, (HYPRE_Vector)x);
@victorapm
Copy link
Contributor

Hi @RickGY,

Support for new features in Euclid has been discontinued. However, if you’d like to contribute a patch, we welcome PRs for improvements.

That said, we generally recommend using the ILU preconditioner instead, which is actively maintained and may better suit your needs. You can find more details on ILU here. Particularly, print_level=1 in HYPRE_ILUSetPrintLevel gives you nnz(L) + nnz(U) / nnz(A)

Let us know if you need further guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants