- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Architecture specific code in Fortran
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2011 05:50 AM
10-03-2011 05:50 AM
Hello,
I've been experimenting with Fortran code that needs to run slightly differently on Alpha, VAX and IA64. I've looked at compiler directives such as IF DEFINED. The following works on Alpha (thanks for responses on comp.os.vms):
CDEC$ If Defined (Alpha)
code compiled only on Alpha
CDEC$EndIf
The manual shows how to define and test variables like Alpha above, but curiously doesn't list the variables that are predefined (such as Alpha). On a VAX and IA64 the above code segment is not compiled. I am told (VAX) should also work (if the compiler is recent enough) for that machine but I can't test it as my VAX has decided not to boot any more. :-(
My real question is what variable should I use for the Itanium. I've tried IA64, I64, IA_64, ITANIUM & INTEGRITY but they are ignored. Anyone know what the correct compiler variable is for that architecture ?
Many thanks
Tom Wade
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2011 04:57 PM
10-03-2011 04:57 PM
Re: Architecture specific code in Fortran
Tom,
The Fortran documentation available on the web seems to be WAY out of date. There's nothing in the "HP Fortran for OpenVMS User Manual" about the /DEFINEcompiler qualifier (where I'd expect the defaults to be documented), or about the CDEC$ IF directives.
The release notes for HP Fortran Version 8.2 have this hint:
3 New and Changed Features in Previous Releases 3.1 New and Changed Features in V8.1 ECO 01....... 31 3.2 New and Changed Features in V8.1.............. 33 3.2.1 IA64 and _IA64_ Predefines Implemented...... 33
which might mean the strings you seek are "IA64" or "_IA64_" - there's no extra information in the body of the document. As far as I can tell this is the only use of the term "Predefines" anywhere, so I'm just guessing that it refers to predefined compiler symbols.
Please lob a few cases at Customer Support, requesting they pull their fingers out and update the documentation (for that matter ALL OpenVMS documentation!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2011 08:26 AM
10-04-2011 08:26 AM
Re: Architecture specific code in Fortran
John's inference seems to be right based on the experiment I posted in c.o.v in response to the same question there:
https://groups.google.com/forum/#!topic/comp.os.vms/b31qB6Mvrcs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2011 06:09 AM
10-06-2011 06:09 AM
SolutionThe tag is IA64. Below is a program that demonstrates this. Be aware that on VAX you only have the F77 compiler, so the CDEC$ DEFINED does not work there. I have done a lot of work on a "make" tool that is architecture aware (for example to create the freeware tool DIX).
program t
cdec$ if defined (ALPHA)
write(*,*) "on alpha'
cdec$ endif
cdec$ if define (IA64)
write(*,*) 'On IA64'
cdec$ end
On alpha (version f95 8.2) this results in 'On alpha' , on integrity (version 8.2), this prints 'on ia64'
Fekko