petsc4foam & foam2csr - Issue with AmgXCSRMatrix::setValuesLDU
Hi!
I am trying to install petsc4Foam using the amgxwrapper branch [git clone --branch amgxwrapper https://develop.openfoam.com/modules/external-solver.git petsc4foam]. I have installed AMGX-2.2.0, OpenFOAM v2112, PETSC-v3.15.5 and foam2csr. (I tried with PETSc-v3.16.6 and v3.16.2)
I changed the solvers/petscSolver.C and solvers/petscSolver.H (downloaded from here) after facing the initialization error for List& lowNonZero = ctx.lowNonZero;
When I run ./Allmake command in the petsc4Foam folder, I encounter the following error.
I could not find any changes made to the amgxSolver.C file post commit #29 (closed) to the petsc4foam main branch. I've tried changing the variable types in the solvers/amgxSolver.C [lines 269-404] but I am not sure if that's the right approach for this.
Would really appreciate some guidance from the developers. @sbna @szampini @mmartineau
solvers/amgxSolver.C:404:5: error: no matching function for call to ‘AmgXCSRMatrix::setValuesLDU(const label&, const label&, Foam::label&, Foam::label&, Foam::label&, const long int*, const long int*, Foam::label&, long int*, long int*, const double*, const double*, const double*, double*)’
);
^
In file included from solvers/amgxSolver.H:46:0,
from solvers/amgxSolver.C:38:
foam2csr/src/AmgXCSRMatrix.H:54:14: note: candidate: void AmgXCSRMatrix::setValuesLDU(int, int, int, int, int, const int*, const int*, int, const int*, const int*, const float*, const float*, const float*, const float*)
void setValuesLDU
^~~~~~~~~~~~
foam2csr/src/AmgXCSRMatrix.H:54:14: note: no known conversion for argument 6 from ‘const long int*’ to ‘const int*’
foam2csr/src/AmgXCSRMatrix.H:74:14: note: candidate: void AmgXCSRMatrix::setValuesLDU(int, int, int, int, int, const int*, const int*, int, const int*, const int*, const double*, const double*, const double*, const double*)
void setValuesLDU
^~~~~~~~~~~~
foam2csr/src/AmgXCSRMatrix.H:74:14: note: no known conversion for argument 6 from ‘const long int*’ to ‘const int*’