Home · Articles · Downloads · Hobby Wear · Forums · Web Links · News CategoriesFriday, January 28, 2022
Navigation
Home
Articles
Downloads
Hobby Wear
FAQ
Forums
Web Links
News Categories
Contact Us
Photo Gallery
OpenVMS Bigot
Search
Users Online
Guests Online: 5
No Members Online

Registered Members: 7,623
Newest Member: alleahmarcina30
Sponsors
Island Computer
View Thread
OpenVMS Hobbyist Program | Alpha Systems Forums | FreeAXP
Author SQRT instruction hangs freeAXP
rspalding
Member

Posts: 7
Location: Southern NJ
Joined: 19.08.08
Posted on September 01 2020 11:47
I happened to run an ancient FORTRAN program (a brute-force prime number generator written long ago, by Eric Postpischl - whose name appears in the VMS source listings).

On an real DS10 it runs correctly when compiled with /ARCH=HOST.
The same code causes freeAXP to hang.

This on v3.x as well as the current v4.0.0.649

If I omit the /ARCH=HOST option from the compile, the resulting code calls MATH$SQRT_F and the program runs to normal completion.

I repeated the test on both v3 and v4 freeAXP, running both HP v8.4 as well as VSI V8.4-2L1 and V8.4-2L2. All fail, apparently identically.
The freeAXP crash dump shows the SQRTF instruction as the last instruction executed.

Methinks there's a bug involving FSQRT. Of course, the problem might also be in the compiler's handling of /ARCH=HOST, where it is led erroneously to assume that FSQRT is supported by the freeAXP 'hardware'.
Author RE: SQRT instruction hangs freeAXP
Bruce Claremont
Moderator

Posts: 606
Joined: 07.01.10
Posted on September 02 2020 02:27
We'll have a look. Can you provide the program source code?
Author RE: SQRT instruction hangs freeAXP
rspalding
Member

Posts: 7
Location: Southern NJ
Joined: 19.08.08
Posted on September 02 2020 05:28
Apologies to Mr. Postpischl, for my edits.
Code:

INTEGER PRIME
READ (5,*) N
C3 FORMAT (I10)
PRIME=1
DO 1 I=1, N
7 IF (PRIME .GE. 2 147 483 647) GO TO 999
PRIME= PRIME+ 1
J = IFIX( SQRT( FLOAT (PRIME))+ 0.999 )
J = MIN( J, PRIME-1)
IF (J .LT. 2) GOTO 7
DO 6 K= 2, J
IF ((PRIME - (( PRIME/ K )* K)) .EQ. 0) GO TO 7
6 CONTINUE
WRITE (6, *) PRIME
1 CONTINUE
C14 FORMAT (1X, I10)
999 STOP
END
Author RE: SQRT instruction hangs freeAXP
rspalding
Member

Posts: 7
Location: Southern NJ
Joined: 19.08.08
Posted on September 02 2020 05:40
Sadly, somehow all the leading whitespace was deleted during posting.
Please apply the usual card-oriented rules for FORTRAN-66:
1-5 line number, 6 continuation flag, 7+ code, IIRC.
Perhaps the current compilers no longer care.
Author RE: SQRT instruction hangs freeAXP
rspalding
Member

Posts: 7
Location: Southern NJ
Joined: 19.08.08
Posted on September 02 2020 06:21
I just tried to create a simpler reproducer - and thought I had failed.

The following code runs several iterations without a hang - but prints the wrong result (SQRT(2.0) != 2.75)

HOWEVER, on the 4th or 5th repetition of the loop, I do get the freeAXP hang.
This code runs correctly on a real iron (DS10).

1 READ (5,*) X
WRITE (6,*) SQRT(X)
GOTO 1
END
Author RE: SQRT instruction hangs freeAXP
Bruce Claremont
Moderator

Posts: 606
Joined: 07.01.10
Posted on September 03 2020 02:15
Thanks for the source code. We've reproduced all of your results. Head scratched has ensued. I'll keep you posted.
Edited by Bruce Claremont on September 04 2020 02:52
Author RE: SQRT instruction hangs freeAXP
Bruce Claremont
Moderator

Posts: 606
Joined: 07.01.10
Posted on September 06 2020 06:28
A simple test run on a genuine AlphaServer 400 under OpenVMS 7.3-2. FreeAXP emulates an AlphaServer 400. The test demonstrated things are working properly on the real hardware.

Using Digital Fortran 77 V7.1-107-3313

$ ty sqrt.for
WRITE (6,*) 'Enter X:'
READ (5,*) X
1 WRITE (6,*) X,'->',SQRT(X)
C GOTO 1
END
$
$ for sqrt
$ link sqrt
$ r sqrt
Enter X:
2.0
2.000000 -> 1.414214
$
$ for/arch=host sqrt
$ link sqrt
$ r sqrt
Enter X:
2.0
2.000000 -> 1.414214
$
Edited by Bruce Claremont on September 06 2020 06:44
Author RE: SQRT instruction hangs freeAXP
Bruce Claremont
Moderator

