This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: application crash if compiled with -fopenmp
- From: "Daniel Franke" <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Date: Tue, 8 Jan 2008 18:30:54 +0100
- Subject: Re: application crash if compiled with -fopenmp
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=s7Wz18M+mmqnyCb6hfw6Ysmd2aaY5ljpV8TViBEtJZU=; b=a9UG310qv5aKKgLexU69B65q22q/BroiQMo+PmXo7DCcuFgBb14iFSEJvGPjspXUEyEnS1GYDSSWHzYk62oqQTOb4OzX0CbeJPQJNsWEsEpqYWHPKTCQXC3tuq4ZxFgGPPAbSITLeNKSwbqPsgb0EH5jNPL2jzqoEnBMs6vyT3s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=g6+C4KvwQ0owyCTDPUTaLDjEwdKT4ma1BvhZSpIG1j34AH/GxICe5WpyGHIadtO1vdzFnWxCoRX7GSvDYbTRv/vd7oM4CkHFHcQXbZyCLleeXs3nGDqCZU6SnAb759rEgHBVdq2KvQhyoajK2r+dMrrosDVzAH7lFZ4t5o43wxQ=
- References: <640ad44b0801080644t25e8e7a5t7cea759da54711d6@mail.gmail.com>
2008/1/8, Daniel Franke <franke.daniel@gmail.com>:
> Somewhat strange problem: I have a large source file (1.2MB, 32kloc)
> that compiles (and works) fine. Compiling the same source, that does
> not yet contain any OMP statements, with -fopenmp, it crashes
> immediately on runtime.
Some digging showed that this can be easily reproduced:
$> cat sigsegv.f90
real(8), dimension(10000000) :: largearray
largearray = 1.0_8
end
$> gfortran-svn -g -Wall -fdump-tree-original sigsegv.f90 && ./a.out
[ok]
$> gfortran-svn -g -Wall -fopenmp -fdump-tree-original sigsegv.f90 && /a.out
Segmentation fault
The difference:
$> diff -u sigsegv.f90.003t.original sigsegv.f90.003t.original.openmp
--- sigsegv.f90.003t.original 2008-01-08 18:26:15.000000000 +0100
+++ sigsegv.f90.003t.original.openmp 2008-01-08 18:25:27.000000000 +0100
@@ -1,6 +1,6 @@
MAIN__ ()
{
- static real(kind=8) largearray[10000000];
+ real(kind=8) largearray[10000000];
static integer(kind=4) options.0[7] = {68, 127, 0, 0, 0, 1, 0};
_gfortran_set_options (7, (void *) &options.0);
Is this intended and/or necessary for OMP?
Thanks
Daniel