decred / gominer

Go (golang) based GPU miner for Decred.
GNU General Public License v3.0
160 stars 80 forks source link

Run gominer on AWS EC2 instance (P2 or G2) with CUDA 8.0 #148

Closed Kmaschta closed 7 years ago

Kmaschta commented 7 years ago

I had this error while testing gominer on a g2.2xlarge EC2 instance. I successfuly installed CUDA 8.0 but:

13:16:08 2017-03-21 [INF] MAIN: Version 0.8.0-beta CUDA
13:16:08 2017-03-21 [INF] POOL: Using pool: stratum+tcp://dcr.suprnova.cc:2252
13:16:08 2017-03-21 [INF] POOL: Stratum difficulty set to 1
13:16:09 2017-03-21 [INF] MINR: 1 GPUs
panic: Unknown CUresult: 35

goroutine 52 [running, locked to thread]:
panic(0x8045e0, 0xc4204b00a0)
    /usr/lib/go/src/runtime/panic.go:500 +0x1a1
github.com/decred/gominer/vendor/github.com/barnex/cuda5/cu.DeviceReset()
    /home/jolan/go/src/github.com/decred/gominer/vendor/github.com/barnex/cuda5/cu/runtimeapi.go:23 +0x74
main.(*Device).runDevice(0xc420406000, 0x0, 0x0)
    /home/jolan/go/src/github.com/decred/gominer/cudevice.go:286 +0x131
main.(*Device).Run(0xc420406000)
    /home/jolan/go/src/github.com/decred/gominer/device.go:96 +0x2f
main.(*Miner).Run.func1(0xc420406000, 0xc42004acb0)
    /home/jolan/go/src/github.com/decred/gominer/miner.go:212 +0x2b
created by main.(*Miner).Run
    /home/jolan/go/src/github.com/decred/gominer/miner.go:215 +0x9d

It's pretty ununderstandable and I don't know what to do with it.

jolan commented 7 years ago

The CUDA library we're using can't reset your device:

https://github.com/barnex/cuda5/blob/master/cu/runtimeapi.go#L23

As far as I can tell, 'Unknown CUresult: 35' means 'CUDA driver version is insufficient for CUDA runtime version'. So you may have installed the CUDA 8.0 SDK but you have not updated the actual Nvidia drivers.

jolan commented 7 years ago

Closing -- I'm pretty sure I figured out the issue and there's been no response in 24h.

Kmaschta commented 7 years ago

Sorry! You are right, I had not the correct Nvidia driver but CUDA was up-to-date.

For more info if someone who read this is in trouble, here is how I fixed my issue:

Download the executable and run it on your server.

I have published a gist with my installation script, if it can help you: https://gist.github.com/Kmaschta/8de62ea5f73346a8f0c61b75fe36c93b

More info about EC2 GPU instances