Nvc 21.1 man page says GPU auto-detected but not

The man page says -gpu should auto-detect the GPU(s) but nvc generates an error and lists the potential values of -gpu=V. I have to specify explicitly with -gpu=cc75 or whatever.

Correct. By default the compiler will attempt to detect which type of device is being used on the system where you’re compiling. If you’re cross-compiling for a different system, then you do need to specify the compute capability.

Are you compiling on the same system as you run the binary? If so, what’s the actual error you see? What’s the output from the utility “nvaccelinfo”? Nvaccelinfo will list the info about our device and is the same as what the compiler auto-detects.

Yes, native. nvaccelinfo detects the 2080s with cc=75. But nvc with -gpu just barfs the help output. See pierpaolo thread in slack openacc

$ nvc -O -acc -gpu 2.c
nvc-Error-Switch -gpu with unknown keyword 2.c
-gpu=cc35|cc50|cc60|cc62|cc70|cc72|cc75|cc80|ccall|cudaX.Y|fastmath|[no]flushz|[no]fma|keep|[no]lineinfo|llc|zeroinit|[no]autocollapse|deepcopy|loadcache:{L1|L2}|maxregcount:<n>|pinned|[no]rdc|safecache|[no]unroll|[no]managed|beta|autocompare|redundant
                    Select specific options for GPU code generation
    cc35            Compile for compute capability 3.5
    cc50            Compile for compute capability 5.0
    cc60            Compile for compute capability 6.0
    cc62            Compile for compute capability 6.2
    cc70            Compile for compute capability 7.0
    cc72            Compile for compute capability 7.2
    cc75            Compile for compute capability 7.5
    cc80            Compile for compute capability 8.0
...
 -gpu=option
              Use the following sub-options to tailor the compilation of
              target accelerator regions:

              ccXY
                  Generate code for a device with compute capability X.Y.
                  Multiple compute capabilities can be specified, and one
                  version will be generated for each. **By default, the compiler**
**                  will detect the compute capability for each installed GPU.**

The man page makes it sound like -gpu on its own will go away and detect my GPUs, but I may be misreading.

nvc-Error-Switch -gpu with unknown keyword 2.c

“-gpu” switch is expecting a sub-option so picking up the file name as the sub-option. To fix, remove the flag.

nvc -O -acc 2.c

That’s what I thought, but maybe the doc could be clearer?

Sure, I added a problem report, TPR #29577 and will see if we can clean this up.