one error when compile a openacc program

what’s the problem with this error:
PGC-W-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (c1.c: 23)

Hi watsonlee,

This message indicates that the compiler failed to create an accelerator region for some reason, the details of which can be obtained by adding the “-Minfo” flag.

Can you please post the command you are running as well as the full output, including the -Minfo flag?

The “c1” example output should looking something like:

$ make c1.exe
pgcc -o c1.exe c1.c -ta=nvidia -Minfo=accel -fast
main:
     41, Generating copyout(r[:n-1])
         Generating copyin(a[:n-1])
         Generating compute capability 1.0 binary
         Generating compute capability 2.0 binary
     43, Loop is parallelizable
         Accelerator kernel generated
         43, #pragma acc for parallel, vector(256) /* blockIdx.x threadIdx.x */
             CC 1.0 : 3 registers; 48 shared, 4 constant, 0 local memory bytes; 100% occupancy
             CC 2.0 : 10 registers; 4 shared, 60 constant, 0 local memory bytes; 100% occupancy
  • Mat

Hi Mat,

Thank you for your reply,and this is the full output:

root@linux:/home/lihuazeng/openacc# pgcc -o c1 c1.c -Minfo=accel -fast -ta=nvidia
NOTE: your trial license will expire in 11 days, 4.64 hours.
gcc: error trying to exec ‘cc1plus’: execvp: no such file or directory
PGC-W-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (c1.c: 23)
main:
23, Generating copyout(r[0:n-1])
Generating copyin(a[0:n-1])
25, Loop is parallelizable
Accelerator kernel generated
25, #pragma acc for parallel, vector(256) /* blockIdx.x threadIdx.x */
PGC/x86 Linux 12.4-0: compilation completed with warnings

Hi Wastonlee,

One of NVIDIA’s back-end tools currently uses g++ to preprocessing header file, so you need the GNU compilers installed on your system.

Are you running on Ubuntu? Is so, please run “sudo apt-get install build-essential” to get the necessary components.

  • Mat