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
2
votes
0 answers

best way to mix OpenACC with OpenMP

I have a code which is mainly developed using OpenACC, I would like to compare P100 results with OpenACC to Intel's KNL nodes using OpenMP, I tried using the compiler flag -ta=multi_core but it basically serialized all the loops (as per -acc info).…
JimBamFeng
  • 709
  • 1
  • 4
  • 20
2
votes
0 answers

Is there any method for install the NVPTX on MSYS2 for mingw64 offload to GPU in Win7?

I search a lot for the answer above. All the methods were proposed for Linux. The mingw-gcc 64-bit indeed supports the openACC. I can call the runtime API of openACC in the qtcreator. However, when I…
Y. Tang
  • 21
  • 3
2
votes
0 answers

OpenACC result changing with size

I am trying to parallelize a c++ code that uses several arrays with the same size. I have a "host version" which is not parallel and a "pragma version" which contains pragmas. With small size, the values of both versions (host and pragma) are the…
sébastien
  • 21
  • 2
2
votes
2 answers

Speed of Pascal CUDA8 1080Ti unified memory

Thanks to the answers here yesterday, I think I now have a correct basic test of unified memory using Pascal 1080Ti. It allocates a 50GB single dimension array and adds it up. If I understand correctly, it should be memory bound since this test is…
Matt Dowle
  • 58,872
  • 22
  • 166
  • 224
2
votes
1 answer

Updating directives OpenACC

When I have a kernel on the top loop, Why I can't use these 2 directives: #pragma acc update device(hbias[0:n_hidden],W[0:n_hidden][0:n_visible]) #pragma acc update device(vbias[0:n_visible) I need to update these variables hbias, vbias, W in…
2
votes
0 answers

Problems with GCC7 (trunk) OpenACC offloading (nvptx)

I have been trying to use gcc (trunk version) offloading but so far I am failing to do so. I compiled gcc following the instructions for OpenACC offloading with nvidia from this site: https://gcc.gnu.org/wiki/Offloading I also compiled the host…
AstrOne
  • 3,569
  • 7
  • 32
  • 54
2
votes
2 answers

Using F2Py with OpenACC gives import error in Python

I am writing a simple test code to see how I could wrap a fortran code containing openacc regions and call from python. Here's the code. module test use iso_c_binding, only: sp => C_FLOAT, dp => C_DOUBLE, i8 => C_INT implicit none contains …
Vikram
  • 308
  • 1
  • 5
2
votes
2 answers

OpenAcc for Windows

Using Visual Studio I am able to build and execute C++ code that uses CUDA on my workstation equipped with a geforce gtx 560 ti GPU. I have also downloaded the OpenACC toolkit from NVIDIA Developer website, and I want to install it for my Windows…
navmendoza
  • 21
  • 1
  • 5
2
votes
1 answer

Use atomic functions in OpenACC

I want to use atomic functions with OpenACC directives. What are the compile options of pgc++ that can help? Should I use a particular header file?
2
votes
1 answer

OpenACC and object oriented C++

I am trying to write a object oriented C++ code that is parallelized with OpenACC. I was able to find some stackoverflow questions and GTC talks on OpenACC, but I could not find some real world examples of object oriented code. In this question an…
dwn
  • 413
  • 3
  • 12
2
votes
1 answer

gcc - openacc - Compiled program does not function properly

Recently, there have been some efforts in GCC community to support OpenACC in their compiler. So, I wanted to try it out. Using this step-by-step tutorial (tutorial), which was close to the main documentation on GCC website, I was able to compile…
mgNobody
  • 738
  • 7
  • 23
2
votes
1 answer

What it takes to make OpenACC/OpenMP4.0 offloading to nvidia/mic work om GCC?

I am trying to understand how exactly I can use OpenACC to offload computation to my nvidia GPU on GCC 5.3. The more I google things the more confused I become. All the guides I find, they involve recompiling the entire gcc along with two libs…
AstrOne
  • 3,569
  • 7
  • 32
  • 54
2
votes
1 answer

c - Linking a PGI OpenACC-enabled library with gcc

Briefly speaking, my question relies in between compiling/building files (using libraries) with two different compilers while exploiting OpenACC constructs in source files. I have a C source file that has an OpenACC construct. It has only a simple…
mgNobody
  • 738
  • 7
  • 23
2
votes
1 answer

With an OpenACC loop, does each thread get private copies of scalars?

I have a pretty simple code fragment: $acc data copy(a(:),b(:)) $acc kernels $acc loop vector do i=1,1000 x = a(i) b(i) = sqrt(x) enddo $acc end kernels $acc end data And of course, I could dispense with x easily, but this is an example and x…
bob.sacamento
  • 6,283
  • 10
  • 56
  • 115
2
votes
1 answer

Bash script not installing python packages properly

I've been following this tutorial to install openacc locally on my jetson tk1 and I'm finding the install script to be incorrect. I didn't see any errors when I compiled the openacc library, however when I attempt to compile I get an error that says…
Zypps987
  • 404
  • 6
  • 21
1 2
3
26 27