Posts: 606
Joined: 07.01.10
Posted on September 06 2020 06:32
Prime program tested on genuine AlphaServer 400. Everything works as expected.
Using Digital Fortran 77 V7.1-107-3313.

$ ty prime.for
INTEGER PRIME
READ (5,*) N
C3 FORMAT (I10)
PRIME=1
DO 1 I=1, N
7 IF (PRIME .GE. 2 147 483 647) GO TO 999
PRIME= PRIME+ 1
J = IFIX( SQRT( FLOAT (PRIME))+ 0.999 )
J = MIN( J, PRIME-1)
IF (J .LT. 2) GOTO 7
DO 6 K= 2, J
IF ((PRIME - (( PRIME/ K )* K)) .EQ. 0) GO TO 7
6 CONTINUE
WRITE (6, *) PRIME
1 CONTINUE
C14 FORMAT (1X, I10)
999 STOP
END
$
$ for prime
$ link prime
$ r prime
10
3
5
7
11
13
17
19
23
29
31
$
$ for/arch=host prime
$ link prime
$ r prime
10
3
5
7
11
13
17
19
23
29
31
$
Edited by Bruce Claremont on September 06 2020 06:43
Author RE: SQRT instruction hangs freeAXP
Bruce Claremont
Moderator

Posts: 606
Joined: 07.01.10
Posted on September 06 2020 06:49
Which FORTRAN compiler are you using? Under Digital Fortran 77 V7.1-107-3313, everything works as it should under FreeAXP. Under HP Fortran V8.0-104655-48F7C and HP Fortran V8.0-1-104669, we reproduce the reported problems.
Edited by Bruce Claremont on September 06 2020 07:38
Author RE: SQRT instruction hangs freeAXP
Bruce Claremont
Moderator

Posts: 606
Joined: 07.01.10
Posted on September 06 2020 08:18
The problem occurs when EV6 elements are included in the /ARCH compiler qualifier. I'm guessing the inclusion of EV5 and EV6 instructions in Avanti are leading /ARCH=HOST to default to EV67. This is causing a problem when using the HP V8.n compilers.

The work-around is to avoid using /ARCH=HOST, EV6, or EV67 with the HP V8.n compilers. The compile and run samples below demonstrate the issue. All compiles were run under VMS 7.3-2 and HP Fortran V8.2-104679.

BURN34> for sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 1.414214
BURN34>
BURN34> for/arch=host sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 2.750000
BURN34>
BURN34> for/arch=ev4 sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 1.414214
BURN34>
BURN34> for/arch=ev5 sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 1.414214
BURN34>
BURN34> for/arch=ev56 sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 1.414214
BURN34>
BURN34> for/arch=ev6 sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 2.750000
BURN34>
BURN34> for/arch=ev67 sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 2.750000
BURN34>
BURN34> for/arch=pca56 sqrt
BURN34> link sqrt
BURN34> r sqrt
Enter X:
2.0
2.000000 -> 1.414214
BURN34>
Jump to Forum:
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Are you going to OpenVMS Boot Camp 2016?

Yes

No

You must login to vote.
Shoutbox
You must login to post a message.

parwezw
January 03 2022
Anyone know what happened to FAFNER.DYNDS.ORG? I had a hobbyist account here but can longer access the site.

gtackett
October 27 2021
Make that DECdfs _2.1A_ for Vax

gtackett
October 27 2021
I'm looking for DECdfs V2.4A kit for VAX. Asking here just in case anyone is still listening.

MarkRLV
September 17 2021
At one time, didn't this web site have a job board? I would love to use my legacy skills one last time in my career.

malmberg
January 18 2021
New Hobbyist PAKs for VAX/VMS are no longer available according to reports. Only commercial licenses are reported to be for sale from HPE

dfilip
January 16 2021
Can someone please point me to hobbyist license pak? I'm looking for VAX/VMS 7.1, DECnet Phase IV, and UCX/TCPIP ... have the 7.1 media, need the license paks ... thanks!

Bart
October 16 2020
OpenVMS, and this website!

malmberg
September 05 2020
VSI community non-commercial licenses for AXP/IA64 are available now.

malmberg
September 05 2020
See the forum about licensing. Don't know if HPE hobby licenses still being issued. Commercial licenses still being sold.

silfox70
September 01 2020
I need the license for OpenVMS7.3. Where can I find them?

malmberg
August 29 2020
Eisner, which is currently being moved, got an SSH update and the keys were updated to more modern encryption standards.

jiml
July 11 2020
ssh to eisner is now giving (on linux) "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" , Has the server key in fact changed ? Of WHO can we ask that somewhere on the eisner webpage they

wyan
May 06 2020
Turns out I had an account here, it still was set to my location a decade ago, so hey, I'm back after over a decade!

Hein
April 21 2020
Hi all, haven't been here in years. Good to see it is all there still. I'm looking around at the forum to stop/start msipcap - 'could not be stopped' - for now. I'll shutdown FreeA

EstesDave
January 09 2020
does anyone have or know of DRB32 manuals

Shoutbox Archive