Closed JeroenMulkers closed 5 years ago
Running go test -vet=off -v github.com/mumax/3/cuda with go version 1.10 or higher yields the error message below. Consequently, the git commit hook, which runs all tests, fails as well.
go test -vet=off -v github.com/mumax/3/cuda
=== RUN TestBuffer --- PASS: TestBuffer (0.18s) === RUN TestReduceSum --- FAIL: TestReduceSum (0.00s) panic: CUDA_ERROR_INVALID_CONTEXT [recovered] panic: CUDA_ERROR_INVALID_CONTEXT [recovered] panic: CUDA_ERROR_INVALID_CONTEXT goroutine 6 [running]: testing.tRunner.func1(0xc4200ce1e0) /home/jmulkers/.gvm/gos/go1.10/src/testing/testing.go:742 +0x29d panic(0x53a8c0, 0xc420018418) /home/jmulkers/.gvm/gos/go1.10/src/runtime/panic.go:505 +0x229 github.com/mumax/3/cuda.MemAlloc.func1() /home/jmulkers/GO/src/github.com/mumax/3/cuda/alloc.go:19 +0xb3 panic(0x53a8c0, 0xc420018418) /home/jmulkers/.gvm/gos/go1.10/src/runtime/panic.go:505 +0x229 github.com/mumax/3/cuda/cu.MemAlloc(0xfa0, 0x79f378) /home/jmulkers/GO/src/github.com/mumax/3/cuda/cu/memory.go:20 +0xa5 github.com/mumax/3/cuda.MemAlloc(0xfa0, 0x0) /home/jmulkers/GO/src/github.com/mumax/3/cuda/alloc.go:22 +0x50 github.com/mumax/3/cuda.newSlice(0x1, 0x1, 0x1, 0x3e8, 0x79f380, 0x302, 0xc42000e0c8) /home/jmulkers/GO/src/github.com/mumax/3/cuda/slice.go:29 +0x194 github.com/mumax/3/cuda.NewSlice(0x1, 0x1, 0x1, 0x3e8, 0x1) /home/jmulkers/GO/src/github.com/mumax/3/cuda/slice.go:15 +0x50 github.com/mumax/3/cuda.toGPU(0xc420210000, 0x3e8, 0x3e8, 0xc420210000) /home/jmulkers/GO/src/github.com/mumax/3/cuda/reduce_test.go:38 +0xe0 github.com/mumax/3/cuda.initTest() /home/jmulkers/GO/src/github.com/mumax/3/cuda/reduce_test.go:24 +0x9b github.com/mumax/3/cuda.TestReduceSum(0xc4200ce1e0) /home/jmulkers/GO/src/github.com/mumax/3/cuda/reduce_test.go:44 +0x26 testing.tRunner(0xc4200ce1e0, 0x79f3c0) /home/jmulkers/.gvm/gos/go1.10/src/testing/testing.go:777 +0xd0 created by testing.(*T).Run /home/jmulkers/.gvm/gos/go1.10/src/testing/testing.go:824 +0x2e0 exit status 2 FAIL github.com/mumax/3/cuda 0.223s
Solved in 71b10164a00c3106e2e878ece173cb0e7e07346a
Running
go test -vet=off -v github.com/mumax/3/cuda
with go version 1.10 or higher yields the error message below. Consequently, the git commit hook, which runs all tests, fails as well.