--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gfortran-4.4: Segmentation fault of various fortran programs with OpenMP
- From: Stefano Simonucci <stefano.simonucci@tin.it>
- Date: Thu, 15 Oct 2009 16:09:27 +0200
- Message-id: <20091015140927.10475.39102.reportbug@localhost.localdomain>
Package: gfortran-4.4
Version: 4.4.1-6
Severity: important
I have used gfortran-4.4 to compile various fortran programs. The programs run correctly without
the -fopenmp flag. If I compile these programs with gfortran-4.2 and with the flag -fopenmp,
the programs run correctly. Nevertheless, if I compile these programs with gfortran-4.4 with the OpenMP flag
(-fopenmp) I get a segmentation fault when the programs are started. If I compile the same program with the
debug flag (-g) and I run the program, I get the following messages
gdb ./hfint_cluster.m
GNU gdb (GDB) 6.8.50.20090628-cvs-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) run
Starting program: /home/stefano/calcoli_korg/run/hfint_cluster.m
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
MAIN__ () at hfint_cluster.f:1
1 IMPLICIT REAL*8 (A-H,O-Z)
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages gfortran-4.4 depends on:
ii gcc-4.4 4.4.1-6 The GNU C compiler
ii gcc-4.4-base 4.4.1-6 The GNU Compiler Collection (base
ii libc6 2.9-23 GNU C Library: Shared libraries
ii libc6-dev 2.9-23 GNU C Library: Development Librari
ii libgfortran3 4.4.1-6 Runtime library for GNU Fortran ap
ii libgmp3c2 2:4.3.1+dfsg-3 Multiprecision arithmetic library
ii libmpfr1ldbl 2.4.1-2 multiple precision floating-point
gfortran-4.4 recommends no packages.
Versions of packages gfortran-4.4 suggests:
pn gfortran-4.4-doc <none> (no description available)
pn gfortran-4.4-multilib <none> (no description available)
pn libgfortran3-dbg <none> (no description available)
-- no debconf information
--- End Message ---
--- Begin Message ---
tags 551088 - moreinfo
thanks
On 30.12.2009 10:16, Stefano Simonucci wrote:
I provide the following test case (Fortran 77):
stefano@debsim2:~/prova$ cat test.f
program test
double precision a(10000000)
a(1)=1
write(6,*) a(1)
stop
end
stefano@debsim2:~/prova$ gfortran-4.4 -fopenmp -o test test.f
stefano@debsim2:~/prova$ ./test
Segmentation fault
you have to write your program to use OpenMP. it doesn't parallelize
automatically. please search the web for some OpenMP fortran examples and/or
have a look at the gomp manual.
http://gcc.gnu.org/onlinedocs/gcc-4.4.2/libgomp/
closing the report.
--- End Message ---