DEC runtime library for Fortran in Visual studio 2022

  • #1
BvU
Science Advisor
Homework Helper
16,014
4,820
trying to revive some stuff from 40 years ago.
Found I could download and install Intel Fortran which seems to be a descendant from an old DEC VMS friend. Even managed to get it 'integrated' into Visual Studio 2022 (somewhat; haven't got a decent help or debug facility running yet... and no idea how to hook up runtime libraries).

Overwhelming experience; and a far cry from DCL
$ For aap | $ Link aap | $ Run aap

But I'm sure there are good reasons for all this progress :smile:

My current issue:

Need help to resolve symbols like STR$... and LIB$... that were in the runtime library

(e.g. :
Severity Code Description File
error LNK2019: unresolved external symbol STR$UPCASE referenced in function STR$UPCASE.void CMR$DEFAULT.obj


For the debugging and help there are some clues, but I quickly find myself drowning in side issues in a world that seems to abhor the word fortran :rolleyes:

##\ ##
 
Last edited:
Computer science news on Phys.org
  • #2
BvU said:
... I quickly find myself drowning in side issues in a world that seems to abhor the word fortran
The name was FORTRAN, not fortran, because only upper case letters were used, up to and including F77.

You needed to know how many 6 bit characters you could pack into a double precision floating point variable on your machine. That will now cause side issues.
 
  • #3
Great, thanks.
Now: what do I have to do to resolve these LNK2019 errors ?

I added /f77rtl in Project | Properties | Fortran as additional options - makes no difference

Adding /f77rtl to the linker command line gives
warning LNK4044: unrecognized option '/f77rtl'; ignored LINK
Makes sense, but I'm still stuck with unresolved externals


I installed w_ifort_runtime_p_2024.1.0.968.exe but can't find where it puts the stuff.

(anyone ?)

Had good fun and success with this setup in another thread (with no LIB$... etc) so the whole machinery seems to work OK....

Frustrating
 
  • #4
BvU said:
I quickly find myself drowning in side issues in a world that seems to abhor the word fortran :rolleyes:
The world does not abhor Fortran, but the language has changed in the last 40 years (although not much in the last 35 years).

If you want to use strings see https://fortran-lang.org/en/learn/quickstart/arrays_strings/#character-strings

You also (I note from some of your other posts) need to understand IEEE 754 and its near universal implementation in everything from supercomputers to microcontrollers. Many of the things you used to have to worry about on DEC hardware are no longer relevant.
 
  • #5
Thanks, and I know that underneath a whole lot of newfangled stuff some sturdy fortran is actually doing the work.

I also have done quite a lot of character stuff in fortran on VAX and Alpha. And their architecture handbooks (close enough to IEEE 754) are within reach right where I am sitting.

But at the moment I am interested in dealing with these:

1715344784228.png


Can't suppress the feeling there is a simple solution. If I get frustrated just a little more I will embark on simply writing them from scratch :doh:

:smile:
 
  • #6
Let's describe the problem in more accurate terms.

You have Fortran code from 40 years ago that used non-portable extensions (the "blue pages"). Now you have discovered this code is, exactly as promised, non-portable.

I understand why you don't like this situation, but it shouldn't be a surprise.

I see three options:
  1. Keep trying other compilers, hoping they have implemented these functions. Your best bet will be with commercial compilers, like PGI or IBM.
  2. Figure out what these functions do, and write code that does the same thing with the same name and link it in.
  3. Figure out what these functions do and re-write the application code to do this some other way so as to use only portable code.
I know none of these are appealing, but unfortunately, it is unlikely to find a switch "--compile-old-incompatible-code-correctly".
 
  • Like
Likes Klystron, FactChecker, BvU and 1 other person
  • #7
Of course, once I wrote down the three solutions, I cam up with a fourth: use SIMH to emulate a 40 year old VAX amd run your code on that.
 
  • Haha
Likes BvU and pbuk
  • #8
Vanadium 50 said:
Of course, once I wrote down the three solutions, I cam up with a fourth: use SIMH to emulate a 40 year old VAX amd run your code on that.
https://www.openvmshobby.com/

Probably 10x the performance of the prototype.
 
  • Like
Likes BvU
  • #10
By the way, I don't want to sound unsympathetic. I have found myself in exactly the same situation. But the outcome was not unexpected and the options are rather limited.
 
  • Like
Likes FactChecker
  • #11
one could consider porting it to a more modern language like Julia, Java, Python or Go.
 
  • #12
Or a more modern language like BASIC or Pascal. :smile:
 
  • Haha
Likes Mark44 and pbuk

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
Back
Top