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

simple test work fine under windows10 with opencblas. #71

Open
buaabyl opened this issue Oct 15, 2019 · 0 comments
Open

simple test work fine under windows10 with opencblas. #71

buaabyl opened this issue Oct 15, 2019 · 0 comments

Comments

@buaabyl
Copy link

buaabyl commented Oct 15, 2019

I install mingw-w64 with gcc version 9.1.0 (Rev3, Built by MSYS2 project) and mingw-openblas.

Compile ok with this Makefile:

OPENBLAS 	= openblas
PYTHON_INC	= C:\Python36\include
PYTHON_LIB	= C:\Python36\Libs
NUMPY_INC	= C:\Python36\Lib\site-packages\numpy\core\include

CFLAGS	= /nologo \
		  /I $(PYTHON_INC) \
		  /I $(NUMPY_INC) \
		  /I $(OPENBLAS)/include 

LDFLAGS	= /nologo \
		  /libpath:$(PYTHON_LIB) \
		  /libpath:$(OPENBLAS)

all:
	cython -3 _simulateDSM_cblas.pyx 
	cl $(CFLAGS) /c \
		_simulateDSM_cblas.c 
	link $(LDFLAGS) /DLL \
		/out:_simulateDSM_cblas.pyd \
		_simulateDSM_cblas.obj \
		python36.lib libopenblas.lib
	rm _simulateDSM_cblas.obj _simulateDSM_cblas.exp _simulateDSM_cblas.lib

libopenblas.lib generated from gendef.exe

And I found that _simulateDSM.py ignore cblas extend pyd under windows:

try:
    if 'nt' in os.name:
        # if somebody actually goes through the trouble of compiling
        # it on Windows, we'll make available a patch to re-enable it.
        # In most cases now, users only get error messages from BLAS
        # not being available.
        raise ImportError('CBLAS extension disabled on Windows')

When I put all together, the extension works.

My question is: How to make sure this is correct?

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

1 participant