Help with porting from VAX to ALPHA

Help with porting from VAX to ALPHA

Hi, I am porting code from VAX to ALPHA, I am frequently getting these two messages one is fatal error, other is information, can anyone tell what this means, and how to correct it.

DATA RR1(2) /6RVARPR /
.........................^
%FORT-F-UNSUPFEAT, This language feature is not supported on this system
at line number 484 in module MT553B.

RR1 is defined as Real RR1(3).

DATA escfun /'P Q S R 25C 6~263~1~D 17314~183419282123A 3332202~2429
...............................................................................^
%FORT-I-CHACONCONTD, Character or Hollerith constant continued across lines; may
be non-portable.

Also when Linking few programs, I am receiving error messages for three undefined symbols.
Assign
Close
ErrSet

By replacing Close with Close statement, Close problem is solved. What should I use to replace Assign and ErrSet, And where can I find the documentation of Assign and ErrSet.

Please help me with these problems.

Thanks

Naveed

18 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

See Migrating VAX Applications to Alpha.

CALL ASSIGN can be replaced with OPEN. There is no replacement for ERRSET. You'll also have to recode the use of RAD50 strings. This program apparently originated on the PDP-11.

Steve

Retired 12/31/2016

Thanks for reply. I've read the article, and I really ashamed that I am
still lost. May be because I don't understand FORTRAN properly. Does replacing
Assign with Open works, or there should be some change? What does ERRSET
actually do, and how the coding can be done. I know nothing about what are
RAD50 strings. Article says "In most cases, use of Radix-50 can be replaced
with CHARACTER data." So if statement is like this in original program
REAL RR1(3)
DATA RR1(2) /6RVARPR/
can it be replaced with this work
CHARACTER RR1(3)
DATA RR1(2) /'6RVARPR'/

Please help me, with this.

Thanks

Naveed

You're going to need more help than I can offer here, but perhaps I can get you going in the right direction. Since I don't know what your code actually looks like (other than the RAD50 stuff), I'll have to make some vague guesses.

ASSIGN - the syntax for that is:

CALL ASSIGN ( n, name, icnt)

where n is the unit number, name is a variable, array, array element or character constant containing a filename, and icnt is the number of characters in name (if omitted, the name is read up to the first NUL character. ) Typically this would be used with a character string inside an integer variable or array. You could typically replace this with:

OPEN (UNIT=n,FILE=name)

ERRSET is used to change the default error behavior of the program - for example, to continue when floating overflows occur. There is no direct equivalent in CVF.

RAD50 is a technique of packing three alphanumeric characters in a 16-bit value. It was popular on the PDP-11. You would have to rewrite code that uses RAD50 characters, stored in REALs, to use CHARACTER variables of the proper length instead. This is usually straightforward, but means that you have to understand what the code is doing.

Steve

Retired 12/31/2016

There are few calls of ErrSet like

CALL ERRSET(29,1,0,1,0,)
CALL ERRSET(64,1,0,0,0,)
CALL ERRSET(24,1,0,1,0,)

Is there some documentation, which shows what these calls do, like 29, 64 and 24 are Error codes, where can I find the listing of these error codes, and what is the reason behind rest of the parameters of ERRSET.

I have access to both VAXstation and ALPHASERVER DS10.

Thanks

Naveed

One source of documentation for ERRSET is the _DEC Fortran User Manual for OpenVMS VAX Systems_, part no. AA-PUYPA-TE, pages 5-6, F-8, and F-9. You'll find a description of the arguments in the call to ERRSET.

Mike

The VAX documentation isn't online, so here's an overview of ERRSET from the printed manual:

CALL ERRSET (number, contin, count, type, log, maxlim)

numberInteger specifying error number
continlogical - continue after error is detected
countlogical - count against maximum error limit
typelogical - if .true., pass control to ERR= if specified, if .false., return to routine that detected the error for default recovery
logLogical - produce an error message for the error
maxliminteger*2 value for maximum error limit

The error numbers are the same as the IOSTAT numbers: 24 is End of file, 29 is File not found, 64 is input conversion error. If these are the only codes used, then you should be able to use ERR= and IOSTAT= handling as appropriate.

Steve

Retired 12/31/2016

Following are the Error Codes that are present in code, I am also writing what I can understand, about them, and how to solve them, please help me with as many of them as possible, and correct me if I am wrong.

