public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50688] New: OpenMP: Strange interaction with BLOCK
@ 2011-10-10 18:55 tkoenig at gcc dot gnu.org
  2011-10-10 21:15 ` [Bug fortran/50688] " burnus at gcc dot gnu.org
  2012-02-19 19:25 ` tkoenig at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2011-10-10 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50688
           Summary: OpenMP: Strange interaction with BLOCK
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


Weird... omp workshare doesn't recognize BLOCK?

program workshare
  implicit none
  integer :: i
  real :: A(5), B(5)
  B(1) = 3.344
  A = [real :: 1, 2, 3, 4, 5 ]
  !$omp parallel default(shared)
  !$omp workshare
  block
    real :: b1
    b1 = cos(b(1))
    A(:) = A(:)*cos(B1)+A(:)*cos(B1)
  end block
  !$omp end workshare nowait
  !$omp end parallel ! sync is implied here
  print *, A
end program workshare
ig25@linux-fd1f:~/Krempel/OMP> gfortran  workshare.f90
ig25@linux-fd1f:~/Krempel/OMP> gfortran -fopenmp workshare.f90
workshare.f90:9.7:

  block
       1
Error: Unexpected BLOCK statement at (1)
workshare.f90:10.14:

    real :: b1
              1
Error: Unexpected data declaration statement at (1)
workshare.f90:13.5:

  end block
     1
Error: Unexpected END statement at (1)
workshare.f90:11.6:

    b1 = cos(b(1))
      1
Error: Symbol 'b1' at (1) has no IMPLICIT type
g25@linux-fd1f:~/Krempel/OMP> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/ig25/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../trunk/configure --prefix=/home/ig25
--enable-languages=c,fortran --with-mpc=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.7.0 20111008 (experimental) (GCC)


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

* [Bug fortran/50688] OpenMP: Strange interaction with BLOCK
  2011-10-10 18:55 [Bug fortran/50688] New: OpenMP: Strange interaction with BLOCK tkoenig at gcc dot gnu.org
@ 2011-10-10 21:15 ` burnus at gcc dot gnu.org
  2012-02-19 19:25 ` tkoenig at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-10-10 21:15 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |diagnostic, openmp
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-10-10 21:14:35 UTC ---
Good question whether it should be valid or rejected. OpenMP 3.1 itself does
not allow it, which is not surprising as OpenMP 3.1 is based on Fortran 95 but
BLOCK is Fortran 2008.

Ignoring this issue, I think WORKSHARE does not fit for BLOCK; it is usually
used for array assignments and FORALL/WHERE assignments, but BLOCK is something
different. 

For general parallelization, I think TASK is more useful.


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

* [Bug fortran/50688] OpenMP: Strange interaction with BLOCK
  2011-10-10 18:55 [Bug fortran/50688] New: OpenMP: Strange interaction with BLOCK tkoenig at gcc dot gnu.org
  2011-10-10 21:15 ` [Bug fortran/50688] " burnus at gcc dot gnu.org
@ 2012-02-19 19:25 ` tkoenig at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-02-19 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-02-19 19:23:48 UTC ---
Hmm... I think this can be closed, BLOCK doesn't really make
much sense in WORKSHARE.

I certainly won't fix this (and the optimization which put
a BLOCK inside a workshare has been removed anyway :-)


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

end of thread, other threads:[~2012-02-19 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-10 18:55 [Bug fortran/50688] New: OpenMP: Strange interaction with BLOCK tkoenig at gcc dot gnu.org
2011-10-10 21:15 ` [Bug fortran/50688] " burnus at gcc dot gnu.org
2012-02-19 19:25 ` tkoenig at gcc dot gnu.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).