python-deltasigma icon indicating copy to clipboard operation
python-deltasigma copied to clipboard

simple test work fine under windows10 with opencblas.

Open buaabyl opened this issue 5 years ago • 0 comments

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?

buaabyl avatar Oct 15 '19 19:10 buaabyl