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

Cannot install/use on windows 10 #35

Open
ruggieroguida opened this issue Jul 2, 2020 · 4 comments
Open

Cannot install/use on windows 10 #35

ruggieroguida opened this issue Jul 2, 2020 · 4 comments

Comments

@ruggieroguida
Copy link

Hi,

I am struggling to make numo-linalg (0.1.5) work in windows 10. I am using it successfully on macos. It is amazing BTW :-)

Notes:

  • I am using Msys2
  • I have installed numo-narray
  • I have installed openblas using pacman
  • I have also tried to compile it from source. Same results
  • I have installed lapack using pacman

libopenblas.a and liblapacke.a are both in C:\msys64\mingw64\lib so I install the gem with

gem install numo-linalg -- --with-openblas-dir=C:\msys64\mingw64\lib --with-lapack-lib=C:\msys64\mingw64\lib

The problem is that when I try default, level 1, 2 or 3, for example

require "numo/linalg/linalg"
Numo::Linalg::Loader.load_openblas "C:\\msys64\\mingw64\\lib"

I always get

RuntimeError: cannot find OpenBLAS library
from C:/Apps/rubies/Ruby22-x64/lib/ruby/gems/2.2.0/gems/numo-linalg-0.1.5/lib/numo/linalg/loader.rb:90:in `load_openblas' 

Any idea?
Thanks

@ruggieroguida ruggieroguida changed the title Cannot install on windows 10 Cannot install/use on windows 10 Jul 2, 2020
@yoshoku
Copy link
Contributor

yoshoku commented Jul 25, 2020

@Rojj I have succeeded in using the Numo::Linalg by not specifying the OpenBLAS library path. Please try that.

numo-linalg_msys

@ruggieroguida
Copy link
Author

Sorry, maybe it was not clear that I am using Ruby 2.2.4 (Unfortunately I cannot upgrade)

That was my first attempt. I also just tried on my work PC (Windows 10 and Ruby Installer 2.2.4). It installs without any error, but when I execute
require 'numo/linalg'
i get the following error

C:/Rubies/Ruby22-x64/lib/ruby/gems/2.2.0/gems/numo-linalg-0.1.5/lib/numo/linalg/loader.rb:162:in `load_library': cannot find backend library for Numo::Linalg (RuntimeError)
        from C:/Rubies/Ruby22-x64/lib/ruby/gems/2.2.0/gems/numo-linalg-0.1.5/lib/numo/linalg.rb:3:in `<top (required)>'
        from C:/Rubies/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from C:/Rubies/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/Rubies/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from linalg.rb:1:in `<main>'

Is there a minimum Ruby version?

@yoshoku
Copy link
Contributor

yoshoku commented Aug 1, 2020

I tried to load the libraries directly with Ruby Installer 2.6.6 as follows:

require 'numo/linalg/linalg'

Numo::Linalg::Blas.dlopen 'C:\msys64\mingw64\lib\libopenblas.dll.a'
Numo::Linalg::Lapack.dlopen 'C:\msys64\mingw64\lib\liblapacke.dll.a'

However, I obtained RuntimeError (Exec format error). This error is due to the system and architecture, not to the Numo::Linalg codes. So, it is difficult for me to investigate the cause of this error further.

I think that it is difficult to load OpenBLAS on Msys2 with Ruby installed by RubyInstaller.

@mrkn
Copy link
Contributor

mrkn commented Jul 15, 2021

@Rojj Could you try #42?

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

3 participants