Re: DECnet Phase IV porting issue (663 Views)
Reply
Frequent Advisor
dschwarz
Posts: 53
Registered: ‎09-06-2007
Message 1 of 6 (679 Views)
Accepted Solution

DECnet Phase IV porting issue

Hi,

 

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.

 

 

Valued Contributor
Mike Kier
Posts: 102
Registered: ‎05-18-2003
Message 2 of 6 (663 Views)

Re: DECnet Phase IV porting issue

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$ OPTIONS/NOWARN/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)

!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.

 

Practice Random Acts of VMS Marketing
Honored Contributor
Volker Halle
Posts: 5,205
Registered: ‎04-26-2004
Message 3 of 6 (642 Views)

Re: DECnet Phase IV porting issue

[ Edited ]

Mike is absolutely right: you need to enclose the DECLNAME Structure definition like this:

 

!DEC$ OPTIONS/NOWARN/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)
        STRUCTURE /DECLNAME/
            BYTE                FUNCTION
            UNION
                MAP
                    INTEGER*4   FILLER                  ! "name" case
                END MAP

                MAP
                    INTEGER*4   OBJ_NUM                 ! "name" case
                END MAP
            END UNION
        END STRUCTURE
!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.

 

Volker.

Frequent Advisor
dschwarz
Posts: 53
Registered: ‎09-06-2007
Message 4 of 6 (618 Views)

Re: DECnet Phase IV porting issue

Thank you very much.

 

 

Frequent Advisor
dschwarz
Posts: 53
Registered: ‎09-06-2007
Message 5 of 6 (614 Views)

Re: DECnet Phase IV porting issue

Mike, Volker,

 

I tried to give you 10 points, but I'm still fighting with this user interface.

 

Sorry

Acclaimed Contributor
Dennis Handly
Posts: 25,210
Registered: ‎03-06-2006
Message 6 of 6 (573 Views)

Re: DECnet Phase IV porting issue

>I tried to give you 10 points,

 

One Kudos ~= a bunny.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.