Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RGG

117 views
Skip to first unread message

db

unread,
Apr 18, 2023, 3:47:50 AM4/18/23
to
Is there a newer f90 version of the subroutine RGG, for
eigenvalues/vectors? I have an old one, but gfortran
doesn't like the do loops using labels any longer.
Or is there something better now?
--
Dieter Britz

Arjen Markus

unread,
Apr 18, 2023, 4:00:59 AM4/18/23
to
I just tried compiling the RGG version on Netlib, gfortran complains (warns) about a deprecated feature, that is: statements with labels and executable codes. If there is no newer version avaialbe, then I would simply edit the source code.

Regards,

Arjen

Edmondo Giovannozzi

unread,
Apr 18, 2023, 5:17:42 AM4/18/23
to
Is it really different from the "dggev" lapack routine?
It seems to me that they are doing the same thing.

Daniel Feenberg

unread,
Apr 18, 2023, 8:08:02 AM4/18/23
to
This was a warning only, the last time I encountered it. I would move the label to a continue statement to avoid the clutter of unnecessary warnings.

Steven G. Kargl

unread,
Apr 18, 2023, 10:11:29 AM4/18/23
to
On Tue, 18 Apr 2023 01:00:56 -0700, Arjen Markus wrote:

> On Tuesday, April 18, 2023 at 9:47:50 AM UTC+2, db wrote:
>> Is there a newer f90 version of the subroutine RGG, for
>> eigenvalues/vectors? I have an old one, but gfortran
>> doesn't like the do loops using labels any longer.
>> Or is there something better now?
>

The Fortran 2018 standard requires that warning.
It does not affect whether the code compiles to
something that works. If the warning bother someone,
then fix the code or use the -std=legacy option.

--
steve

db

unread,
Apr 18, 2023, 11:18:27 AM4/18/23
to
I do get some warnings, but no object file. I had edited the code a bit
and renamed it rgg.f90, and typing in
gfortran -o rgg.o <...> rgg.f90
only gives me the warnings, nothing else.
(The <...> is module I start all my programs with and RGG includes).
--
Dieter Britz

db

unread,
Apr 18, 2023, 11:31:39 AM4/18/23
to
Sorry, it's a different problem. I fixed the warnings with end do's,
but the actual problem is this:

~/ownlib90> gfortran -o rgg.o stuff.f90 rgg.f90
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in
function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status

How come? It's a subroutine, and I'm only asking for an object file.
--
Dieter Britz

Thomas Koenig

unread,
Apr 18, 2023, 11:55:51 AM4/18/23
to
db <dieterh...@gmail.com> schrieb:

> ~/ownlib90> gfortran -o rgg.o stuff.f90 rgg.f90
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in
> function `_start':
> (.text+0x1b): undefined reference to `main'
> collect2: error: ld returned 1 exit status
>
> How come? It's a subroutine, and I'm only asking for an object file.

You're missing the "-c" option, which tells the compiler to generate
an object file, so the compiler assumes you want to compile an
executable.

This is standard UNIX convention, and also documented
in "gfortran --help" or, (if you scroll down a bit) in
https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html

db

unread,
Apr 19, 2023, 9:39:37 AM4/19/23
to
On 18.04.2023 17.55, Thomas Koenig wrote:
> db <dieterh...@gmail.com> schrieb:
>
>> ~/ownlib90> gfortran -o rgg.o stuff.f90 rgg.f90
>> /usr/bin/ld:
>> /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o: in
>> function `_start':
>> (.text+0x1b): undefined reference to `main'
>> collect2: error: ld returned 1 exit status
>>
>> How come? It's a subroutine, and I'm only asking for an object file.
>
> You're missing the "-c" option, which tells the compiler to generte
> an object file, so the compiler assumes you want to compile an
> executable.
>
> This is standard UNIX convention, and also documented
> in "gfortran --help" or, (if you scroll down a bit) in
> https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html
Thank you. I have this in a script but forgot to type it in.
--
Dieter Britz

db

unread,
Apr 24, 2023, 7:36:54 AM4/24/23
to
I may have buggered RGG in my efforts to adapt it to f90
and fixing the warnings problem. Where can I get the original
version please?
--
Dieter Britz

CyrMag

unread,
Apr 24, 2023, 11:33:18 AM4/24/23
to
The Eispack sources are available at https://netlib.org/eispack/ . However, the source file rgg.f does not have any DO loops in it, so you may been using some adaptation/combination of the Netlib sources. If so, you may be better off restoring the files that you damaged in the attempt to "fix". If you have to go back to the Netlib sources, note that some of the CALL statements in the test problem driver files, such as rggtest.f, call Eispack routines with aliased arguments, and take appropriate steps to manage those.

On the other hand, as others have noted, you do not have to "fix the warnings problem" unless you choose to.
0 new messages