This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33445] New: openmp invalid multi-thread runtime result (-ffree-form only!)
- From: "fred2 at qnet dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2007 19:48:39 -0000
- Subject: [Bug fortran/33445] New: openmp invalid multi-thread runtime result (-ffree-form only!)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
fortran code using openmp fails at runtime for multiple threads under
-ffree-form (but NOT -ffixed-form).
possibly due solely to treatment of continuation characters?
(tested only under gcc 4.1.2 (fedora core 7)
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070502 (Red Hat 4.1.2-12)
error vs. compilation flags:
source_file gfortran_flags OMP_NUM_THREADS run_time_result
(stdout)
md.f (none) N/A (serial) ok
md.f -fopenmp 1 ok
md.f -fopenmp 2 ok
mdfree.f -ffree-form N/A (serial) ok
mdfree.f -fopenmp -ffree-form 1 ok
mdfree.f -fopenmp -ffree-form 2 NaN
mdfree.f90 (none) N/A (serial) ok
mdfree.f90 -fopenmp 1 ok
mdfree.f90 -fopenmp 2 NaN
md.f is from http://www.openmp.org/drupal/samples/md.html
(note: nsteps is reduced from 1000 to 100 to speed up testing).
mdfree.f replaces the fixed-form continuation characters (in column 6) w/
the free-form (&):
$ diff md.f mdfree.f
41,42c41,42
< call compute(nparts,ndim,box,position,velocity,mass,
< . force,potential,kinetic)
---
> call compute(nparts,ndim,box,position,velocity,mass, &
> force,potential,kinetic)
47,48c47,48
< call compute(nparts,ndim,box,position,velocity,mass,
< . force,potential,kinetic)
---
> call compute(nparts,ndim,box,position,velocity,mass, &
> force,potential,kinetic)
mdfree.f90 is just renamed mdfree.f.
--
Summary: openmp invalid multi-thread runtime result (-ffree-form
only!)
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fred2 at qnet dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33445