[ET Trac] [Einstein Toolkit] #319: more OpenMP WORKSHARE sections in GRHydro Reconstruct

Einstein Toolkit trac-noreply at einsteintoolkit.org
Wed Mar 2 08:37:05 CST 2011


#319: more OpenMP WORKSHARE sections in GRHydro Reconstruct
--------------------------+-------------------------------------------------
  Reporter:  rhaas        |       Owner:        
      Type:  enhancement  |      Status:  review
  Priority:  minor        |   Milestone:        
 Component:  Other        |     Version:        
Resolution:               |    Keywords:        
--------------------------+-------------------------------------------------

Comment (by eschnett):

 For best OpenMP performance, there should probably be as few parallel
 regions as possible. In general, a single parallel region per routine
 would be best (unless the routine has a complex structure).

 Some of your patch reads as if the current code had workshare constructs
 outside of a parallel region. This would be senseless and looks like a bug
 to me.

 I think that if statements inside a workshare construct are fine (I'm not
 completely sure about this). In this case, code such as

           if (shift_state .ne. 0) then
         120         !$OMP WORKSHARE
 115     121         lbetax = betax
 116     122         lbetay = betay
 117     123         lbetaz = betaz
         124         !$OMP END WORKSHARE NOWAIT
 118     125       else
         126         !$OMP WORKSHARE
 119     127         lbetax = 0.d0
 120     128         lbetay = 0.d0
 121     129         lbetaz = 0.d0
         130         !$OMP END WORKSHARE NOWAIT
 122     131       end if

 could be simplified to have only a single, enclosing workshare construct.

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/319#comment:2>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list