Home > Archive > Fortran > March 2007 > alpha stage OpenMP compilers for Fortran 95 and C
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
alpha stage OpenMP compilers for Fortran 95 and C
|
|
|
|
|
| > I came across a project "NANOS Mercurium" that is developing source to
> source OpenMP translators for Fortran 95 and C.
It's hard to call it a compiler when it's source-to-source, isn't it?
Anyway, I couldn't get it to compile on my i686-linux; I'll try harder
later. But as I also found no documentation about running it (only about
installation), I don't have a clear idea of what it actually does. If
anyone manages to understand more before I get back to it, I'd appreciate
a short summary :)
--
FX
| |
| glen herrmannsfeldt 2007-03-22, 7:04 pm |
| FX wrote:
[color=darkred]
> It's hard to call it a compiler when it's source-to-source, isn't it?
I think it is fine.
Note that gcc compiles to readable assembly source, and then
assembles that.
The difference might be that a translator doesn't have to
fully parse the input.
For example, the fixed to free format Fortran translators most
likely take any input with continuation characters in column 6
and convert it, independent of the actual Fortran statement
it contains.
-- glen
| |
| Michael Metcalf 2007-03-22, 7:04 pm |
|
"glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:-d-dndvh-MMWWZ_bnZ2dnUVZ_rOqnZ2d@comcast.com...
>
> For example, the fixed to free format Fortran translators most
> likely take any input with continuation characters in column 6
> and convert it, independent of the actual Fortran statement
> it contains.
You must be joking!
With respect,
Mike Metcalf
| |
| glen herrmannsfeldt 2007-03-22, 10:03 pm |
| Michael Metcalf wrote:
(I wrote)
[color=darkred]
> You must be joking!
! *
! A program to convert FORTRAN 77 source form to Fortran 90 source *
! form. It also formats the code by indenting the bodies of DO-loops *
! and IF-blocks by ISHIFT columns. Statement keywords are *
! followed if necessary by a blank, and blanks within tokens are *
! are suppressed; this handling of blanks is optional. *
! If a CONTINUE statement terminates a single DO loop, it is *
! replaced by END DO. *
! Procedure END statements have the procedure name added, if *
! blanks are handled. *
! Statements like INTEGER*2 are converted to INTEGER(2), if blanks *
! are handled. Depending on the target processor, a further global *
! edit might be required (e.g. where 2 bytes correspond to KIND=1). *
! Typed functions and assumed-length character specifications are *
! treated similarly. The length specification *4 is removed for all *
! data types except CHARACTER, as is *8 for COMPLEX. This *
! treatment of non-standard type declarations includes any *
! non-standard IMPLICIT statements. *
! Optionally, interface blocks only may be produced; this requires *
! blanks processing to be requested. The interface blocks are *
! compatible with both the old and new source forms. *
It seems to do a lot more than just fixed to free conversion.
Also, properly recognizing fixed format Fortran without blanks
between keywords requires some parsing, but I don't believe
that it has the full Fortran parser that a compiler would require.
-- glen
| |
| Michael Metcalf 2007-03-22, 10:03 pm |
|
"glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:GLmdnaeQ6pmBuZ7bnZ2dnUVZ_qmpnZ2d@co
mcast.com...
>
> Also, properly recognizing fixed format Fortran without blanks
> between keywords requires some parsing, but I don't believe
> that it has the full Fortran parser that a compiler would require.
>
It doesn't, but it does have a dictionary of all leading F77 keywords for
just this purpose. In fact, if significant blank treament is requested
(recommended), then the first thing the program does with a statement is to
remove all blanks, later to reinsert them in a consistent fashion. I sweated
hours over this. In s/r special you'll find, for instance:
! Deal with labelled DO WHILE
! Deal with IMPLICIT with non-standard length specifiers
! An ASSIGN label must be followed by a blank and a * specifier
! converted to (...)
! IF statement may be followed by a keyword
! Typed function
! ASSIGN may follow IF
Oh, boy.
Regards,
Mike Metcalf
|
|
|
|
|