Closed Ravenwater closed 7 years ago
From a quick google search it looks like you have not installed the 64-bit MinGW compiler, but have installed the 64-bit Go compiler. This is described in https://golang.org/issue/3441.
Still haven't gotten a working cgo environment under Windows, but in the process of running
$ CGO_LDFLAGS="-lmkl_rt" go install github.com/gonum/blas/cgo
that seems to have installed the gonum/internal/asm tree that was prohibiting compilation.
Need to do more digging to discover how gonum dependencies and cgo integration is setup so I can use it with MKL. Am I missing some installation guide/explanation somewhere?
There is no setup guide for MKL on Windows.
Gonum has implemented blas and lapack in native Go, and for small-ish problems (n < 100), I've found Go is typically faster than calling into OpenBLAS. My point being, I usually do not use blas/cgo.
When I do use OpenBLAS, I clone it to ~/software/OpenBLAS
, and make
it. I then set CGO_LDFLAGS="-L/Users/brendan/software/OpenBLAS -lopenblas"
and it works fine.
I don't know what the appropriate translations are for mkl or windows, sorry.
When you do get it working, I'd be interested to see benchmarks if you're willing to run them to see how much behind MKL we are.
I'll sign up for that benchmark. To confirm, you would like to see the following comparisons?
Native Go BLAS <-> MKL Gonum w OpenBLAS <-> MKL
I tried to make OpenBLAS on cygwin and the makefile blows up. OpenBLAS suggests to use the binary distribution on Windows, so I do have that, but haven't found the mechanism yet to connect it to CGO.
I like benchmarking problems, so I'll continue to peel the onion....
FYI, you can see some benchmarks that compare Gonum with OpenBLAS and MKL in https://github.com/gonum/lapack/pull/193
What has gone wrong when you are greeted with that error?
tomtz@SW-LAPTOP-250 MINGW64 /C/Users/tomtz/dev $ CGO_LDFLAGS="-lmkl_rt" go install github.com/gonum/blas/cgo
github.com/gonum/blas/cgo
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in