24 End of File During Read (Can be handled by using ERR = in Read Statement)
29 File Not Found (Can be handled by using ERR = in Open Statement)
30 ???
31 ???
39 Error during Read (Can be handled by using ERR = in Read Statement)
63 ???
64 Conversion Error ( Where to use ERR= ?? )
68 ???
82 0 ** 0 error (Can be handled by condition handling code before performing power operation)

Thanks

Naveed

30 is Open Failure - that is, the file system returned some error other than the ones for which there are specific codes - use ERR= on OIPEN. 31 is Mixed File Access Modes - I don't think you can see this in CVF, but it would also be ERR= on OPEN. For 64, you'd use ERR= on a READ - ditto 68, which is VFE Value Error.

Steve

Retired 12/31/2016

Please define Code 63 and how to handle it. Also I am receiving these warnings

REAL YOPR(10)
................^
%FORT-W-MISALIGN, Alignment of variable or array is inconsistent with its data t
ype [YOPR]

attr = 0
................^
%FORT-W-DAUNDEFEP, Dummy argument ATTR is undefined at entry point GETTGT
at line number 298 in file DKA0:[NAVEED.TEST]AGETT.FOR;5

How these can be removed.

Thanks

Naveed

63 is Output Conversion Error - it doesn't need to be handled - you'll get asterisks in the output field. In current versions, this is no longer an error, as the Fortran standard says it shouldn't be.

The MISALIGN warning can be disabled with /WARN=NOALIGN. The DAUNDEFEP error indicates a bug in your code which you need to fix - it is saying that a routine tried to read from a dummy argument, but the caller didn't define its value first.

Steve

Retired 12/31/2016

I have few more questions :
Regarding Common Areas
Does global common areas files should be compiled and linked with /share option. Should they be loaded before running programs, into memory, and how to load them in memory?

Also does Real, Real *2 and Real *4 uses H_Float specification on ALPHA or G_Float, does the handling of reals should be considered when porting ?

Thanks

Naveed

The Compaq Fortran User Manual for OpenVMS Alpha gives detailed instructions on how to use shared data in COMMON on OpenVMS Alpha. It's in the chapter on interprocess communication.

There is no such thing as REAL*2. By default, REAL (REAL*4) is F_Float, REAL*8 is G_float and REAL*16 is IEEE X_float on Alpha. This is addressed in the article I referenced in my first reply. You can compile with /FLOAT=VAXD to make REAL*8 D_float (sort of), but REAL*16 is always IEEE X_float.

Steve

Retired 12/31/2016

The code I am porting from VAX only contains Real or Real * 4 type datat not Real * 8 or greater, does it require any change ?

Also I don't have access to Fortran User Manual to OpenVMS Alpha, in printed or any other form, is it available online, or on any CD?

Thanks

Naveed

No change.

The user manual is available in HTML form on our web site under Online Documentation.

Steve

Retired 12/31/2016

I am getting output and input conversion errors, for the programs I have ported, how to correct them
%FOR-F-INPCONERR, input conversion error
unit -5 file Internal Formatted Read
user PC 00000000

also I am getting following message when running program, why this error occurs

%IMGACT-F-BAD_LINK, image, linked /NATIVE_ONLY, cannot call a translated routine
-IMGACT-F-FIXUPERR, error when CRTCONX2 referenced FORRTL_D56_TV

Thanks

Naveed

Naveed,

One would have to look at your program and its data to understand why the input conversion errors occur. You should be able to examine the string being read from and compare it to the format to see what is wrong.

The IMGACT error means that you have a call to a VAX run-time library routine that isn't provided on Alpha - perhaps a routine starting with FOR$. When you link on Alpha, you pull in this routine from the translated VAX RTL, but this requires that you compile with the /TIE switch and link with /NONATIVE_ONLY. I suggest you examine your program to find where it is calling these routines and replace them as appropriate.

Steve

Retired 12/31/2016

I am receiving these errors, when running a program

FOR-E-OUTCONERR, output conversion error
unit -5 file ENCODE

%FOR-F-VFEVALERR, variable format expression value error
unit -5 file ENCODE

Why they are occuring, please help me. There are 5 Encode statements in the program, is it because of these statements.

Also Installing global common area requires creating option file, I have read all the documentations of linkers, and I still could'nt understand it. Is it a separate file in which
SYMBOL_VECTOR=(=PSECT)
should be written, if that so, what should be the syntax for linker to link, like if I have X.For and I want to link it as sharable common, how should I link it.

Thanks

Naveed

Leave a Comment

Please sign in to add a comment. Not a member? Join today