Operating System - HP-UX
1833780 Members
2890 Online
110063 Solutions
New Discussion

Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

 
Roxana_4
Frequent Advisor

Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

Hello,

I have a HP e3000 with MPE /iX 7.0, TurboIMAGE /XL and Fortran 77. Soon I will have HP Integrity rx2600 with HP-UX 11i v.2, Eloquence B.07.00 + TurboImage Compatibility, Fortran 90 / 95 and ansiC++. I want to migrate the TurboImage dabases on Eloquence and I want to migrate the programs Fortran 77 to Fortran 90 / 95.
My question is: When migrating from Fortran 77 to Fortran 90, what possibilities are to keep the 2 (two) - byte alignment in data structures ?

Thank you in advance.

5 REPLIES 5
Zygmunt Krawczyk
Honored Contributor

Re: Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

Hi Roxana,
migrating from HP Fortran77 to HP Fortran (90/95) is described in:

HP Fortran Programmer's Guide
http://www.docs.hp.com/hpux/pdf/B3909-90014.pdf

pages 203-219

Regards,
Zygmunt
Zygmunt Krawczyk
Honored Contributor

Re: Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

Regarding the 2 byte alignment HP Fortran 90/95 supports +A option:

"+A sets the alignment of data items within FORTRAN STRUCTUREs, COMMON
blocks, and EQUIVALENCE classes. Specifying +A without any arguments
aligns data on 2-byte boundaries; therefore, it is slightly different than the
f77 +A"

Regards,
Zygmunt
Zygmunt Krawczyk
Honored Contributor

Re: Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

Can you give me an example(s) of your Fortran 77/iX data structure with 2 byte alignment?
Regards,
Zygmunt
Roxana_4
Frequent Advisor

Re: Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

HI Zygmunt

Regarding the 2 bytes alignment HP Fortran 90/95

HP Fortran Programmer's Guide
http://www.docs.hp.com/hpux/pdf/B3909-90014.pdf
page 205
chap.10 Incompatibilities with HP FORTRAN 77
table 10-1 f77 options NOT supported by f90
+800 +e +N
+A +I[2|4] +R
+A3 +L8 +U
+A8 +LA -w66

This is contradiction with "+A sets the alignment of data items within FORTRAN STRUCTUREs, COMMON
blocks, and EQUIVALENCE classes. Specifying +A without any arguments
aligns data on 2-byte boundaries; therefore, it is slightly different than the
f77 +A"

In HP FORTRAN / 9000 for HP-UX 9.0 (serverHP9000 / S800) the $HP9000_300 directive forces the same alignment in common blocks and equivalence groups at 2 bytes.
$HP9000_300 ALIGNMENT is equivalent to specifying the +A3 compile - line option

Un example of Fortran 77/iX data structure with 2 byte alignment:

DIMENSION BUFFER (7)
INTEGER *2 NRCRT
INTEGER *4 CODF
REAL *8 PRICE
EQUIVALENCE (BUF(1),NRCRT),(BUF(2),CODF),(BUF(4),PRICE)


Regards
Roxana
Roxana_4
Frequent Advisor

Re: Migration from MPE/iX and Fortran 77 to HP-UX and Fortran 90 / 95

This problem is essentially the same at that described on the web-page
http://docs.hp.com/en/5990-6773/ch01s02.html
(search for the section titled "Resolving issues with unaligned data").

Wood, John (REO)