Questions tagged [openacc]

The OpenACC Application Program Interface describes a collection of compiler directives to specify loops and regions of code in standard C, C++ and Fortran to be offloaded from a host CPU to an attached accelerator, providing portability across operating systems, host CPUs and accelerators.

The OpenACC Application Program Interface describes a collection of compiler directives to specify loops and regions of code in standard C, C++ and Fortran to be offloaded from a host CPU to an attached accelerator, providing portability across operating systems, host CPUs and accelerators.

Useful Links

The OpenACC directives and programming model allow programmers to create high-level host+accelerator programs without the need to explicitly initialize the accelerator, manage data or program transfers between the host and accelerator, or initiate accelerator startup and shutdown.

All of these details are implicit in the programming model and are managed by the OpenACC API-enabled compilers and runtimes. The programming model allows the programmer to augment information available to the compilers, including specification of data local to an accelerator, guidance on mapping of loops onto an accelerator, and similar performance-related details.

How to get Useful Answers to your OpenACC Questions on StackOverflow

Here are a number of suggestions to users new to OpenACC and/or StackOverflow. Follow these suggestions before asking your question and you are much more likely to get a satisfactory answer!

  • Search StackOverflow (and the web!) for similar questions before asking yours
  • Include an as-simple-as-possible code example in your question and you are much more likely to get a useful answer. If the code is short and self-contained (so users can test it themselves), that is even better.
403 questions
0
votes
1 answer

openAcc : is there any directive corresponding to THREADPRIVATE in openMP

I am trying to transform an openMp program to openAcc program.i encountered threadprivate directive.i need to know is there any such directive in openAcc if there is no such directive in openAcc,how to handle such scenarios..
amitj
  • 75
  • 1
  • 4
0
votes
1 answer

C/C++ and GNU/PGI: undefined reference to `__pgio_ini'

Is there a way to link PGI Compiler binaries to existing GNU binaries? When I try to link I get following error: oacc.c.o:(.init+0x8): undefined reference to `__pgio_ini' collect2: ld returned 1 exit status Details: I have compiled a few files with…
lashgar
  • 5,184
  • 3
  • 37
  • 45
-1
votes
3 answers

Why does "#pragma omp loop for" produce a compile error?

Why doesn't this compile? The following MRE is built from a number of examples trying to get OpenMP and OpenACC to work together. The compile command produces the following error: $ mpic++ -mcmodel=medium -fopenmp -acc -ta=tesla:managed -Minfo=accel…
Mark Bower
  • 569
  • 2
  • 16
-1
votes
1 answer

Are SYCL and OpenACC competing frameworks? or complementary?

I'm gathering information about heterogeneous computing. I've come across SYCL and OpenACC. I gather that OpenACC has many pragma directives (similar to OpenMP) to abstract GPU calculations (either OpenCL or CUDA or both??). However, it seems to me…
Aaron B.
  • 1,605
  • 13
  • 12
-1
votes
1 answer

How many private copies of array are in the openacc loop

if i have #pragma acc parallel loop gang num_gangs(4) \ num_workers(5) vector_length(6) private(arrayB) { for(j=0; j
mr02
  • 3
  • 2
-1
votes
1 answer

OpenAcc error with copyin and copyout

General Information NOTE: I am also decently new to C, OpenAcc. Hi I am trying to develop an image blurring program, but first I wanted to see if I could parallelize the for loops and copyin/copyout my values. The problem I am facing currently is…
Navleen Singh
  • 155
  • 2
  • 11
-1
votes
1 answer

OpenACC: having a private array for every GPU thread

I am bringing a code to the GPU. This code has a kernel that makes use of a private array. This means that the array is declared inside the kernel loop. When I port the code to OpenACC I get buggy results. To me, it looks like the array is…
Antonio Ragagnin
  • 2,278
  • 4
  • 24
  • 39
-1
votes
1 answer

Openacc: How can I make insertion sort more parallel

Can you please suggest how can I make openacc more parallel. I am making mergesort with insertion sort. Should I use "loop" or "for" for using loop. Also for insertion sort should it be kernel or parallel. #include…
-1
votes
1 answer

Error linking against Armadillo using PGI compiler

I want to accelerate a portion of my code using OpenACC to allow it run on GPUs ,but the most of my code uses Armadillo library for the linear algebra. The easiest way that I found to accelerate the code relies on the PGI set of compilers, but it…
user3116936
  • 492
  • 3
  • 21
-2
votes
1 answer

What are the possibilities of combining CUDA, OpenCL and OpenACC in the same program?

Each language offers its advantages and disadvantages, but what advantages does it offer to combine them all?
D V
  • 11
-2
votes
1 answer

zero output when OpenACC is used

I use PGI community edition 17.10 to compile and run fallowing code. why the output is wrong when I add directives of OpenACC? may you if help me why it's happen? Thanks in advance, sajad #include #include #include…
sajad
  • 15
  • 2
-2
votes
1 answer

openacc - discrepancies between ta=multicore and ta=nvidia compilation

I have a code that is written in OpenMP originally. Now, I want to migrate it into OpenACC. Consider following: 1- First of all, OpenMP's output result is considered as final result and OpenACC output should follow them. 2- Secondly, there are 2…
mgNobody
  • 738
  • 7
  • 23
-2
votes
1 answer

Using OpenACC to set the value of a variable in device memory

Why does the following code not allow me to set var to 10 via the function intfun? #include void intfun(int * variable){ #pragma acc parallel deviceptr(variable) num_gangs(1) num_workers(1) { *variable = 10; } } int…
lodhb
  • 929
  • 2
  • 12
  • 29
1 2 3
26
27