[Bug fortran/33444] New: openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-15 Thread fred2 at qnet dot com
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)


-- 
   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=33444



[Bug fortran/33445] New: openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-15 Thread fred2 at qnet dot com
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-fopenmp1   ok
md.f-fopenmp2   ok

mdfree.f-ffree-form N/A (serial)ok
mdfree.f-fopenmp -ffree-form1   ok
mdfree.f-fopenmp -ffree-form2   NaN

mdfree.f90  (none)  N/A (serial)ok
mdfree.f90  -fopenmp1   ok
mdfree.f90  -fopenmp2   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



[Bug fortran/33445] openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-15 Thread fred2 at qnet dot com


--- Comment #1 from fred2 at qnet dot com  2007-09-15 19:52 ---
Created an attachment (id=14209)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14209&action=view)
fixed-form source code (runs correctly). see bug description to duplicate error

this attachment (and bug description) was incorrectly omitted from bug 33444


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33445