Hello,
I'm a big fan of the MuMPS linear solver. I've used the
dpo/MUMPS.jl and juliaSparse/MUMPS.jl packages to call MuMPS from julia.
Those packages call glue routines (written in C and Fortran respectively)
to call the actual MuMPS library functions. I've been considering writing a
boilerplate free interface that calls the MuMPS libraries directly from
julia but my preliminary investigation indicates that this would be at best
extremely tedious and easy to get wrong and at worst not possible with my
current version of julia (0.4.0-dev+6142). The MuMPS routines that one
would call from fortran code are subroutines that take a single input
argument. The input argument is a derived type with over 100 fields. Some
of those fields are arrays of fixed size. If I understand the doc page on
calling C and Fortran code, these arrays would have to be expanded
manually. I've posted a minimal example of this on github:
https://github.com/focus-shift/fortran-derived-types-from-julia
Is it likely that julia will make it possible in the near future to pass
composite types with array fields to C or Fortran without manually writing
out each entry? Secondly, Some elements of the MuMPS derived type are
pointers to arrays, e.g.
DOUBLE PRECISION, DIMENSION(:), POINTER :: RHS_SPARSE.
I don't really understand how Fortran stores pointers to arrays internally
so I'm not sure how one might go about passing a pointer to a Julia array
properly into Fortran, when Fortran is expecting a pointer. Is this
possible?
Thanks, Patrick