openacc | Introduction to OpenACC | Learning library

 by   csc-training C Version: 2017-12 License: MIT

kandi X-RAY | openacc Summary

kandi X-RAY | openacc Summary

openacc is a C library typically used in Tutorial, Learning applications. openacc has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This repository containes the exercises and other course material used in CSC's GPU Programming with OpenACC courses. The exercises and instructions for running them are described in this document.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              openacc has a low active ecosystem.
              It has 19 star(s) with 13 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 3 have been closed. On average issues are closed in 908 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of openacc is 2017-12

            kandi-Quality Quality

              openacc has no bugs reported.

            kandi-Security Security

              openacc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              openacc is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              openacc releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of openacc
            Get all kandi verified functions for this library.

            openacc Key Features

            No Key Features are available at this moment for openacc.

            openacc Examples and Code Snippets

            No Code Snippets are available at this moment for openacc.

            Community Discussions

            QUESTION

            Is there a faster argmin/argmax implementation in OpenACC?
            Asked 2021-Jun-10 at 16:53

            Is there a faster alternative for computing the argmin in OpenACC, than splitting the work in a minimum-reduction loop and another loop to actually find the index of the minimum?

            This looks very wasteful:

            ...

            ANSWER

            Answered 2021-Jun-10 at 16:53

            We've gotten requests for minloc/maxloc but it's difficult and would most likely not be performant, so not something that's been added. The method you're using is the recommended solution for this.

            Source https://stackoverflow.com/questions/67912346

            QUESTION

            Can one have a mixed makefile with .c and and .cu files? if so, how?
            Asked 2021-May-13 at 14:17

            I currently have a makefile that is coded to compile OpenACC and I was wondering if I can make it support .cu as well

            My current makefle:

            ...

            ANSWER

            Answered 2021-May-13 at 14:17

            Please find below code by which you can use in the same makefile which will compile all files (.c and .cu) .

            Source https://stackoverflow.com/questions/67515429

            QUESTION

            OpenACC nvlink undefined reference to class
            Asked 2021-May-10 at 15:52

            I am new to OpenACC and I am writing a new program from scratch (I have a fairly good idea what loops will be computationally costly from working in a similar problem before). I am getting an "Undefined reference" from nvlink. From my research, I found this is because no device code is being generated for the class I created. However, I don't understand why this is happening and how to fix it.

            Below I send a MWE from my code.

            include/vec1.h

            ...

            ANSWER

            Answered 2021-May-10 at 15:52

            The problem here is that you're trying to call a device routine, "Vec1::operator*", that's contained in a shared object from a kernel in the main program. nvc++'s OpenACC implementation uses CUDA to target NVIDIA devices. Since CUDA doesn't have a dynamic linker for device code, at least not yet, this isn't supported.

            You'll need to either link this statically, or move the "parallel loop" into the shared object.

            Note that the "-ta" flag has been deprecated. Please consider using "-acc -gpu=cuda11.2" instead.

            Source https://stackoverflow.com/questions/67458745

            QUESTION

            Getting a Java error message saying java.util.NoSuchElementException
            Asked 2021-Apr-09 at 06:46

            I'm working on a Bank assignment that is supposed to output a menu and allow user input to select what they want to do. The program is to loop and receive user input until the user enters "Q" for quit. After I loop once, there is an error message popping up saying java.util.NoSuchElementException.

            Here is my code:

            Bank.java

            ...

            ANSWER

            Answered 2021-Apr-09 at 06:46

            The problem is that you close the scanner in the openAcc method. You should close only at the quitting from the program.

            Source https://stackoverflow.com/questions/67015597

            QUESTION

            Some questions about acc routine
            Asked 2021-Apr-06 at 16:02

            One MPI code, I am trying to parallelize a simple loop of it with openacc,and the output is not expected. Here, the loop has a call and I add a 'acc routine seq' in the subroutine. If I manually make this call inline and delete the subroutine, the result will be right. Do I use the OpenACC "routine" directive correctly? or other wrong?

            • Runtime environment

            MPI version: openmpi4.0.5
            HPC SDK 20.11
            CUDA Version: 10.2

            ...

            ANSWER

            Answered 2021-Apr-06 at 16:02

            The problem is with "i" being passed by reference (default with Fortran). Simplest solution is to pass it by value:

            Source https://stackoverflow.com/questions/66962190

            QUESTION

            Disabling OpenACC implicit pragma generation with pgc++ compiler
            Asked 2021-Jan-04 at 21:57

            I'm using the pgc++ compiler on some C++ code that uses OpenACC directives, and I was wondering if there is a compiler option to disable implicit pragma generation that is performed when compiling code if the user leaves the required pragmas out. For example, when compiling my own code with the -Minfo=accel flag, I see the following messages appear:

            ...

            ANSWER

            Answered 2021-Jan-04 at 17:52

            This is the default behavior as defined by the OpenACC standard when a user does not use data clauses on a compute construct (parallel/kernels). A runtime check is performed and if the data is already present on the device, no action is performed. If the data is not on the device, then the data is copied.

            You can add these variables to data clauses individually, or add a "default(present)" clause to your compute construct so all shared data will presumed to be present on the device. If the data is not present, then a runtime error will occur.

            Source https://stackoverflow.com/questions/65555483

            QUESTION

            Obtain OpenACC free (or total) device memory
            Asked 2020-Dec-19 at 03:03

            I have a GPU code that, at each iteration, decides if the iteration can be offloaded to the accelerator. OpenACC come to be the best tool:

            ...

            ANSWER

            Answered 2020-Dec-19 at 03:03

            See section "3.2.6 acc get property" section of the OpenACC standard. In particular the "acc_property_free_memory" property.

            https://www.openacc.org/sites/default/files/inline-images/Specification/OpenACC-3.1-final.pdf

            Source https://stackoverflow.com/questions/65364622

            QUESTION

            Are there any computer viruses that affect gpus?
            Asked 2020-Dec-17 at 00:41

            Recent developments in gpus (the past few generations) allow them to be programmed. Languages like Cuda, openCL, openACC are specific to this hardware. In addition, certain games allow programming shaders which function in the rendering of images in the graphics pipeline. Just as code intended for a cpu can cause unintended execution resulting a vulnerability, I wonder if a game or other code intended for a gpu can result in a vulnerability.

            ...

            ANSWER

            Answered 2020-Dec-17 at 00:41

            The benefit a hacker would get from targeting the GPU is "free" computing power without having to deal with the energy cost. The only practical scenario here is crypto-miner viruses, see this article for example. I don't know details on how they operate, but the idea is to use the GPU to mine crypto-currencies in the background, since GPUs are much more efficient than CPUs at this. These viruses will cause substential energy consumption if unnoticed.

            Regarding an application running on the GPU causing/using a vulnerability, the use-cases here are rather limited since security-relevant data usually is not processed on GPUs. At most you could deliberately make the graphics driver crash and this way sabotage other programs from being properly executed. There already are plenty security mechanisms prohibiting reading other processes' VRAM etc., but there always is some way around.

            Source https://stackoverflow.com/questions/65331714

            QUESTION

            openacc error when assigning values to dynamically allocated struct member array of struct referenced by pointer
            Asked 2020-Dec-09 at 22:59

            I am trying to wrap my head around combining openacc with pointers to structs containing dynamically allocated members. The code below fails with

            Failing in Thread:1 call to cuStreamSynchronize returned error 700: Illegal address during kernel execution

            when compiled using nvc ("nvc 20.9-0 LLVM 64-bit target on x86-64 Linux -tp haswell"). As far as I can tell I am following the approach suggested eg in the OpenACC 'getting started' guide. But somehow presumably the pointers don't stick (?) on the device. Does anyone know what goes wrong here?

            ...

            ANSWER

            Answered 2020-Dec-09 at 22:59

            From the compiler feedback messages you'll see something like:

            Source https://stackoverflow.com/questions/65225827

            QUESTION

            Why does gcc-10 fail to link with error "error: array section is not contiguous in ‘map’ clause" in 2D array openacc application?
            Asked 2020-Dec-07 at 18:44

            I am trying to compile a basic openacc program in C, using gcc-10. It works fine for one-dimensional arrays, and arrays allocated through "A[N_x][N_y]" but when trying a 2D array allocated using malloc, either contiguous or not, I get an error message upon compiling. The example below fails:

            ...

            ANSWER

            Answered 2020-Dec-07 at 18:44

            The code is fine, but I don't believe GNU supports non-contiguous data segments. I'll need to defer the GNU folks but do believe that they are developing this support in future versions of the compilers.

            For now, you'll need to either switch to using the NVIDIA HPC Compiler (https://developer.nvidia.com/hpc-sdk) or refactor the code to use a single dimension array of size N_x*N_y with a computed index. Something like:

            Source https://stackoverflow.com/questions/65173987

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install openacc

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/csc-training/openacc.git

          • CLI

            gh repo clone csc-training/openacc

          • sshUrl

            git@github.com:csc-training/openacc.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link