This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/81350] New: gfortran OpenMP taskloop segfaults or incorrect
- From: "jeff.science at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Jul 2017 04:33:07 +0000
- Subject: [Bug fortran/81350] New: gfortran OpenMP taskloop segfaults or incorrect
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81350
Bug ID: 81350
Summary: gfortran OpenMP taskloop segfaults or incorrect
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jeff.science at gmail dot com
Target Milestone: ---
Created attachment 41697
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41697&action=edit
source code associated with bug
Code is correct with Intel 18 but generates erroneous results or segfaults with
GCC 7.1.
jrhammon-mac01:FORTRAN jrhammon$ ifort -std08 -fpp -g -O3 -xHOST -DRADIUS=2
-DSTAR -qopenmp stencil-taskloop-openmp.f90 -o stencil-taskloop-openmp-ifort
jrhammon-mac01:FORTRAN jrhammon$ gfortran-7 -std=f2008 -cpp -g -O3
-mtune=native -DRADIUS=2 -DSTAR -fopenmp stencil-taskloop-openmp.f90 -o
stencil-taskloop-openmp-gfortran
jrhammon-mac01:FORTRAN jrhammon$ ./stencil-taskloop-openmp-ifort 10 1000
Parallel Research Kernels
Fortran OpenMP TASKLOOP Stencil execution on 2D grid
Number of threads = 4
Grid size = 1000
Radius of stencil = 2
Type of stencil = star
Data type = double precision
Compact representation of stencil loop body
Untiled
Number of iterations = 10
Solution validates
Rate (MFlops/s): 7787.263159 Avg time (s): 0.002420
jrhammon-mac01:FORTRAN jrhammon$ ./stencil-taskloop-openmp-gfortran 10 1000
Parallel Research Kernels
Fortran OpenMP TASKLOOP Stencil execution on 2D grid
Number of threads = 4
Grid size = 1000
Radius of stencil = 2
Type of stencil = star
Data type = double precision
Compact representation of stencil loop body
Untiled
Number of iterations = 10
Segmentation fault: 11
jrhammon-mac01:FORTRAN jrhammon$ ./stencil-taskloop-openmp-ifort 10 100
Parallel Research Kernels
Fortran OpenMP TASKLOOP Stencil execution on 2D grid
Number of threads = 4
Grid size = 100
Radius of stencil = 2
Type of stencil = star
Data type = double precision
Compact representation of stencil loop body
Untiled
Number of iterations = 10
Solution validates
Rate (MFlops/s): 411.036158 Avg time (s): 0.000426
jrhammon-mac01:FORTRAN jrhammon$ ./stencil-taskloop-openmp-gfortran 10 100
Parallel Research Kernels
Fortran OpenMP TASKLOOP Stencil execution on 2D grid
Number of threads = 4
Grid size = 100
Radius of stencil = 2
Type of stencil = star
Data type = double precision
Compact representation of stencil loop body
Untiled
Number of iterations = 10
ERROR: L1 norm = 0.000000 Reference L1 norm = 22.000000
Rate (MFlops/s): 814.866756 Avg time (s): 0.000215
$ gfortran-7 -v
Using built-in specs.
COLLECT_GCC=gfortran-7
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/7.1.0/libexec/gcc/x86_64-apple-darwin16.6.0/7.1.0/lto-wrapper
Target: x86_64-apple-darwin16.6.0
Configured with: ../configure --build=x86_64-apple-darwin16.6.0
--prefix=/usr/local/Cellar/gcc/7.1.0
--libdir=/usr/local/Cellar/gcc/7.1.0/lib/gcc/7
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-7
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-checking=release --with-pkgversion='Homebrew GCC
7.1.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues
--disable-nls --with-native-system-header-dir=/usr/include
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
Thread model: posix
gcc version 7.1.0 (Homebrew GCC 7.1.0)