public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/25162]  New: Issue with OpenMP COPYIN and gfortran
@ 2005-11-29 20:49 magnus_os at yahoo dot se
  2005-11-30 12:07 ` [Bug fortran/25162] " jakub at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: magnus_os at yahoo dot se @ 2005-11-29 20:49 UTC (permalink / raw)
  To: gcc-bugs

export OMP_NUM_THREADS=2

gfortran-gomp -v Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gomp
--program-suffix=-gomp --enable-threads=posix --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.2.0-gomp-20050608-branch 20051126 (experimental) (merged
20051124)

It seems as if the COPYIN statement is never executed in this test-program.

      PROGRAM TEST4
C
      CALL TEST1
C
      CALL TEST2
C
      END
C
      SUBROUTINE TEST1
C
      DOUBLE PRECISION BPRIM
      COMMON /TESTCOM/ BPRIM(100)
C$OMP THREADPRIVATE(/TESTCOM/)
C
      INTEGER I
C
      DO I = 1, 100
         BPRIM( I ) = DBLE( I )
      END DO
C
      RETURN
      END
C
      SUBROUTINE TEST2
C
      DOUBLE PRECISION BPRIM
      COMMON /TESTCOM/ BPRIM(100)
C$OMP THREADPRIVATE(/TESTCOM/)
C
      INTEGER I, IDUM(50)
C
      DO I = 1, 50
         IDUM(I) = I
      END DO
C
C$OMP PARALLEL COPYIN(/TESTCOM/)
C
      CALL TEST3
C$OMP END PARALLEL
C
      RETURN
      END
C
      SUBROUTINE TEST3
C
      DOUBLE PRECISION BPRIM
      COMMON /TESTCOM/ BPRIM(100)
C$OMP THREADPRIVATE(/TESTCOM/)
C
      INTEGER K
C
      DO K = 1, 10
         PRINT *,K,BPRIM(K)
      END DO
C
      RETURN
      END

Running it produces the following results:
           1   0.00000000000000
           2   0.00000000000000
           3   0.00000000000000
           4   0.00000000000000
           5   0.00000000000000
           6   0.00000000000000
           7   0.00000000000000
           8   0.00000000000000
           9   0.00000000000000
          10   0.00000000000000
           1   1.00000000000000
           2   2.00000000000000
           3   3.00000000000000
           4   4.00000000000000
           5   5.00000000000000
           6   6.00000000000000
           7   7.00000000000000
           8   8.00000000000000
           9   9.00000000000000
          10   10.0000000000000

Running it on Intel FORTRAN 9 produces more expected results:
           1   1.00000000000000
           2   2.00000000000000
           3   3.00000000000000
           4   4.00000000000000
           5   5.00000000000000
           6   6.00000000000000
           7   7.00000000000000
           8   8.00000000000000
           9   9.00000000000000
          10   10.0000000000000
           1   1.00000000000000
           2   2.00000000000000
           3   3.00000000000000
           4   4.00000000000000
           5   5.00000000000000
           6   6.00000000000000
           7   7.00000000000000
           8   8.00000000000000
           9   9.00000000000000
          10   10.0000000000000


-- 
           Summary: Issue with OpenMP COPYIN and gfortran
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: magnus_os at yahoo dot se


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-14 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-29 20:49 [Bug libgomp/25162] New: Issue with OpenMP COPYIN and gfortran magnus_os at yahoo dot se
2005-11-30 12:07 ` [Bug fortran/25162] " jakub at gcc dot gnu dot org
2005-11-30 12:52 ` jakub at gcc dot gnu dot org
2005-11-30 13:00 ` jakub at gcc dot gnu dot org
2006-02-14 16:38 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).