public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37848]  New: internal compiler error: Segmentation fault. gfortran openmp
@ 2008-10-16 12:47 m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 12:48 ` [Bug fortran/37848] " m dot c dot schaafsma at student dot tudelft dot nl
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: m dot c dot schaafsma at student dot tudelft dot nl @ 2008-10-16 12:47 UTC (permalink / raw)
  To: gcc-bugs

The following code generates an internal compiler error on gcc 4.2.3 on
x86_64-linux-gnu

Bug:
  The following bug occurs when:
  -The designated variables are stored in the module
  -Multithreading is applied
  -The final subroutine is called from another subroutine

Command-line:
  gfortran -v -save-temps -g -fopenmp mH_Junctions.f90 Lanczos.f90 -o _Lanczos

Compiler output:

Driving: gfortran -v -save-temps -g -fopenmp mH_Junctions.f90 Lanczos.f90
/usr/lib/liblapack-3.so -o _Lanczos -lgfortranbegin -lgfortran -lm
-shared-libgcc
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
 /usr/lib/gcc/x86_64-linux-gnu/4.2.3/f951 mH_Junctions.f90 -quiet -dumpbase
mH_Junctions.f90 -mtune=generic -auxbase mH_Junctions -g -version -fopenmp
-fstack-protector -I /usr/lib/gcc/x86_64-linux-gnu/4.2.3/finclude -o
mH_Junctions.s
GNU F95 version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) (x86_64-linux-gnu)
        compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as --traditional-format -V -Qy -o mH_Junctions.o mH_Junctions.s
GNU assembler version 2.18.0 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.18.0.20080103
 /usr/lib/gcc/x86_64-linux-gnu/4.2.3/f951 Lanczos.f90 -quiet -dumpbase
Lanczos.f90 -mtune=generic -auxbase Lanczos -g -version -fopenmp
-fstack-protector -I /usr/lib/gcc/x86_64-linux-gnu/4.2.3/finclude -o Lanczos.s
GNU F95 version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) (x86_64-linux-gnu)
        compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Lanczos.f90:26: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

mh_Junctions.f90:
MODULE Parameters
IMPLICIT NONE
  INTEGER, parameter           :: dbl = 8
  INTEGER(kind=dbl), parameter :: g_junct = 6
  INTEGER(kind=dbl), parameter :: g_dims  = 6
  INTEGER(kind=dbl) :: g_alpha(g_dims,g_junct)
END MODULE Parameters

Lanczos.f90:
PROGRAM Lanczos
use parameters
IMPLICIT NONE
  call Algorithm()
STOP

CONTAINS

SUBROUTINE Algorithm()
use parameters
IMPLICIT NONE
   CALL ConstructH()
END SUBROUTINE Algorithm

SUBROUTINE ConstructH()
use omp_lib
use parameters
IMPLICIT NONE
  INTEGER(kind=dbl) :: g_Ndim  = 7
  INTEGER(kind=dbl) :: ni, N(g_dims), M(g_dims), l

!$OMP PARALLEL DEFAULT(NONE) &
!$OMP SHARED(g_alpha,g_ndim, g_junct) &
!$OMP PRIVATE(l,ni,M,N)

  DO ni = 1, g_Ndim
    DO l = 1, g_junct
      M = N - g_alpha(:,l)
    END DO
  END DO
!$OMP END PARALLEL
END SUBROUTINE ConstructH
END PROGRAM Lanczos


-- 
           Summary: internal compiler error: Segmentation fault. gfortran
                    openmp
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: m dot c dot schaafsma at student dot tudelft dot nl


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
@ 2008-10-16 12:48 ` m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 12:49 ` m dot c dot schaafsma at student dot tudelft dot nl
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: m dot c dot schaafsma at student dot tudelft dot nl @ 2008-10-16 12:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from m dot c dot schaafsma at student dot tudelft dot nl  2008-10-16 12:47 -------
Created an attachment (id=16507)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16507&action=view)
Main fortran routine


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 12:48 ` [Bug fortran/37848] " m dot c dot schaafsma at student dot tudelft dot nl
@ 2008-10-16 12:49 ` m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 13:19 ` dominiq at lps dot ens dot fr
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: m dot c dot schaafsma at student dot tudelft dot nl @ 2008-10-16 12:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from m dot c dot schaafsma at student dot tudelft dot nl  2008-10-16 12:48 -------
Created an attachment (id=16508)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16508&action=view)
fortran module


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 12:48 ` [Bug fortran/37848] " m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 12:49 ` m dot c dot schaafsma at student dot tudelft dot nl
@ 2008-10-16 13:19 ` dominiq at lps dot ens dot fr
  2008-10-16 14:15 ` m dot c dot schaafsma at student dot tudelft dot nl
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-10-16 13:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dominiq at lps dot ens dot fr  2008-10-16 13:17 -------
gfortran 4.3.2 and 4.4.0 give the following error:

pr37848.f90:32.23:

!$OMP PRIVATE(l,ni,M,N)
                      1
Error: Object 'g_junct' is not a variable at (1)

The program compiles (and executes) after removing 'g_junct' from "!$OMP
SHARED(g_alpha,g_ndim, g_junct) &".


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (2 preceding siblings ...)
  2008-10-16 13:19 ` dominiq at lps dot ens dot fr
@ 2008-10-16 14:15 ` m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 15:07 ` m dot c dot schaafsma at student dot tudelft dot nl
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: m dot c dot schaafsma at student dot tudelft dot nl @ 2008-10-16 14:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from m dot c dot schaafsma at student dot tudelft dot nl  2008-10-16 14:14 -------
Thanks for your adequate respons!
I'll implement your suggestion.


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (3 preceding siblings ...)
  2008-10-16 14:15 ` m dot c dot schaafsma at student dot tudelft dot nl
