FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 03-06-2010, 11:09 AM
Stefano Simonucci
 
Default Bug#572756: Many programs compiled with gfortran-4.4 -fopenmp segfault

Package: gfortran-4.4
Version: 4.4.3-3
Severity: important
Tags: l10n

I have compiled the following fortran 95 program

program test
double precision a(10000000)
a(1)=1
write(6,*) a(1)
stop
end

with the command

gfortran -fopenmp
and I get the following error message (If I try to execute the program)

stefano@debsim2:~/prova$ ./a.out
Segmentation fault
stefano@debsim2:~/prova$
-----------------------------------------------------------
If I reduce the dimension of the a array, for example

program test1
double precision a(1000000)
a(1)=1
write(6,*) a(1)
stop
end

and I compile the program with the same flag -fopenmp
the binary program can be execute

stefano@debsim2:~/prova$ ./a.out
1.0000000000000000
stefano@debsim2:~/prova$
----------------------------------------------------
If I use a dynamical allocation (the dimension of a is like the dimension in test)

program test2
double precision,allocatable :: a(
allocate(a(100000000))
a(1)=1
write(6,*) a(1)
stop
end

the program can be compiled (with -fopenmp) and executed.
----------------------------------------------------------
I have not used the OMP directives in these programs but I observe the same behaviour
with OMP commands.
The program

program test_omp
double precision a(10000000)
!$OMP PARALLEL DEFAULT(PRIVATE)
a(1)=1
write(6,*) a(1)
!$OMP END PARALLEL
stop
end

segfaults when compiled with the option -fopenmp
while the program

program test_omp1
double precision a(100000)
!$OMP PARALLEL DEFAULT(PRIVATE)
a(1)=1
write(6,*) a(1)
!$OMP END PARALLEL
stop
end

gives the result
stefano@debsim2:~/prova$ ./a.out
1.0000000000000000
1.0000000000000000
stefano@debsim2:~/prova$

-------------------------------------------
Analogously the program

program test_omp2
double precision,allocatable :: a(
!$OMP PARALLEL DEFAULT(PRIVATE)
allocate(a(100000000))
a(1)=1
write(6,*) a(1)
!$OMP END PARALLEL
stop
end

runs correctly:

stefano@debsim2:~/prova$ ./a.out
1.0000000000000000
1.0000000000000000
stefano@debsim2:~/prova$

Thank you






-- 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.32-rc8-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.3-3 The GNU C compiler
ii gcc-4.4-base 4.4.3-3 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.3-3 Runtime library for GNU Fortran ap
ii libgmp3c2 2:4.3.2+dfsg-1 Multiprecision arithmetic library
ii libmpfr1ldbl 2.4.2-3 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



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100306120940.13543.39051.reportbug@localhost.loc aldomain">http://lists.debian.org/20100306120940.13543.39051.reportbug@localhost.loc aldomain
 

Thread Tools




All times are GMT. The time now is 12:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org