public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
@ 2004-11-29 10:57 paul dot richard dot thomas at cea dot fr
  2004-11-30 12:47 ` [Bug fortran/18714] " paul dot richard dot thomas at cea dot fr
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2004-11-29 10:57 UTC (permalink / raw)
  To: gcc-bugs

The full source is available by anonymous ftp from: 
ftp://ftp.cs.unm.edu/pub/smith-quetzal/codes.tar.Z
Directory lu (or I can provide directory lu, with gfc makefile)

The programme hangs in this routine, unless the print * , "" indicated below is 
included.

      SUBROUTINE SLAMC1( BETA, T, RND, IEEE1 )
*
*  -- LAPACK auxiliary routine (version 1.0) --
*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
*     Courant Institute, Argonne National Lab, and Rice University
*     February 29, 1992

      etc., etc. until

*
*+       WHILE( C.EQ.ONE )LOOP
   10    CONTINUE
         IF( C.EQ.ONE ) THEN
            A = 2*A
            C = SLAMC3( A, ONE )
            C = SLAMC3( C, -A )
            GO TO 10
         END IF
*+       END WHILE
*
*        Now compute  b = 2.0**m  with the smallest positive integer m
*        such that
*
*           fl( a + b ) .gt. a.
*
         B = 1
         C = SLAMC3( A, B )
         print *,""               !!!!!The code hangs without this line
                                  !!!!!Putting C = C does not cure the problem 
*
*+       WHILE( C.EQ.A )LOOP
   20    CONTINUE
         IF( C.EQ.A ) THEN
            B = 2*B
            C = SLAMC3( A, B )
            print *, C , C.EQ.A
            GO TO 20
         END IF
*+       END WHILE
*

and so on......

-- 
           Summary: Runtime hang in LAPACK routine SLAMC1 - in Quetzal
                    benchmark suite
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paul dot richard dot thomas at cea dot fr
                CC: gcc-bugs at gcc dot gnu dot org,paulthomas2 at wanadoo
                    dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
@ 2004-11-30 12:47 ` paul dot richard dot thomas at cea dot fr
  2005-01-06 14:43 ` tobi at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2004-11-30 12:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paul dot richard dot thomas at cea dot fr  2004-11-30 12:46 -------
(In reply to comment #0)

I should have said somewhere that I have been quite unable to isolate this 
problem with a short example.  Retaining the structure of the subprogramme 
results in code that compiles and runs properly.  (BTW g95 does the same...)

Paul Thomas



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
  2004-11-30 12:47 ` [Bug fortran/18714] " paul dot richard dot thomas at cea dot fr
@ 2005-01-06 14:43 ` tobi at gcc dot gnu dot org
  2005-01-09  4:50 ` giovannibajo at libero dot it
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
  2004-11-30 12:47 ` [Bug fortran/18714] " paul dot richard dot thomas at cea dot fr
  2005-01-06 14:43 ` tobi at gcc dot gnu dot org
@ 2005-01-09  4:50 ` giovannibajo at libero dot it
  2005-01-28 12:19 ` coudert at clipper dot ens dot fr
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2005-01-09  4:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (2 preceding siblings ...)
  2005-01-09  4:50 ` giovannibajo at libero dot it
@ 2005-01-28 12:19 ` coudert at clipper dot ens dot fr
  2005-01-28 17:02 ` prthomas at drfccad dot cea dot fr
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-01-28 12:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From coudert at clipper dot ens dot fr  2005-01-28 12:19 -------
Did you try to compile this file without optimization (as is indicated in:
http://www.netlib.org/lapack/faq.html#1.26)? The code in the ?lam*.f files is
used to determine the machine precision (which could be done easily in Fortran >
77), and any level of optimization other than -O0 usually causes infinite loops.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |coudert at clipper dot ens
                   |                            |dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (3 preceding siblings ...)
  2005-01-28 12:19 ` coudert at clipper dot ens dot fr
@ 2005-01-28 17:02 ` prthomas at drfccad dot cea dot fr
  2005-01-28 17:08 ` paulthomas2 at wanadoo dot fr
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: prthomas at drfccad dot cea dot fr @ 2005-01-28 17:02 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]


------- Additional Comments From prthomas at drfccad dot cea dot fr  2005-01-28 17:02 -------
Subject: RE:  Runtime hang in LAPACK routine SLAMC1 - i
	n Quetzal benchmark suite

Bon soir François-Xavier,

Tu as raison!  Même -O1 fait coincer le programme.

Je suis étonné quand-même que le "fix" est d'injecter d'un PRINT *,
"n'importe quoi" et, aussi, qu'il est légèrement impossible isoler le bogue.
Tu as des explications là-dessous?

Je vais afficher une réponse sur Bugzilla, avant de sortir.

Paul  

