Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fast connection between fortran 77 and 90

  1. Jun 25, 2009 #1
    Hi!

    I'm having kind of a "little" problem. I got an old program written in Fortran77 and I want to implement some functionality from Fortran90 routines. The routines are quite long, so I'm not able to rewrite them in F77...

    Is there a possibility to connect the routines so that they can communicate (exchange variable values) in a fast way.

    I have though about the COMMON Blocks of F77 and the MODULE Statements in F90. Is there a way of connecting these data structures in a way, that a F90 program can read a F77 COMMON Block. (I though about a I/O-interface but I think this is too slow)

    Thanks for your help!
     
    Last edited: Jun 25, 2009
  2. jcsd
  3. Jun 28, 2009 #2
    Hey

    The connection between Fortran 77 and Fortran 90 is in my opinion a bit tricky. I have myself succeeded to call Fortran 77 subroutines from Fortran 95 (I assume it works in Fortran 90 also) by using the 'call' statement. I have not succeed to call the Fortran 77 functions but I had to rewrite them as subroutines instead. I don't think it is possible to call Fortran 90 code from Fortran 77. To compile the code I think you need a compiler which is able to compile both Fortran 77 and Fortran 90 code, e.g. gfortran
    I hope this helps
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fast connection between fortran 77 and 90
  1. Fortran 77 (Replies: 1)

  2. Fortran 90 (Replies: 1)

  3. Fortran 90 (Replies: 1)

Loading...