Search found 603 matches

by ftinetti
Mon Jul 13, 2015 8:45 am
Forum: Using OpenMP
Topic: target data copyin/copyout
Replies: 4
Views: 6589

Re: target data copyin/copyout

Sorry, I was using OpenACC lingo. Very much my bad. OpenMP equivalent would be the Map directive. 4.0 Map Clause [2.14.5] map([map-type:]ist) Map a variable from the task’s data environment to the device data environment associated with the construct int j = 5; #pragma omp target map(to:j) { j = j ...
by ftinetti
Mon Jul 13, 2015 4:52 am
Forum: Using OpenMP
Topic: target data copyin/copyout
Replies: 4
Views: 6589

Re: target data copyin/copyout

May be a silly question, but if I had: int j = 5; then I create a target data region and did a copyin for j, within that target data region, I did j = 10. I do not do a copyout from that data region. Outside of that data region (back on host), does j now equal 5 or 10? What do you mean by "target d...
by ftinetti
Mon Jul 13, 2015 4:47 am
Forum: Using OpenMP
Topic: Problem glibc fatal error
Replies: 5
Views: 7820

Re: Problem glibc fatal error

egutierrez wrote:I have edited the stackoverflow thread as suggested. If anyone could take a look and help.... Thanks
Hi,

I didn't analyze your code in full detail, just a suggestion: take a look at OMP_STACKSIZE and process memory limit/S (I've had some trouble with process stack size limit).

HTH,

Fernando.
by ftinetti
Mon Jul 13, 2015 4:21 am
Forum: Using OpenMP
Topic: I found out that "use omp_lib" is not necessary for OpenMP
Replies: 1
Views: 5906

Re: I found out that "use omp_lib" is not necessary for Open

Hi, About omp_lib: it's like any other Fortran module. If you have use omp_lib in your code, then the compiler has everything needed to compile calls to the corresponding module functions, being OMP_GET_THREAD_NUM() the only one actually used in the code example you provide. Thus, the line INTEGER O...
by ftinetti
Thu Apr 30, 2015 3:42 am
Forum: Using OpenMP
Topic: need help with nested loops
Replies: 1
Views: 3810

Re: need help with nested loops

but the outer loop is called many times, and the overhead of thread creation can be substantial. Is there way to create the threads outside the loops and "activate" them in the inner loop. Many thanks. Ned Hi Ned, How threads are created/activated/handled in general is not covered in the Spec., but...
by ftinetti
Tue Apr 28, 2015 5:56 am
Forum: Using OpenMP
Topic: Mandelbrot optimization
Replies: 20
Views: 23838

Re: Mandelbrot optimization

Hi, Some results in a dual quad-core Xeon E5405 @ 2.00GHz at the end. I've changed a few lines, please take a look. I've not used omp_get_wtime() so you can see the "problem" using other function/s. (Copied from screen... not a good idea in general, check everything is right...): // mandelbrot.c // ...
by ftinetti
Tue Apr 28, 2015 5:26 am
Forum: Using OpenMP
Topic: Mandelbrot optimization
Replies: 20
Views: 23838

Re: Mandelbrot optimization

Also, remember to use omp_get_wtime(), as suggested by MarkB.

Fernando.
by ftinetti
Tue Apr 28, 2015 5:07 am
Forum: Using OpenMP
Topic: Mandelbrot optimization
Replies: 20
Views: 23838

Re: Mandelbrot optimization

Does not compile, please check.

(I'll try to advance, anyway).

Fernando.
by ftinetti
Wed Mar 25, 2015 12:03 pm
Forum: Using OpenMP
Topic: questions about sum and for loop
Replies: 8
Views: 9639

Re: questions about sum and for loop

You say that every instance of a array is not initialized if it is declared private.Ok. Hmm... actually, the OpenMP Spec. defines such things, please take a look at it. ( we are talking about the 'a' array now , because for 'a' as a variable we don't have these problems because it is not a pointer ...
by ftinetti
Wed Mar 25, 2015 5:00 am
Forum: Using OpenMP
Topic: questions about sum and for loop
Replies: 8
Views: 9639

Re: questions about sum and for loop

Hi, #include <stdio.h> #include <stdlib.h> #include <omp.h> int main( int argc, const char* argv[] ){ int N = 4; int * a = (int*) malloc( N * sizeof(int) ); for ( int i = 0; i < N; i++ ) a[ i ] = 0; int i; #pragma omp parallel for private( i,a )//shared(a) for ( i = 0; i < N; i++ ) { a[ i ] += i; } ...