05-08-2012 05:07 AM
I'm trying to port some very old stuff from VAX to I64.
The software is written in VAX Fortran and uses DECnet IV nontransparent task-to-task communiation.
The software compiles fine on I64 using HP Fortran V8.2 but during runtime I get
%SYSTEM-F-BADPARAM, bad parameter value
This comes from a call to $QIO where the program tries to register itself as a DECnet object
(function code IO$_ACPCONTROL)
Attached you may find a reproducer.
Any help would be greatly appreciated.
Solved! Go to Solution.
05-08-2012 06:29 AM
My very first thought would be alignment when switching architectures. Since you can't use a supplied library module (I don't know why that is omitted from FORSYSDEF - maybe there is an SDL equivalent that you could use the freeware SDL package to generate an include file for it), you should probably wrap your structure definitions with
!DEC$ END OPTIONS
like the library modules do.
Since you are using your own PARAMETER definitions, I'd also verify them against the values on your target system, but I'd be very surprised if they have changed - but, trust AND verify :-).
If that fails to resolve it, I'd start with a /NOOPT/DEBUG version and examine everything, including addresses, just before and after the call.
I'd also look at promoting any of the non-record I*2 values just from a performance perspective and change the event flag to the ENF value - it doesn't look like you use it for anything.
05-08-2012 10:00 AM - edited 05-08-2012 10:01 AM
Mike is absolutely right: you need to enclose the DECLNAME Structure definition like this:
INTEGER*4 FILLER ! "name" case
INTEGER*4 OBJ_NUM ! "name" case
!DEC$ END OPTIONS
Otherwise the NFB is not filled correctly, because the INTEGER*4 longword is put at the next LONGWORD boundary after the BYTE. This has nothing to do with Itanium, it also fails on Alpha.