-----Message d'origine-----
De : coudert at clipper dot ens dot fr [mailto:gcc-bugzilla@gcc.gnu.org]
Envoyé : vendredi 28 janvier 2005 13:20
À : paul.richard.thomas@cea.fr
Objet : [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in
Quetzal benchmark suite



------- Additional Comments From coudert at clipper dot ens dot fr
2005-01-28 12:19 -------
Did you try to compile this file without optimization (as is indicated in:
http://www.netlib.org/lapack/faq.html#1.26)? The code in the ?lam*.f files
is
used to determine the machine precision (which could be done easily in
Fortran >
77), and any level of optimization other than -O0 usually causes infinite
loops.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |coudert at clipper dot ens
                   |                            |dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (4 preceding siblings ...)
  2005-01-28 17:02 ` prthomas at drfccad dot cea dot fr
@ 2005-01-28 17:08 ` paulthomas2 at wanadoo dot fr
  2005-01-28 17:20 ` coudert at clipper dot ens dot fr
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-01-28 17:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-01-28 17:08 -------
Francois-Xavier Coudert's comment is spot on.  Reducing the optimisation to -O0 
removes the need for this peculiar fix.

We could do with a repository for funnies that are not quite bugs.  I SAY 
REMOVE THIS ONE.

I am still left bemused, as I accidently posted in french, by the fact that a 
print statement releases the programme for any optimisation level and that when 
the section of code is isolated it runs perfectly.  Does anybody have an 
explanation?  

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (5 preceding siblings ...)
  2005-01-28 17:08 ` paulthomas2 at wanadoo dot fr
@ 2005-01-28 17:20 ` coudert at clipper dot ens dot fr
  2005-02-11  2:04 ` coudert at clipper dot ens dot fr
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-01-28 17:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From coudert at clipper dot ens dot fr  2005-01-28 17:20 -------
(reply to comments #3 and #4)

The print statement in the code induces I/O, which in some sense "disrupt the
flow of code" and has the effect of making unaware of possible optimizations. I
can't offer a deeper explanation than this statement, only dictated by
experience and not actual knowledge of the in-depths of compilers.

Removed the "wrong-code" keyword and the blocking of PR18714, since this is
actually not a bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|19292                       |
              nThis|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (6 preceding siblings ...)
  2005-01-28 17:20 ` coudert at clipper dot ens dot fr
@ 2005-02-11  2:04 ` coudert at clipper dot ens dot fr
  2005-02-11  9:56 ` paulthomas2 at wanadoo dot fr
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-02-11  2:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From coudert at clipper dot ens dot fr  2005-02-10 22:28 -------
Could this one be closed?

slmac1.f from the LAPACK library is designed to be compiled without any
optimization (it's stated in the FAQ and everywhere). Infinite loop is what is
expected to happen when optimization is turned on.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (7 preceding siblings ...)
  2005-02-11  2:04 ` coudert at clipper dot ens dot fr
@ 2005-02-11  9:56 ` paulthomas2 at wanadoo dot fr
  2005-02-11 10:00 ` paulthomas2 at wanadoo dot fr
  2005-02-11 17:10 ` giovannibajo at libero dot it
  10 siblings, 0 replies; 12+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-02-11  9:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-02-10 23:53 -------
Subject: Re:  Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite

Yep, I am convinced.  I'm afraid that I missed the "everywhere"...

----- Original Message ----- 
From: "coudert at clipper dot ens dot fr" <gcc-bugzilla@gcc.gnu.org>
To: <paulthomas2@wanadoo.fr>
Sent: Thursday, February 10, 2005 11:28 PM
Subject: [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in 
Quetzal benchmark suite


>
> ------- Additional Comments From coudert at clipper dot ens dot fr 
> 2005-02-10 22:28 -------
> Could this one be closed?
>
> slmac1.f from the LAPACK library is designed to be compiled without any
> optimization (it's stated in the FAQ and everywhere). Infinite loop is 
> what is
> expected to happen when optimization is turned on.
>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714
>
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
> 




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (8 preceding siblings ...)
  2005-02-11  9:56 ` paulthomas2 at wanadoo dot fr
@ 2005-02-11 10:00 ` paulthomas2 at wanadoo dot fr
  2005-02-11 17:10 ` giovannibajo at libero dot it
  10 siblings, 0 replies; 12+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-02-11 10:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-02-10 23:56 -------
Subject: Re:  Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite

PS It seems to me that it is odd that any level of optimisation sends the 
programme into an infinite loop.  Both ifc and DF6 run find with the maximum 
level.  I have to agree, though, with the empirical result that this is so 
for gfortran! 




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/18714] Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite
  2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
                   ` (9 preceding siblings ...)
  2005-02-11 10:00 ` paulthomas2 at wanadoo dot fr
@ 2005-02-11 17:10 ` giovannibajo at libero dot it
  10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2005-02-11 17:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-02-11 11:47 -------
Not a GCC bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18714


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-02-11 11:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 10:57 [Bug fortran/18714] New: Runtime hang in LAPACK routine SLAMC1 - in Quetzal benchmark suite paul dot richard dot thomas at cea dot fr
2004-11-30 12:47 ` [Bug fortran/18714] " paul dot richard dot thomas at cea dot fr
2005-01-06 14:43 ` tobi at gcc dot gnu dot org
2005-01-09  4:50 ` giovannibajo at libero dot it
2005-01-28 12:19 ` coudert at clipper dot ens dot fr
2005-01-28 17:02 ` prthomas at drfccad dot cea dot fr
2005-01-28 17:08 ` paulthomas2 at wanadoo dot fr
2005-01-28 17:20 ` coudert at clipper dot ens dot fr
2005-02-11  2:04 ` coudert at clipper dot ens dot fr
2005-02-11  9:56 ` paulthomas2 at wanadoo dot fr
2005-02-11 10:00 ` paulthomas2 at wanadoo dot fr
2005-02-11 17:10 ` giovannibajo at libero dot it

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).