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
1
vote
1 answer

How to enable CUDA Aware OpenMPI?

I'm using OpenMPI and I need to enable CUDA aware MPI. Together with MPI I'm using OpenACC with the hpc_sdk software. Following https://www.open-mpi.org/faq/?category=buildcuda I downloaded and installed UCX (not gdrcopy, I haven't managed to…
Steve
  • 89
  • 1
  • 6
1
vote
2 answers

(OpenACC) pool allocator: Specified pool size too big for this device Current file

I'm getting this error every time I try to run the application though it compile well: pool allocator: Specified pool size too big for this device Current file: /home/marco/Desktop/tools.c function: PTC3D line: 330 This file was compiled:…
Steve
  • 89
  • 1
  • 6
1
vote
1 answer

Using the routine directive on a Fortran90 intrinsic

I have given OpenAcc access to the subroutine called "lang_force", and within that subroutine I call the Fortran90 intrinsic RANDOM_NUMBER(). subroutine lang_force(damp, temp, noise) !$acc routine(lang_force) implicit none double precision,…
shan1224
  • 11
  • 1
1
vote
0 answers

Disrepancy in results between OpenMP/OpenACC implementation and gcc/PGI compilers

I have a larger Fortran program that I am trying to convert so that the computationally intensive part will run on an NVidia GPU using OpenMP and/or OpenACC. During development I had some issues to understand how variables declared in a module can…
1
vote
1 answer

Calling OpenACC code from Rust does not run on GPU

Update 09/07/2020 I'm adding a small example for this at https://gitlab.com/lisanhu2016/rust-openacc-example.git It's a public repository with a README, you should be able to try the example there. The libraries I have been linking to are: nvc,…
Sanhu Li
  • 402
  • 5
  • 11
1
vote
1 answer

C++ Matrix Multiply Slower OpenACC

When I enable OpenACC during compilation using GCC, is there a reason why my code is slower? I'm currently using GCC 6.3.0, on Windows 10. I'm really unsure why this is happening. This is the command I'm compiling with: g++ -fopenacc -o a…
newang
  • 179
  • 2
  • 2
  • 7
1
vote
1 answer

How to use OpenACC on 2D subvector in C++ or OpenCV SubMatrix?

I have the following code int main(int argc, char** argv ) { std::cout<<"running Lenna..\n"; cv::Mat mat = imread("lena.bmp", cv::IMREAD_GRAYSCALE ); //convert to vec std::vector BWvec; BWvec.assign((double*)mat.data,…
user5739619
  • 1,748
  • 5
  • 26
  • 40
1
vote
0 answers

OpenACC: Issues with ATOMIC directive

I've never used an atomic directive before and I cannot find answers on the documentation. Every time I try to use it in this loop I get an error of the type: PGCC-S-0155-Invalid atomic expression PGCC-S-0155-Invalid atomic…
Smoden
  • 21
  • 3
1
vote
2 answers

Can I use OpenACC for multi-core CPU?

I want to use OpenACC for parallelization of multi-core CPU. I know that it is possible to use CPU as host and GPU as device for execution of target region, But I want to set CPU cores(or two separate CPU) for host and target device…
mahdi Lotfi
  • 316
  • 3
  • 13
1
vote
0 answers

serial construct in openacc, fortran

I have the following serial part of a FORTRAN code which should be executed sequentially. c$acc serial nppn1=0 c do 1200 ippas=1,50 c nppn0=nppn1+1 nppn1=lppas(ippas) c c -----did we complete the passes ? c …
Alejandro
  • 11
  • 2
1
vote
1 answer

How to directly (not using a pointer as a function parameter) access arrays on GPU in OpenAcc compute regions?

I have the following simple piece of code, consisting of 4 files: //Data.h: #ifndef DATA_H #define DATA_H constexpr int N=10000000; namespace data{ float particles[N]; float outputArray[N]; } #endif //Process.h: #ifndef PROCESS_H #define…
And
  • 310
  • 1
  • 12
1
vote
2 answers

difference between kernels and parallel directives in OpenAcc standard

I have already been using the PGI compiler supporting OpenAcc for launching the code on GPU for about 3 years, but i can not understand the difference between the terms "kernels" and "parallel" so far. I read in OpenAcc Getting Started…
And
  • 310
  • 1
  • 12
1
vote
1 answer

Why isn't the OpenACC tutorial code executing on the GPU?

I'm trying to run the OpenACC tutorial at https://gcc.gnu.org/wiki/OpenACC#OpenACC_kernels_Construct_Optimization_Tutorial The compiler is g++ 9.2 64-bit as part of the MSYS MINGW64 package. C:\Users\TJ\Documents\GpuDemo>where…
TJH
  • 97
  • 1
  • 2
  • 10
1
vote
1 answer

OpenACC on Intel built-in graphics cards (Intel Iris Plus Graphics 655)

I would like to find out, whether built-in Intel graphics cards (e.g. Intel Iris Plus Graphics 655) support OpenACC directives? Would anyone be able to direct me to any relevant information?
mabalenk
  • 887
  • 1
  • 8
  • 17
1
vote
1 answer

openacc declare issue with pow function in C++ within acc compute region

I'm trying to use openACC to accelerate some of my code. One portion of the code used pow() function from standard library. However there is an error during compilation PGCC-S-0155-Procedures called in a compute region must have acc routine…
Coconut
  • 184
  • 1
  • 15