On 10/26/2022 11:38 AM, Jeff Ryman wrote:
> I'm not trying to be a smart ass or a troll and I'm not trying to change your mind.
> I'm wondering why you want to convert all of the F77 to C++ rather than to
> modern Fortran that can call or be called from the existing C++ routines.
>
> As a side note, I used to work for a group at Oak Ridge National Laboratory
> (ORNL) that developed the SCALE code system that is used for nuclear analysis.
> A lot of effort was spent many years ago converting it from F77 to Fortran 9x.
> Now, after addition of a number of computer science trained staff to that group
> over the years from the late 1990s to the present, everything is slowly being
> converted to C++. A number of the SCALE codes are being changed to run on
> massively parallel machines, but there are libraries for both Fortran and C++
> available for such machines. I have my suspicions why they are converting but
> that is irrelevant here.
>
> Is there a reason such as availability of certain libraries or code efficiency that
> you want to convert all your F77 code to C++?
>
> The reason I am interested is that I have some old F77 code that ran on IBM
> mainframes, Unix workstations, and DOS PCs which I want to document and
> revive to run on Windows and Linux now that I am retired and have the time.
>
> I had a C/C++ class in the late 1990s but never used any of it at work. I am
> taking some online self study classes in C/C++ so that I can at least read a
> little of existing codes and use it in my project if I find it useful.
>
> Thanks for your consideration.
>
> Jeff
We are having trouble maintaining a mixed Fortran and C++ software
product so I have decided to jump all the way to C++. I like using an
IDE (I first used Turbo Pascal in 1983) and feel that they are
incredibly productive for larger software products. The premier IDE on
Windows is Visual Studio which has some support for Intel Fortran but it
is poor at best when mixed with C++.
We used three features in our F66 / F77 code which are turning out to be
problematic in porting to a new Fortran compiler that supports 64 bit
software. The first is the carriage control option in printing to
stdout or a file. This was never a Fortran standard feature but
everyone used it back in the 1960s, 1970s, and 1980s. This killed our
port to gfortran several years ago but it is now supported there
reputedly. We are ripping it out of our formats as a part of our
conversion to C++.
We use zero initialization of all global and local variables. This
killed our first port to Intel Fortran in 2005 ??? when it uncovered a
linker bug / crash. We have removed the need for this from a portion of
our Fortran code but will be a problem in the C++ conversion.
We use Fortran structures, popularized by DEC back in the 1970s and
1980s, but they never became part of the Fortran standard. We are
converting our structure code to integer*8 and logical*8 as a part of
the C++ port.
Almost all of the Fortran compilers are now free. This is a bad sign,
especially since Intel Fortran, the premier Fortran compiler, just
jumped to free. To me, this says that future of Fortran is cloudy at best.
Nothing in this world is perfect but moving to a single programming
language should help us in the long run. Our software is embeddable in
Excel or can embed Excel in itself, all my glue code is in C++ which
really points the direction to me.
Thanks,
Lynn