I've been building MTREK, written in fortran, on my community edition
and it compiles fine but complains of no RAN function at link time. It's
hard to believe they left out this intrinsic function, can anyone
clarify this or offer a solution ?
On 6/16/2024 12:22 PM, Michael Brown wrote:
I've been building MTREK, written in fortran, on my community edition
and it compiles fine but complains of no RAN function at link time.
It's hard to believe they left out this intrinsic function, can anyone
clarify this or offer a solution ?
VMS Fortran got both RAN and the standard RANDOM_NUMBER:
     program randemo
     implicit none
     integer*4 seed, i
     real*4 r1,r2
     seed = 1234567
     do 100 i = 1,5
       r1 = ran(seed)
       write(*,*) r1
       call random_number(r2)
       write(*,*) r2
100Â Â continue
     end
seed = pas$clock2() ! hack
On Sun, 16 Jun 2024 14:20:10 -0400, Arne Vajhøj wrote:
seed = pas$clock2() ! hack
Wot, no /dev/random? No EGD?
On 6/16/2024 9:29 PM, Arne Vajhøj wrote:
On 6/16/2024 8:34 PM, Lawrence D'Oliveiro wrote:
On Sun, 16 Jun 2024 14:20:10 -0400, Arne Vajhøj wrote:
      seed = pas$clock2() ! hack
Wot, no /dev/random? No EGD?
To my best knowledge: no.
There are something equivalent in OpenSSL.
And on VMS x86-64 there should be the new
SYS$GET_ENTROPY.
On 6/16/2024 8:34 PM, Lawrence D'Oliveiro wrote:
On Sun, 16 Jun 2024 14:20:10 -0400, Arne Vajhøj wrote:
      seed = pas$clock2() ! hack
Wot, no /dev/random? No EGD?
To my best knowledge: no.
There are something equivalent in OpenSSL.
On 6/16/2024 8:34 PM, Lawrence D'Oliveiro wrote:
On Sun, 16 Jun 2024 14:20:10 -0400, Arne Vajhøj wrote:
      seed = pas$clock2() ! hack
Wot, no /dev/random? No EGD?
To my best knowledge: no.
There are something equivalent in OpenSSL.
On 6/16/2024 12:22 PM, Michael Brown wrote:
I've been building MTREK, written in fortran, on my community edition
and it compiles fine but complains of no RAN function at link time.
VMS Fortran got both RAN and the standard RANDOM_NUMBER:
And on VMS x86-64 there should be the new SYS$GET_ENTROPY.
On 17/6/24 03:54, Arne Vajhøj wrote:
On 6/16/2024 12:22 PM, Michael Brown wrote:
I've been building MTREK, written in fortran, on my community edition
and it compiles fine but complains of no RAN function at link time.
VMS Fortran got both RAN and the standard RANDOM_NUMBER:
That example was very reassuring when it compiled and ran, so I looked
more carefully at my compiler warnings compiling MTREK...
         RNDOM = RAN(I1, I2)
..................^
%F90-W-WARNING, The number of arguments is incompatible with intrinsic procedure, assume 'external'.  [RAN]
at line number 67 in file SYS$SYSDEVICE:[MBROWN.DEVS.MTREK]mtrekini.for;4
and it is telling me the problem, assumed external because of too many parameters, then it tries to link some external name RAN which isn't
there. I can understand this.
But the question now is why RAN(I1, I2) works on the VAX compiler,and
not on the X86_64 compiler. And what is it doing with those 2 parameters
on the VAX so I can simulate it somehow.
On 6/17/2024 12:09 AM, Michael Brown wrote:
But the question now is why RAN(I1, I2) works on the VAX compiler,and
not on the X86_64 compiler. And what is it doing with those 2
parameters on the VAX so I can simulate it somehow.
Are you sure that it is intrinsic and not something picked
up from some library?
What type is RNDOM? Default REAL*4? Or Integer*4?
If INTEGER*4 then my guess would be that:
RAN(I1, I2)
is:
RAN_INT_IN_INTERVAL(LOW_BOUND, HIGH_BOUND)
On 6/17/2024 12:09 AM, Michael Brown wrote:
But the question now is why RAN(I1, I2) works on the VAX compiler,and
not on the X86_64 compiler. And what is it doing with those 2
parameters on the VAX so I can simulate it somehow.
Are you sure that it is intrinsic and not something picked
up from some library?
What type is RNDOM? Default REAL*4? Or Integer*4?
If INTEGER*4 then my guess would be that:
RAN(I1, I2)
is:
RAN_INT_IN_INTERVAL(LOW_BOUND, HIGH_BOUND)
On Sun, 16 Jun 2024 21:42:09 -0400, Arne Vajhøj wrote:I've seen the list. It is very long and, er, random.
And on VMS x86-64 there should be the new SYS$GET_ENTROPY.
That sounds like the right sort of thing.
Just remember to get the randomness from lots of different sources.
I've seen the list. It is very long and, er, random.
On 6/17/2024 12:40 AM, Lawrence D'Oliveiro wrote:
On Sun, 16 Jun 2024 21:42:09 -0400, Arne Vajhøj wrote:
And on VMS x86-64 there should be the new SYS$GET_ENTROPY.
That sounds like the right sort of thing.
Just remember to get the randomness from lots of different sources.
I've seen the list. It is very long and, er, random.
On 2024-06-18, Arne Vajhøj <arne@vajhoej.dk> wrote:
On 6/18/2024 11:49 AM, John Reagan wrote:
On 6/17/2024 12:40 AM, Lawrence D'Oliveiro wrote:
On Sun, 16 Jun 2024 21:42:09 -0400, Arne Vajhøj wrote:
And on VMS x86-64 there should be the new SYS$GET_ENTROPY.
That sounds like the right sort of thing.
Just remember to get the randomness from lots of different sources.
I've seen the list. It is very long and, er, random.
Those that want to know what it uses on their VMS x86-64
system should get some hints from:
$ show entropy
And to think that when I was saying several years ago VMS needed this,
people here were making fun of me and trying to claim somehow that VMS
didn't need this in order to be "the world's most secure operating
system"... :-)
I notice BTW that the VSI website _still_ does not have a security
reporting mechanism on its contact page, even after the recent comments
from VSI about security now being a primary focus.
Simon.
On 19/06/2024 13:15, Simon Clubley wrote:
I notice BTW that the VSI website _still_ does not have a security
reporting mechanism on its contact page, even after the recent comments
from VSI about security now being a primary focus.
https://vmssoftware.com/security/
On 6/18/2024 11:49 AM, John Reagan wrote:
On 6/17/2024 12:40 AM, Lawrence D'Oliveiro wrote:
On Sun, 16 Jun 2024 21:42:09 -0400, Arne Vajhøj wrote:
And on VMS x86-64 there should be the new SYS$GET_ENTROPY.
That sounds like the right sort of thing.
Just remember to get the randomness from lots of different sources.
I've seen the list. It is very long and, er, random.
Those that want to know what it uses on their VMS x86-64
system should get some hints from:
$ show entropy
On 6/17/2024 6:12 PM, Arne Vajhøj wrote:
On 6/17/2024 12:09 AM, Michael Brown wrote:
But the question now is why RAN(I1, I2) works on the VAX compiler,and
not on the X86_64 compiler. And what is it doing with those 2
parameters on the VAX so I can simulate it somehow.
Are you sure that it is intrinsic and not something picked
up from some library?
What type is RNDOM? Default REAL*4? Or Integer*4?
If INTEGER*4 then my guess would be that:
RAN(I1, I2)
is:
RAN_INT_IN_INTERVAL(LOW_BOUND, HIGH_BOUND)
Example:
$ typ ranfun2.for
     end
