I'm skeptical that calling Fortran subroutines inside modules like this is 
portable; the mangling is compiler-dependent, no?

(Even calling Fortran subroutines outside modules is compiler-dependent, 
but thankfully most compilers these days use lowercase+underscore.  Calling 
Fortran functions (not subroutines) and passing strings are also things 
that are hard to do portably, or at least that used to be the case.)

With Fortran 2003, the portable thing to do is to use iso_c_binding to 
declare a C-compatible interface to your Fortran subroutines.

Reply via email to