Is there any way to wrap amgX library into CUDA Fortran??

Hi, I’m a student studying computational physics. I’m now solving very large sparse linear system on GPU, and those problmes have very weak diagonal dominance, so old solvers for double precision arithmetics, such as BiCGSTAB do not work for it; solution diverges. So I’ve tried to find more attractive solvers and I found Algebraic Multigrid method (AMG) and the amgX library CUDA supports. But I cannot find how to bind the library into the Fortran language. Can anybody help me wrap the library?

Thank you.

I am not familiar with amgX. I assume you already searched the internet for any Fortran bindings that may exist and came up empty-handed.

If amgX uses a standard C interface, you should be able to supply your own ISO C bindings without too much trouble. I only know that this has been a standard mechanism since Fortran 2003, but SO has what looks like a useful overview: [url]https://stackoverflow.com/tags/fortran-iso-c-binding/info[/url]

Keep in mind that anything that can be used in C, can also be used by Fortran via

iso_c_binding

intrinsic module in Fortran 2003, 2008, and 2018. For more information, see the recent book by Metcalf et al “Modern Fortran Explained”, Chapter 19: Interoperability with C. Google Books