Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
34 Views

OPENMP 4.0 target offload Report

Hi ..

I am trying to make a comparison statistics of offload using,

1). Intel compiler assisted offload VS. 2). OPENMP 4.0 target construct 

My QUESTION: HOW I CAN GET OPENMP 4.0 OFFLOAD REPORT(which environment variable I need to set..?), I used OFFLOAD Report=2; intel compiler directive offload it worked fine, BUT I AM GETTING VERY STRANGE STATISTICS WITH OPENMP 4.0 OFFLOAD (I am using Intel Xeon Phi as execution platform)

Here is the code

COMPILER DIRECTIVE OFFLOAD:

// Start time
        gettimeofday(&start, NULL);

        // Run SAXPY 
        #pragma offload target(mic:0) inout(x) out(y)
        {
                        #pragma omp parallel for default (none) shared(a,x,y)
                        for (i = 0; i < n; ++i){
                                y = a*x + y;
                        }                                                        
        } // end of target data

        // end time 
        gettimeofday(&end, NULL);


OPENMP 4.0 TARGET OFFLOAD:

// Start time
        gettimeofday(&start, NULL);

        // Run SAXPY
        #pragma omp target data map(to:x)
        {
                #pragma omp target map(tofrom:y)
                {
                        #pragma omp parallel for
                        for (i = 0; i < n; ++i){
                                y = a*x + y;
                        }
                }
        } // end of target data

 

------

Thanks in advace. (Raju)

0 Kudos
2 Replies
Highlighted
Black Belt
34 Views

I would have written #pragma omp target map (to: x) map( tofrom: y){

}

similar to what works in Fortran, but who am I to say when I haven't had much success with C?

0 Kudos
Highlighted
Employee
34 Views

Hi,

The offload report does support the OpenMP 4.0 target construct. The environment variable is OFFLOAD_REPORT. See the documentation here for usage (search 'offload report'): https://software.intel.com/en-us/intel-cplusplus-compiler-16.0-user-and-reference-guide

I noticed that the documentation does not mention OpenMP support for this feature so I have submitted a change request to include that information (DPD200376289).

Regards,

--Amanda

0 Kudos