Summary: | Implement OpenMP workshare | ||
---|---|---|---|
Product: | gcc | Reporter: | Tobias Burnus <burnus> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | burnus, gcc-bugs, jakub |
Priority: | P3 | Keywords: | openmp, patch |
Version: | 4.3.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2008-03-07 11:48:45 | |
Bug Depends on: | |||
Bug Blocks: | 42478 |
Description
Tobias Burnus
2008-03-03 14:27:28 UTC
This is not middle-end thing, all that is needed is change fortran FE to lower (some forms of ) !$omp workshare constructs into some other standard worksharing construct than single, particularly into OMP_FOR or perhaps sometimes OMP_SECTIONS or OMP_SINGLE just for one or a couple of lines rather than the whole !$omp workshare. I don't plan to work on this myself, but any of the numerous Fortran FE maintainers could do this, I can help with advice if needed. Either code to expand the implicit loops in expressions will need to be duplicated, or tweaked (e.g. add a flag to them, which would result in OMP_FOR loops being created rather than normal loops). First patch: http://gcc.gnu.org/ml/fortran/2008-06/msg00281.html Has the second patch been reviewed? Has Vasilis completed his copyright assignment? Subject: Bug 35423 Author: jakub Date: Mon Apr 20 10:59:59 2009 New Revision: 146397 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146397 Log: PR fortran/35423 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT, OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define. (ompws_flags): New extern decl. * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR for the outer dimension if ompws_flags allow it. * trans.c (gfc_generate_code): Clear ompws_flags. * trans-expr.c (gfc_trans_assignment_1): Allow worksharing array assignments inside of !$omp workshare. * trans-stmt.c (gfc_trans_where_3): Similarly for where statements and constructs. * trans-openmp.c (ompws_flags): New variable. (gfc_trans_omp_workshare): Rewritten. * testsuite/libgomp.fortran/workshare2.f90: New test. Added: trunk/libgomp/testsuite/libgomp.fortran/workshare2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans-openmp.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/fortran/trans.c trunk/gcc/fortran/trans.h trunk/libgomp/ChangeLog Items left to do: * worksharing of other stuff (say FORALL) [I have not check the patch, but possibly assignments in WHERE blocks could also profit from more work] * dependency analysis ("the goal of dependency checking is to avoid unnecessary barriers by inserting NOWAIT clauses when safe. Hopefully the functionality provided in dependency.c will be useful here") (cf. http://gcc.gnu.org/ml/gcc-patches/2009-04/msg01598.html) This PR is more than five years old and seems (mostly) fixed. Any reason to keep it open? > This PR is more than five years old and seems (mostly) fixed. Any reason
> to keep it open?
No feedback for more than eight months. Closing as FIXED. Please open new PR(s) with test cases for remaining issue(s).
|