I’ve copied some sample CUDA programs from the Portland Group website. I’ve tried compiling in command line mode and from Visual Fortran. Same error:
C:\saxpy.cuf: error F0155 : Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code
Can anyone offer and suggestions? I’m not particular about the sample program I would just like to get one working.
C:\saxpy.cuf: error F0155 : Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code
Can you add the “-Minfo” flag (Properties->Fortran->Diagnostics->Accelerator Information)?
My best guess given that everything fails to compile is that you selected “No” during installation when asked if you wish to install the CUDA Toolkit. Though, I can’t be sure without more information.
Thanks for your response.
I have re-installed at least 3 times. Each time I’ve asked for CUDA to be installed. “deviceQuery” and other apps show CUDA available. I’m guessing it must be my compiler set-up. I’m using PGF 13.7 in Windows 8 (64-bit).
I added -Minfo flag as requested but didn’t see any difference. Perhaps I’m not looking in the right place. Is more detailed information being provided somewhere else. I have no experience with the -Minfo flag.
Interestingly, I have absolutely no issue compiling and running regular f90 code through command line or Visual Studio. Any further advice?
Hi riskysp,
Can you please post the output from your command line compilation, with -Minfo added, as well as the compiler commands you are using?
Also, please run the utility “pgaccelinfo” and post the output.
Thanks,
Mat
Compile command -
pgf90 -Minfo saxpy.cuf
Output -
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (saxpy.cuf: 1)
PGF90/x86-64 Windows 13.7-0: compilation aborted.
Output from pgaccelinfo -
CUDA Driver Version: 5050
Device Number: 0
Device Name: Quadro 4000
Device Revision Number: 2.0
Global Memory Size: 2147483648
Number of Multiprocessors: 8
Number of Cores: 256
Concurrent Copy and Execution: Yes
Total Constant Memory: 65536
Total Shared Memory per Block: 49152
Registers per Block: 32768
Warp Size: 32
Maximum Threads per Block: 1024
Maximum Block Dimensions: 1024, 1024, 64
Maximum Grid Dimensions: 65535 x 65535 x 65535
Maximum Memory Pitch: 2147483647B
Texture Alignment: 512B
Clock Rate: 950 MHz
Execution Timeout: Yes
Integrated Device: No
Can Map Host Memory: Yes
Compute Mode: default
Concurrent Kernels: Yes
ECC Enabled: No
Memory Clock Rate: 1404 MHz
Memory Bus Width: 256 bits
L2 Cache Size: 524288 bytes
Max Threads Per SMP: 1536
Async Engines: 2
Unified Addressing: Yes
Current free memory: 1864290304
Upload time (4MB): 1870 microseconds ( 780 ms pinned)
Download time: 1880 microseconds ( 780 ms pinned)
Upload bandwidth: 2242 MB/sec (5377 MB/sec pinned)
Download bandwidth: 2231 MB/sec (5377 MB/sec pinned)
PGI Compiler Option: -ta=nvidia,cc20
The device info is fine. Let’s try adding the verbose flag (-v) and see everything the driver is doing.
pgf90 -v -Minfo saxpy.cuf
Mat,
I ran it with the -v flag added. Is there any way to capture the output of the compiler without typing it all out by hand?
When using the Cygwin bash shell, to redirect output to a file, the command is:
pgf90 -v -Minfo saxpy.cuf >& filename.txt
From the DOS cmd window, the command is:
pgf90 -v -Minfo saxpy.cuf > filename.txt 2>&1
You can also copy the contents of a command window by first right-mouse clicking on the top of the window. A drop-down box will appear. Select “Edit->Mark”. Select and highlight the text you wish to copy. Re-open the drop-down box and select “Edit->copy” to copy the text to the clipboard. You can then paste this in the PGI User Forum form. Next, highlight the text in the form and the select the “Quote” button above.
Hope this helps,
Mat
Thanks for the copy tip.
Here is the compiler output:
PGI Workstation 13.7 (64)
PGI$ pgf90 -v -Minfo saxpy.cuf
C:\PROGRA~1\PGI/win64/13.7/bin\pgf901.exe saxpy.cuf -opt 1 -nohpf -nostatic -qua
d -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58 0x10000 -x 124 0x1000 -x 12
0 0x80000000 -x 59 4 -x 124 0x400 -x 19 0x400000 -x 119 0x8800000 -tp sandybridg
e -x 57 0x7b0000 -x 58 0x78031040 -x 119 0x610400 -x 120 0x80000000 -x 59 4 -x 1
5 2 -x 49 0x100 -x 48 5376 -stdinc “C:\PROGRA~1\PGI/win64/13.7/include;C:/Progra
m Files/PGI/Microsoft Open Tools 11/include/sys;C:/Program Files/PGI/Microsoft O
pen Tools 11/include;C:/Program Files (x86)/Windows Kits/8.0/Include/shared;C:/P
rogram Files (x86)/Windows Kits/8.0/Include/um” -def _M_AMD64 -def _MT -def _WIN
32 -def __WIN32 -def WIN32 -def _WIN64 -def __WIN64 -def WIN64 -def x8
6_64 -def X86_64 -def __unaligned= -def _INTEGRAL_MAX_BITS=64 -def exten
sion= -def amd64 -def SSE -def MMX -def SSE2 -def SSE3 -de
f SSSE3 -def __PGI_TOOLS11 -def _CUDA -ccff -freeform -x 137 1 -x 180 0x4000
000 -x 189 8 -x 176 0x140000 -x 177 0x0202007f -vect 48 -y 54 1 -modexport C:\te
mp\pgf903bLy4bVh0Pf99E.cmod -modindex C:\temp\pgf904cny4bNf1EJ6_r.cmdx -output C
:\temp\pgf902a9y4b3a0qGO9N.ilm
0 inform, 0 warnings, 0 severes, 0 fatal for mathops
0 inform, 0 warnings, 0 severes, 0 fatal for saxpy
0 inform, 0 warnings, 0 severes, 0 fatal for testsaxpy
PGF90/x86-64 Windows 13.7-0: compilation successful
C:\PROGRA~1\PGI/win64/13.7/bin\pgf902.exe C:\temp\pgf902a9y4b3a0qGO9N.ilm -fn sa
xpy.cuf -opt 1 -x 51 0x20 -x 120 0x80000000 -x 59 4 -x 19 0x400000 -x 28 0x40000
-x 119 0x4a10400 -x 122 0x40 -x 123 0x1000 -x 127 0x15 -x 129 0x10 -quad -y 80
0x1000 -x 80 0x10800000 -tp sandybridge -x 70 0x8000 -x 122 1 -x 125 0x20000 -x
120 0x1000 -x 124 0x400 -x 119 0x400000 -x 120 0x80 -y 15 2 -x 57 0x3b0000 -x 58
0x48000000 -x 15 2 -x 49 0x100 -astype 0 -x 137 1 -x 180 0x4000000 -x 189 8 -x
176 0x140000 -x 177 0x0202007f -x 124 1 -x 0 0x1000000 -x 2 0x100000 -x 0 0x2000
000 -x 161 0xcff7 -x 162 0xcff7 -cmdline “+pgf90 saxpy.cuf -v -Minfo” -asm C:\te
mp\pgf905d1y4bFY9VwRyq.s
0 inform, 0 warnings, 0 severes, 0 fatal for mathops
0 inform, 0 warnings, 0 severes, 0 fatal for saxpy
executing C:\PROGRA~1\PGI/win64/13.7/bin/pgnvd C:\temp\pgcudafor2auSBb8NEx03Bf.g
pu -computecap=10 -ptx C:\temp\pgcudafor4cuSBb8IWb1Or0.ptx -o C:\temp\pgcudafor5
d0SBbC60PvVEK.bin -4.2
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo message
s): Device compiler exited with error status code (saxpy.cuf: 1)
PGF90/x86-64 Windows 13.7-0: compilation aborted
pgf90-Fatal-f902 completed with exit code 1
Unlinking C:\temp\pgf902a9y4b3a0qGO9N.ilm
Unlinking C:\temp\pgf903bLy4bVh0Pf99E.cmod
Unlinking C:\temp\pgf904cny4bNf1EJ6_r.cmdx
Unlinking C:\temp\pgf905d1y4bFY9VwRyq.s
Ok, now to see if we can figure out why the device compiler is failing. Re-compile with “-v -Mcuda=keepgpu,cc20”. Next copy and paste the “C:\PROGRA~1\PGI/win64/13.7/bin/pgnvd” command line from the output and then add “-v” to get the verbose output from this driver. Note that you’ll need to put quotes around the DOS path names.
Here are the 2 runs requested:
First:
C:\tmp>pgfortran -v -Mcuda=keepgpu,cc20 saxpy.cuf
C:\PROGRA~1\PGI/win64/13.7/bin\pgf901.exe saxpy.cuf -opt 1 -nohpf -nostatic -quad -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58 0x10000 -x 124 0x1000 -x 12
0 0x80000000 -x 59 4 -x 124 0x400 -x 19 0x400000 -x 119 0x8800000 -tp sandybridge -x 57 0x7b0000 -x 58 0x78031040 -x 119 0x610400 -x 120 0x80000000 -x 59 4 -x 1
5 2 -x 49 0x100 -x 48 5376 -stdinc “C:\PROGRA~1\PGI/win64/13.7/include;C:/Program Files/PGI/Microsoft Open Tools 11/include/sys;C:/Program Files/PGI/Microsoft O
pen Tools 11/include;C:/Program Files (x86)/Windows Kits/8.0/Include/shared;C:/Program Files (x86)/Windows Kits/8.0/Include/um” -def _M_AMD64 -def _MT -def _WIN
32 -def __WIN32 -def WIN32 -def _WIN64 -def __WIN64 -def WIN64 -def x86_64 -def X86_64 -def __unaligned= -def _INTEGRAL_MAX_BITS=64 -def exten
sion= -def amd64 -def SSE -def MMX -def SSE2 -def SSE3 -def SSSE3 -def __PGI_TOOLS11 -def _CUDA -freeform -x 137 1 -x 180 0x4000000 -x
189 8 -x 176 0x140000 -x 177 0x0202007f -vect 48 -y 54 1 -x 137 1 -x 176 0x100-x 176 0x2100 -modexport C:\temp\pgfortran3bfCWpqnVcX8u.cmod -modindex C:\temp\p
gfortran4cTCWhsx-I3EA.cmdx -output C:\temp\pgfortran2aDCWxLOV7XcH.ilm
0 inform, 0 warnings, 0 severes, 0 fatal for mymodule
0 inform, 0 warnings, 0 severes, 0 fatal for saxpy
0 inform, 0 warnings, 0 severes, 0 fatal for main
PGF90/x86-64 Windows 13.7-0: compilation successful
C:\PROGRA~1\PGI/win64/13.7/bin\pgf902.exe C:\temp\pgfortran2aDCWxLOV7XcH.ilm -fn saxpy.cuf -opt 1 -x 51 0x20 -x 120 0x80000000 -x 59 4 -x 19 0x400000 -x 28 0x40
000 -x 119 0x4a10400 -x 122 0x40 -x 123 0x1000 -x 127 0x15 -x 129 0x10 -quad -y80 0x1000 -x 80 0x10800000 -tp sandybridge -x 70 0x8000 -x 122 1 -x 125 0x20000
-x 120 0x1000 -x 124 0x400 -x 119 0x400000 -x 120 0x80 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -x 15 2 -x 49 0x100 -astype 0 -x 137 1 -x 180 0x4000000 -x 189 8
-x 176 0x140000 -x 177 0x0202007f -x 124 1 -x 137 1 -x 180 0x4000000 -x 163 8 -x 176 0x140000 -x 177 0x0202007f -x 176 0x100 -x 176 0x2100 -x 189 8 -cmdline “+p
gfortran saxpy.cuf -v -Mcuda=keepgpu,cc20” -asm C:\temp\pgfortran5dvCW-IXeB-V7.s
0 inform, 0 warnings, 0 severes, 0 fatal for mymodule
0 inform, 0 warnings, 0 severes, 0 fatal for saxpy
executing C:\PROGRA~1\PGI/win64/13.7/bin/pgnvd saxpy.n001.gpu -computecap=20 -ptx C:\temp\pgcudafor2aaCLca7hbbXxZ.ptx -o C:\temp\pgcudafor3baCLcathQb5vU.bin -4.
2
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (saxpy.cuf: 1)
PGF90/x86-64 Windows 13.7-0: compilation aborted
pgfortran-Fatal-f902 completed with exit code 1
Unlinking C:\temp\pgfortran2aDCWxLOV7XcH.ilm
Unlinking C:\temp\pgfortran3bfCWpqnVcX8u.cmod
Unlinking C:\temp\pgfortran4cTCWhsx-I3EA.cmdx
Unlinking C:\temp\pgfortran5dvCW-IXeB-V7.s
Second:
C:\tmp>C:\PROGRA~1\PGI/win64/13.7/bin/pgnvd saxpy.n001.gpu -v -computecap=20 -ptx “C:\temp\pgcudafor2aaCLca7hbbXxZ.ptx” -o “C:\temp\pgcudafor3baCLcathQb5vU.bin”
-4.2
“C:/Program Files/PGI/Microsoft Open Tools 11/bin/amd64\cl.exe” -E -C -TP -nologo -D_DO_NOT_USE_NULLPTR_IN_STL saxpy.n001.gpu -D__CUDA_ARCH__=200 -D__PGI_M64 -I
C:\PROGRA~1\PGI\win64/2013/cuda/4.2/include -IC:\PROGRA~1\PGI\win64/2013/cuda/4.2/include/cudart -IC:\PROGRA~1\PGI\win64\13.7/include_acc -IC:\PROGRA~1\PGI\win6
4\13.7/include_acc/OT_11 “-IC:/Program Files/PGI/Microsoft Open Tools 11/include” “-IC:/Program Files (x86)/Windows Kits/8.0/Include/shared” “-IC:/Program Files
(x86)/Windows Kits/8.0/Include/um” -D__CUDACC__ -DCUDA_DOUBLE_MATH_FUNCTIONS -DCUDA_PREC_DIV -DCUDA_PREC_SQRT -D_USE_DECLSPECS_FOR_SAL -DV4_2 > C:\temp\pgnvd2a
wyAdcPqbtIO_.nv0 2> nul
pgnvd-Fatal-prepro1 completed with exit code 2
Unlinking C:\temp\pgnvd2awyAdcPqbtIO_.nv0
Getting closer though nothing diffinative yet. Next let try and capture why cl is failing to preprocess the file.
Either add “–keeptmp” to the pgnvd.exe command and then post the output from the “.nv0” file, or run the “cl.exe” directly but don’t redirect the output to a file.
Mat,
I am having trouble using the “—keeptmp” flag. Can you provide some guidance on it’s use?
Sorry, I was writting from memory. The correct spelling is “-keeptemp”.
Mat,
Thanks for your help to this point.
Out of curiosity and frustration, I spent over an hour removing every trace of NVIDIA, CUDA, PGI, etc. from my computer. I then reinstalled the latest versions of everything from drivers to compilers.
I am happy to say that all is working now. Programs compile and execute as they should.
Let’s consider this issue closed.
Thanks again and hope you will be around when I need advice in the future.
Out of curiosity and frustration, I spent over an hour removing every trace of NVIDIA, CUDA, PGI, etc. from my computer. I then reinstalled the latest versions of everything from drivers to compilers.
Applogies that you had to go through all that. I wish I knew the root cause.
Thanks again and hope you will be around when I need advice in the future.
I hope so to!