12 #ifndef MFEM_AMGX_SOLVER
13 #define MFEM_AMGX_SOLVER
15 #include "../config/config.hpp"
112 AmgXSolver(
const MPI_Comm &comm,
const int nDevs,
113 const AMGX_MODE amgx_Mode_,
const bool verbose);
173 std::string amgx_config =
"";
183 const bool update_mat =
false);
190 const bool update_mat =
false);
195 const int mpiTeamSz,
const MPI_Comm &mpiTeam)
const;
198 const int mpiTeamSz,
const MPI_Comm &mpiTeam)
const;
201 const int mpiTeamSz,
const MPI_Comm &mpiTeam)
const;
204 const int mpiTeamSz,
const MPI_Comm &mpiTeam)
const;
209 const int mpiTeamSz,
const MPI_Comm &mpiTeamComm,
213 const int mpiTeamSz,
const MPI_Comm &mpi_comm,
216 void SetMatrix(
const HypreParMatrix &A,
const bool update_mat =
false);
219 void SetMatrix(
const SparseMatrix &A,
const bool update_mat =
false);
224 bool isInitialized =
false;
228 std::string nodeName;
237 int gpuProc = MPI_UNDEFINED;
240 MPI_Comm globalCpuWorld = MPI_COMM_NULL;
243 MPI_Comm localCpuWorld;
276 AMGX_Mode precision_mode = AMGX_mode_dDDI;
279 AMGX_config_handle cfg =
nullptr;
282 AMGX_matrix_handle AmgXA =
nullptr;
285 AMGX_vector_handle AmgXP =
nullptr;
288 AMGX_vector_handle AmgXRHS =
nullptr;
291 AMGX_solver_handle solver =
nullptr;
294 static AMGX_resources_handle rsrc;
297 void SetDeviceIDs(
const int nDevs);
301 void InitMPIcomms(
const MPI_Comm &comm,
const int nDevs);
307 int64_t mat_local_rows;
309 std::string mpi_gpu_mode;
312 #endif // MFEM_USE_AMGX
313 #endif // MFEM_AMGX_SOLVER
void InitMPITeams(const MPI_Comm &comm, const int nDevs)
void ReadParameters(const std::string config, CONFIG_SRC source)
virtual void Mult(const Vector &b, Vector &x) const
Operator application: y=A(x).
void source(const Vector &x, Vector &f)
void UpdateOperator(const Operator &op)
virtual void SetOperator(const Operator &op)
void DefaultParameters(const AMGX_MODE amgxMode_, const bool verbose)
void InitExclusiveGPU(const MPI_Comm &comm)
Wrapper for hypre's ParCSR matrix class.
AMGX_MODE
Flags to configure AmgXSolver as a solver or preconditioner.