@ 2008-10-16 15:07 ` m dot c dot schaafsma at student dot tudelft dot nl
  2008-10-16 15:17 ` dominiq at lps dot ens dot fr
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: m dot c dot schaafsma at student dot tudelft dot nl @ 2008-10-16 15:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from m dot c dot schaafsma at student dot tudelft dot nl  2008-10-16 15:06 -------
I implemented your suggestion, but with little success.
Removing the variable results in the same error.
I need to use variables declared in an external module in a multi threaded
loop.
Somehow my compiler can't manage it.


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (4 preceding siblings ...)
  2008-10-16 15:07 ` m dot c dot schaafsma at student dot tudelft dot nl
@ 2008-10-16 15:17 ` dominiq at lps dot ens dot fr
  2008-10-16 15:54 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-10-16 15:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dominiq at lps dot ens dot fr  2008-10-16 15:16 -------
> Somehow my compiler can't manage it.

Could you try a more recent version: 4.3.2 or 4.4.0: as I said in comment #3,
the ICE has ben replaced by an error (I am not fluent enough with openmp to say
if it is right or not).

Note that very few fixes (if none) are backported to 4.2.


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (5 preceding siblings ...)
  2008-10-16 15:17 ` dominiq at lps dot ens dot fr
@ 2008-10-16 15:54 ` burnus at gcc dot gnu dot org
  2008-12-09 22:12 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-10-16 15:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from burnus at gcc dot gnu dot org  2008-10-16 15:53 -------
(In reply to comment #3)
> gfortran 4.3.2 and 4.4.0 give the following error:
> pr37848.f90:32.23:
> !$OMP PRIVATE(l,ni,M,N)
>                       1
> Error: Object 'g_junct' is not a variable at (1)

That error message was added for PR 35786 (fixed in April 2008 for 4.4.0 and
4.3.x).

(In reply to comment #6)
> > Somehow my compiler can't manage it.
> Could you try a more recent version: 4.3.2 or 4.4.0

That would also be my suggestion as there have been a couple of other OpenMP
fixes. (By the way: GCC 4.4 also already supports OpenMP version 3.0.)


-- 


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (6 preceding siblings ...)
  2008-10-16 15:54 ` burnus at gcc dot gnu dot org
@ 2008-12-09 22:12 ` dfranke at gcc dot gnu dot org
  2008-12-17 13:24 ` m dot c dot schaafsma at student dot tudelft dot nl
  2009-03-28 14:00 ` [Bug fortran/37848] [4.2 only] " fxcoudert at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-09 22:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dfranke at gcc dot gnu dot org  2008-12-09 22:09 -------
Any new developments here?


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug fortran/37848] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (7 preceding siblings ...)
  2008-12-09 22:12 ` dfranke at gcc dot gnu dot org
@ 2008-12-17 13:24 ` m dot c dot schaafsma at student dot tudelft dot nl
  2009-03-28 14:00 ` [Bug fortran/37848] [4.2 only] " fxcoudert at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: m dot c dot schaafsma at student dot tudelft dot nl @ 2008-12-17 13:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from m dot c dot schaafsma at student dot tudelft dot nl  2008-12-17 13:22 -------
Thanks for all the advice, sorry for my absence last months.
I am bound to ubuntu Hardy, which supports GCC 4.2.3
It is in my opinion too much work to manually install GCC

I resolved my problems by rewriting my code in such a way that I won't need any
external variables in my multithreaded loop.

Martijn


-- 

m dot c dot schaafsma at student dot tudelft dot nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED


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


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

* [Bug fortran/37848] [4.2 only] internal compiler error: Segmentation fault. gfortran openmp
  2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
                   ` (8 preceding siblings ...)
  2008-12-17 13:24 ` m dot c dot schaafsma at student dot tudelft dot nl
@ 2009-03-28 14:00 ` fxcoudert at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-28 14:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from fxcoudert at gcc dot gnu dot org  2009-03-28 13:59 -------
4.2 branch is now closing.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to fail|                            |4.2.3
      Known to work|                            |4.3.0 4.4.0
         Resolution|                            |WONTFIX
            Summary|internal compiler error:    |[4.2 only] internal compiler
                   |Segmentation fault. gfortran|error: Segmentation fault.
                   |openmp                      |gfortran openmp


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


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

end of thread, other threads:[~2009-03-28 14:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16 12:47 [Bug fortran/37848] New: internal compiler error: Segmentation fault. gfortran openmp m dot c dot schaafsma at student dot tudelft dot nl
2008-10-16 12:48 ` [Bug fortran/37848] " m dot c dot schaafsma at student dot tudelft dot nl
2008-10-16 12:49 ` m dot c dot schaafsma at student dot tudelft dot nl
2008-10-16 13:19 ` dominiq at lps dot ens dot fr
2008-10-16 14:15 ` m dot c dot schaafsma at student dot tudelft dot nl
2008-10-16 15:07 ` m dot c dot schaafsma at student dot tudelft dot nl
2008-10-16 15:17 ` dominiq at lps dot ens dot fr
2008-10-16 15:54 ` burnus at gcc dot gnu dot org
2008-12-09 22:12 ` dfranke at gcc dot gnu dot org
2008-12-17 13:24 ` m dot c dot schaafsma at student dot tudelft dot nl
2009-03-28 14:00 ` [Bug fortran/37848] [4.2 only] " fxcoudert at gcc dot gnu dot org

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).