View solution using a binary AMGX installation
I am in a restricted linux environment. I have access to the installed AMGX files where I can successfully run the examples given in the "Running Examples" . Is there any way to extract solution matrices and upload different type of matrices using the executables? Thanks!
I'm not 100% sure I understand, but you can certainly pass your own matrices for testing to the examples. amgx_mpi_capi for instance will accept a matrix market format matrix passed via the -m parameter.
If you want to take a matrix from your own application to pass to AmgX then simply output the matrix as sequential matrix market and then when you pass it to the example it can re-decompose the matrix. If you want to do something more complex please provide some more detail.
My final aim is to integrate AmgX with our in-house CPU-based CFD solver. For this purpose, I am trying to understand how you achieved this with OpenFOAM. I wanted to test one of our matrix and evaluate the AmgX solution. That was the reason I asked about extracting the solution matrices without delving into AMGX structure.
Currently, I can use the petsc4foam library to use petsc solvers in OpenFOAM but I do not have a clear roadmap on how to integrate AmgX using the AmgXwrapper library. Maybe this is not an issue directly related to AmgX but how do you apply AmgX to external applications?
Is there any way to extract solution matrices
Do I understand correctly that you want example that takes your matrix, solves it and dumps solution vector, say, to disk to analyze further (i.e. compare to your in-house solver)? Current examples do exactly this, except for the last part - "extracting solution" - but this partially covered in examples like here: https://github.com/NVIDIA/AMGX/blob/main/examples/amgx_mpi_capi.c#L349-L353 . You can adjust the code to gather solution vector on single rank (i.e. with MPI_Gatherv) and manipulate it further as you need.
Let us know if you have more questions,