Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvcc fatal : Unsupported gpu architecture 'compute_20' #28

Open
MoinFaraz opened this issue Oct 23, 2017 · 11 comments
Open

nvcc fatal : Unsupported gpu architecture 'compute_20' #28

MoinFaraz opened this issue Oct 23, 2017 · 11 comments

Comments

@MoinFaraz
Copy link

MoinFaraz commented Oct 23, 2017

I've got no issues in ./autogen.sh and ./configure
Only when I make, I get this error

`nvcc -g -O2 -I . -Xptxas "-abi=no -v" -gencode=arch=compute_20,code="sm_20,compute_20" -gencode=arch=compute_30,code="sm_30,compute_30" -gencode=arch=compute_35,code="sm_35,compute_35" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu

nvcc fatal : Unsupported gpu architecture 'compute_20'

Makefile:1155: recipe for target 'cryptonight/cryptonight.o' failed

make[2]: *** [cryptonight/cryptonight.o] Error 1

make[2]: Leaving directory '/home/faraz/Downloads/ccminer-cryptonight-0.17'

Makefile:729: recipe for target 'all-recursive' failed

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory '/home/faraz/Downloads/ccminer-cryptonight-0.17'

Makefile:399: recipe for target 'all' failed

make: *** [all] Error 2
`

@CyberMix
Copy link

I have the same problem.

@pingiun
Copy link

pingiun commented Nov 1, 2017

I was able to fix this by commenting and uncommenting some lines in my Makefile at line 395. I was able to compile with these lines:

#NVCC_GENCODE           = -gencode=arch=compute_35,code=\"sm_35,compute_35\"
NVCC_GENCODE            = -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\"
#NVCC_GENCODE = -gencode=arch=code=\"sm_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\"

@pingiun
Copy link

pingiun commented Nov 1, 2017

After more research I found that the newest cuda version (9.0) doesn't support compute_20 anymore. This means that you have two options, disable the compute_20 target or install cuda version 8.0. If your GPU supports newer compute architectures you should use the newest cuda version and disable compute_20.

@MoinFaraz
Copy link
Author

MoinFaraz commented Nov 1, 2017

@pingiun Unfortunately, that didn't work out for me. I'm now getting this error.

nvcc -g -O2 -I . -Xptxas "-abi=no -v" -gencode=arch=compute_30,code="sm_30,compute_30" -gencode=arch=compute_35,code="sm_35,compute_35" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
ptxas error : Invalid value 'no' for option -abi.
ptxas warning : Too big maxrregcount value specified 80, will be ignored
ptxas fatal : Ptx assembly aborted due to errors
Makefile:1155: recipe for target 'cryptonight/cryptonight.o' failed
make[2]: *** [cryptonight/cryptonight.o] Error 255
make[2]: Leaving directory '/home/faraz/Downloads/ccminer-cryptonight-0.17'
Makefile:729: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/faraz/Downloads/ccminer-cryptonight-0.17'
Makefile:399: recipe for target 'all' failed
make: *** [all] Error 2

@pingiun
Copy link

pingiun commented Nov 1, 2017 via email

@MoinFaraz
Copy link
Author

I've removed "-abi=no -v" from makefile, ran make again. Got this error:

ptxas fatal : Unknown option 'gencode'
Makefile:1155: recipe for target 'cryptonight/cryptonight.o' failed
make[2]: *** [cryptonight/cryptonight.o] Error 255
make[2]: Leaving directory '/home/faraz/Downloads/ccminer-cryptonight-0.17'
Makefile:729: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/faraz/Downloads/ccminer-cryptonight-0.17'
Makefile:399: recipe for target 'all' failed
make: *** [all] Error 2

@pingiun
Copy link

pingiun commented Nov 1, 2017 via email

@codejkn3
Copy link

codejkn3 commented Dec 4, 2017

Leave the "-v", that worked for me:

-Xptxas "-v" $(NVCC_GENCODE) --maxrregcount=80 .........

@unRARed
Copy link

unRARed commented Dec 5, 2017

Just in case it helps someone, combo of both @pingiun suggestions got it compiling successfully on my machine (16.04 w/ GTX 780). In Makefile replace NVCC_GENCODE block with :

NVCC_GENCODE = -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\"

and remove -abi=no (preserve the -v).

@shermanowen
Copy link

shermanowen commented Jan 4, 2018

in the file Makefile.am find each line that contains
$(NVCC) $(JANSSON_INCLUDES) -I. @CUDA_INCLUDES@ @CUDA_CFLAGS@ -gencode=arch=compute_20,code="sm_21,compute_20" -o $@ -c $<
or
$(NVCC) $(nvcc_FLAGS) -gencode=arch=compute_35,code="sm_35,compute_35" -o $@ -c $<

after salsa_kernel.cu and replace the whole line with

$(NVCC) $(nvcc_FLAGS) --maxrregcount=64 -o $@ -c $<

I don't know how this got left in but it allow a clean compile.

then run
./autogen.sh
./build.sh

@prajshr
Copy link

prajshr commented Feb 5, 2018

Still getting this error,

make all-recursive
make[1]: Entering directory '/root/downloads/ccminer-cryptonight'
Making all in compat
make[2]: Entering directory '/root/downloads/ccminer-cryptonight/compat'
Making all in jansson
make[3]: Entering directory '/root/downloads/ccminer-cryptonight/compat/jansson'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/downloads/ccminer-cryptonight/compat/jansson'
make[3]: Entering directory '/root/downloads/ccminer-cryptonight/compat'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/downloads/ccminer-cryptonight/compat'
make[2]: Leaving directory '/root/downloads/ccminer-cryptonight/compat'
make[2]: Entering directory '/root/downloads/ccminer-cryptonight'
nvcc -g -O2 -I . -Xptxas "-v" -gencode=arch=compute_30,code="sm_30,compute_30" -gencode=arch=compute_35,code="sm_35,compute_35" --maxrregcount=80 --ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
/bin/bash: nvcc: command not found
Makefile:1156: recipe for target 'cryptonight/cryptonight.o' failed
make[2]: *** [cryptonight/cryptonight.o] Error 127
make[2]: Leaving directory '/root/downloads/ccminer-cryptonight'
Makefile:730: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/downloads/ccminer-cryptonight'
Makefile:400: recipe for target 'all' failed
make: *** [all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants