Search found 17 matches

by hhj
Wed Jan 11, 2017 10:12 am
Forum: OpenMP 4.5 Examples Discussion
Topic: example tasking.2.c doesn't work as expected
Replies: 1
Views: 10304

Re: example tasking.2.c doesn't work as expected

The "tasking.2.c" example is a parallel tree traversal example using tasks. The parallelism comes from the fact that the left and right branches can be executed in parallel, which means that the order of left and right branch executions may be different from different runs. This is in a sense differ...
by hhj
Fri Mar 22, 2013 3:26 pm
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: #pragma omp cancel
Replies: 1
Views: 16496

Re: #pragma omp cancel

I think you are correct. The only optional clause should be the if clause. We need to fix the wording in the final version to make it clear. Thanks for the note. -Henry
by hhj
Mon Feb 20, 2012 10:15 am
Forum: Using OpenMP
Topic: Implicit barrier at the end of #pragma for
Replies: 5
Views: 16286

Re: Implicit barrier at the end of #pragma for

Is this (explicitly) in the Spec.?
If not, do you know if there will be?
The restriction is explicitly spelled in the spec. See the 3.1 spec on page 38, lines 21-22.
by hhj
Tue Jan 03, 2012 12:41 pm
Forum: OpenMP 3.1 API Specifications
Topic: Example A.22.1c and A.22.1f differences
Replies: 1
Views: 16240

Re: Example A.22.1c and A.22.1f differences

Thanks Nathan for your comment. We will include your suggestion into the next release of the spec.
-Henry Jin
by hhj
Wed Oct 26, 2011 11:21 am
Forum: Using OpenMP
Topic: Rank Sort Parallel Algorithm
Replies: 3
Views: 5676

Re: Rank Sort Parallel Algorithm

What compiler and compiler options did you use?
by hhj
Wed Oct 26, 2011 8:06 am
Forum: Using OpenMP
Topic: Rank Sort Parallel Algorithm
Replies: 3
Views: 5676

Re: Rank Sort Parallel Algorithm

In line 18, the use of "parallel for" is incorrect since the statement followed is not a "for" loop. Try to just use "parallel", i.e., #pragma omp parallel private(i, j, startval, endval, rank) shared(x, y, N) I'd say the diagnosis printed from the compiler is not very useful or accurate for this ca...
by hhj
Fri Oct 14, 2011 9:51 am
Forum: Using OpenMP
Topic: Doubt data-sharing attribute rules
Replies: 4
Views: 4986

Re: Doubt data-sharing attribute rules

The default-private rule for Fortran loop variables applies to those loops that are inside a parallel region. Since the J loop is outside the parallel region in your example, the variable "J" is shared by default (the default shared rule).
by hhj
Fri Oct 14, 2011 9:29 am
Forum: OpenMP 3.1 API Specifications
Topic: Example A.7 clarification
Replies: 1
Views: 17721

Re: Example A.7 clarification

Yes, you are correct. Part of the intention of this example is to illustrate the outcome from Algorithm 2.1 in Section 2.4.1 (Determining the Number of Threads for a parallel Region), on pages 36-37: else if ( dyn-var = false ) and ( ThreadsRequested > ThreadsAvailable ) then behavior is implementat...
by hhj
Fri Oct 14, 2011 9:12 am
Forum: Using OpenMP
Topic: OpenMP specification example extracting tools
Replies: 1
Views: 3353

Re: OpenMP specification example extracting tools

Thanks Brett for posting your useful tools. I'll make sure your link be aware by the ARB members or possibly be added in an OpenMP twiki page.
-Henry
by hhj
Fri Oct 14, 2011 8:59 am
Forum: Using OpenMP
Topic: Reduction on zero-trip loop
Replies: 2
Views: 4531

Re: Reduction on zero-trip loop

Your code looks perfectly fine to me. The OpenMP spec does not explicitly prohibit "OMP DO" on zero-trip loops. I'd incline to think that it is a compiler (Intel ifort) issue in treating loop bounds.