Help - FAQ

What features must a Fortran compiler support to successfully compile ForTrilinos?

The C interoperability features defined in the Fortran 2003 standard. Top

What compilers support these features?

The latest releases of most major compilers support these features. See the December 2007 issue of ACM SIGPLAN Fortran Forum (vol. 26, no. 3) for a survey of the Fortran 2003 features available in the gfortran, g95, Cray, IBM, NAG and Intel compilers, each of which supports the necessary features. Top

My code is written in Fortran 77/90/95. Do I need to learn Fortran 2003 to use ForTrilinos?

No. The only requirement is to pass in compatible argument types. You can either pass the Fortran types you currently use (in which case an implicit conversion to a C type occurs) or you can explicitly convert the arguments you’re passing to C types. Only the latter approach requires you to learn any Fortran 2003. Even then, the new features will feel very natural as Fortran 2003 specifies a set of KIND parameters that provide direct access to standard C types within Fortran code. Top

Is ForTrilinos portable?

Yes, the very reason for using the C interoperability features of Fortran 2003 is to provide standards-conforming, portable mechanisms for calling C procedures from Fortran and vice versa. Top

What about name mangling and trailing underscores and such?

Unlike most previous attempts to interface Fortran and C/C++, you no longer have to learn the naming convention of your compiler. The Fortran 2003 C interoperability constructs allow the programmer to bind a Fortran procedure name to a corresponding C procedure and vice versa. Also, it is possible for callbacks to occur by passing back and forth C function pointers via their corresponding Fortran 2003 derived type. Top

What if I don’t see Fortran interfaces for the Trilinos packages I want to use?

The development of ForTrilinos is user-driven. Let us know what packages you want to use, and we’ll develop the required interfaces. Top