Arne
Alas as far as porting mtrek is concerned that just led to another
problem. seems the the call ERRSET doesn't seem to work(undefined
symbol at link time) under the X86 fortran.
But I think I am very close.
But if RNDOM is REAL*4 then my guess would be:
RAN_LONGER_CYCLE(SEED1, SEED2)
Example:
     real*4 function ran2arg(seed1, seed2)
     implicit none
     integer*4 seed1, seed2
     integer*4 temp
     real*4 dummy
     temp = xor(seed1, seed2)
     ran2arg = ran(temp)
     seed1 = xor(ishc(seed1, 1), temp)
     seed2 = xor(ishc(seed2, -1), temp)
     end
Disclaimer: I do not know if the cycle from this one is actual longer.
On 6/19/2024 11:05 AM, Michael Brown wrote:
Alas as far as porting mtrek is concerned that just led to another
problem. seems the the call ERRSET doesn't seem to work(undefined
symbol at link time) under the X86 fortran.
But I think I am very close.
ERRSET is not in any recent VMS Fortran manual either.
Google find something for IBM:
https://www.ibm.com/docs/en/essl/6.2?topic=subroutines-errset-essl-errset-subroutine
It should be easy to replace with something just writing out the info.
ERRSET is documented in the DEC FORTRAN User's manual. I have the Jan
1993 version for DEC FORTRAN V6.0.
It looks like this is a subroutine for compatibility with PDP-11 FORTRAN systems:
"The ERRSET subprogram determines the action taken in response to an
error detected by the Run-Time Library. The VMS condition handling
facility provides a more general method of defining actions to be taken
when errors are detected (see Chapter 9). ..."
Under notes:
:an external reference to the ERRSET subprograms causes a special PDP-11 FORTRAN compatibility error handler to be established before the main
program is called. This special error handler transforms the executing environment to approximate that of PDP-11 FORTRAN."
So MTREK compiles without complaint now, there maybe a problem with the shared memory block. Shared memory on openvms is new to me, looks very elegant though. Definitely not working for me yet.
On 6/20/2024 12:29 AM, Michael Brown wrote:
So MTREK compiles without complaint now, there maybe a problem with
the shared memory block. Shared memory on openvms is new to me, looks
very elegant though. Definitely not working for me yet.
That stuff has not really changed.
The only thing that I can imagine causing problems is that
the memory needed to be 512 bytes aligned on VAX but 8192 bytes
aligned on newer platforms.
Linking with option:
PSECT_ATTRIBUTE=name_of_your_sect,13
should handle that.
ERRSET is documented in the DEC FORTRAN User's manual. I have the Jan
1993 version for DEC FORTRAN V6.0.
It looks like this is a subroutine for compatibility with PDP-11 FORTRAN systems:
Under notes:
:an external reference to the ERRSET subprograms causes a special PDP-11 FORTRAN compatibility error handler to be established before the main
program is called. This special error handler transforms the executing environment to approximate that of PDP-11 FORTRAN."
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 422 |
Nodes: | 16 (2 / 14) |
Uptime: | 195:45:02 |
Calls: | 8,950 |
Calls today: | 1 |
Files: | 13,352 |
Messages: | 5,992,422 |