Operating System - OpenVMS
1827807 Members
2643 Online
109969 Solutions
New Discussion

Re: F90 on Itanium vs F77 on AX

 
Jimbo Mueller
New Member

F90 on Itanium vs F77 on AX

Currently, we have 5 VAXs running in one area and passing packets of information between them. One of the most valuable tools we have in maintaining addressing continuity within the packets (and in our golbal commons) is the /CROSS function in F77. We are beginning to look at individual computer migrations to Itaniums and using natural alignment of variables. With what little I've been able to read, the /CROSS function does not seem exist in the new world. Tell me this isn't so - or tell me what I can do to duplicate it. This seems to be the most accurate way of making sure that the packet layouts in the Itanium can be duplicatd, address-wide in the existing VAX world.
13 REPLIES 13
Joseph Huber_1
Honored Contributor

Re: F90 on Itanium vs F77 on AX

Maybe I don't remember such old (VAX-Fortran-)compilers, but isn't /CROSS fully written /CROSS_REFERENCE ? If so, what does it have to do with common or record alignement ?

All types of alignements are still available, although on Itanium natural alignement is highly recommendet !
http://www.mpp.mpg.de/~huber
Robert Gezelter
Honored Contributor

Re: F90 on Itanium vs F77 on AX

Jimbo,

I agree with Joseph. A quick check of my FORTRAN on Alpha seems to indicate that /CROSS is indeed /CROSS_REFERENCE.

What other qualifiers are on the command? Perhaps, there is also an /ALIGN?

There are several solutions. One solution is to use selective compilation, it is possible to gateway the packed structures to/from the unpacked structures for processing.

One must remember that the BIG performance penalty is for falsely aligned data, not mis-aligned data that the compiler is aware of.

By falsely aligned data, I mean a four-byte field beginning at the second byte of the record. Passing a pointer to this four byte area as an integer WILL cause a big performance hit.

However, if the record is passed around as a whole, the situation may be far better. If the compiler knows about the questionable alignment, then it should (JR, can you confirm) do the extra loads and stores to extract.

It might be wise to do a code review as part of the porting effort.

- Bob Gezelter, http://www.rlgsc.com
Jimbo Mueller
New Member

Re: F90 on Itanium vs F77 on AX

Yes - /CROSS is /CROSS_REFERENCE but it does not appear in F90 documentation. When you use /CROSS with /LIST, the printout provides offsets for each scalar and array into its appropriate section. Thus, if I've specified a record and added filler and I later add a variable in the filler area, I can compile with /LIST and /CROSS and make sure that I've not "moved" variables to different address offsets. I have no desire to re-build all programs to be able to ignore offset changes. In going to an Itanium environment, I want to convert our heavily packed (BYTES and INTEGERS scattered thoughout) packets into I*4 packets aligned to suit the Itanium world. If I could get a cross reference of the position of the scalars and arrays within the new records, I can force the same mapping in F77.
Joseph Huber_1
Honored Contributor

Re: F90 on Itanium vs F77 on AX

The (relative) address of variables is still in the listing with e.g. /LIST/SHOW=ALL .
Only the cross-reference, i.e. listing the lines where a variable is used, is no longer available in newer compilers.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: F90 on Itanium vs F77 on AX

ah no, even the old crossref is available:

Fortran /OLD/LIST/CROSS
http://www.mpp.mpg.de/~huber
Robert Gezelter
Honored Contributor

Re: F90 on Itanium vs F77 on AX

Jimbo,

Have you checked the /SHOW and /LIST qualifiers in detail? The full list of qualifiers can be found on the OpenVMS www site at:

http://h71000.www7.hp.com/doc/82final/6443/6443pro_003.html#index_x_201

I would check it out, but I cannot get to my Itanium at this instant.

- Bob Gezelter, http://www.rlgsc.com
Joseph Huber_1
Honored Contributor

Re: F90 on Itanium vs F77 on AX

On Itanium (depending on compiler installation options ?), the qualifier is /F77 only instead of /OLD_F77.

So either
fortran /list/show=all
or
fortran/f77/list/cross,

but /cross is not available on the itanium I have access to, on alpha it works.
http://www.mpp.mpg.de/~huber
Jimbo Mueller
New Member

Re: F90 on Itanium vs F77 on AX

/SHOW = ALL in the compile that I'm testing only shows the record names - not the variables internal to the records.

/OLD does not seem to be supported on the Itanium version.

See the attachment as to what I need.
Joseph Huber_1
Honored Contributor

Re: F90 on Itanium vs F77 on AX

To be precise:
/F77 means "compile with F77 behaviour"
/OLD_F77 "invoke F77 compiler instead F90"
/OLD_f77 is no longer available on itanium, therefore no /CROSS_REFERENCE.

Additional note for fortran migration vax->Itanium:
Not only alignment options must be choosen correctly, also defaults in /INTEGER_size,/REAL_size,/DOUBLE_size,/FLOAT are different (or may be different in future).
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: F90 on Itanium vs F77 on AX

Yes I see, for records/structures no individual member offsets seen, only the length.
So the structure length is the only (weak) indication of correct alignment.

For commons, all individual variable offsets are listed though.
http://www.mpp.mpg.de/~huber
Jimbo Mueller
New Member

Re: F90 on Itanium vs F77 on AX

It would seem that the work-around for this loss of flexibility is to build a progeam in debug and then list all the addresses of the variables in the appropriate record using the EVALUATE/ADDRESS function in DEBUG. What a waste.

Thanks for all of your help, though!
Jimbo Mueller
New Member

Re: F90 on Itanium vs F77 on AX

Do you think the HP engineers would consider putting /CROSS_REFERENCE back into F90???
Hoff
Honored Contributor

Re: F90 on Itanium vs F77 on AX

I'd look to use SDL data structure definitions if staying with OpenVMS, and toward using integrated data-based checksums here. Correctly done, a checksum can spot all manner of error. And it's verification at run-time, not compile time.

For a few projects, I've used SDL post-processing to determine that the offsets are maintained correctly across versions and updates. But the checksum and basic version checks at run-time catches cases where skews happen "live"...

I'd also tend to investigate RMS files with global buffers here, rather than continuing to use commons. Commons can and do work, but RMS works better in my experience; it deals with all the edge cases and cache management for you. (By the time you get done dealing with these cases, you end up re-implementing tracts of RMS.)

If you're currently running on VAX uniprocessors, then the addition of SMP has the potential here to expose all sorts of latent bugs, too. (Which is another reason to go to RMS...)

(Itanium boxes are massively faster than VAX boxes, so do try to avoid letting any of the older and classic design and performance assumptions of VAX creep in here. Not without specific verification.)