SMS Support of Fortran
SMS supports all of the Fortran 77 language and we are working on providing support for all of Fortran 90. There are two aspects to providing SMS support for Fortran 90: parsing the language, and translation the serial code where appropriate.
Parsing describes the translators ability to read the input text using the Fortran 90 grammar defined by the standard. In August 2001, SMS was upgraded to be able to parse all of the Fortran 90 language. Since many language constructs require no translation, the ability to parse any Fortran code was an important first step in providing support for all of Fortran 90.
- fixed and free format Fortran 90 are supported
- if free format is used, SMS directives must begin in column 1.
A bigger step is in providing the necessary analysis and translation capabilities for those language constructs that require it. Since Fortran 90 is such a big language, work is progressing in building translation capabilities on an as-needed basis. When a user reports a bug, or we encounter a construct in their code that requires translation, we try to resolve it quickly. A status of our current capabilities is provided below. This list identifies commonly used constructs; other constructs have also been implemented that are not mentioned here.
I. Current Capabilities
We provide full support from Fortran 77 plus the following Fortran 90 construct:
- do/end do, named do statement
- whole array assignments
Examples (assume A, B are arrays of rank 2):
A = B
A(:,:) = B(:,:)
- allocatable arrays
- automatic arrays
- parameter + kind statement
r = 0.0_r8
- derived types
- cannot be specified in SMS directives at this time
- modules with the following exception:
- only clause not permitted in the use <module> statement
- f90 syntax for variable declarations including derived types, kind, etc.
integer, parameter :: i1
integer, intent(inout), dimension(:,:) :: i2
II. In Progress
- support only clause
- array assignments
Examples (assume A,B are of rank 2):
A(1:5,2:2) = B(2:6,3:3)
A(:,1:) = B(:,1:)
A(:,:ny-1) = B(:,ny-1)
- derived types
- allow them to be specified and translated in SMS directives
Examples (assume A is an array of derived type with two fields U(:) and V(:) )
III. Future Work
- user defined operators