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

compiling mxnet on windows #17

Open
elzKit opened this issue Sep 5, 2017 · 4 comments
Open

compiling mxnet on windows #17

elzKit opened this issue Sep 5, 2017 · 4 comments

Comments

@elzKit
Copy link

elzKit commented Sep 5, 2017

I am compiling my version mxnet on

  • Windows 10
  • Visual Studio 2015 Community Edition
  • python 2.7.12

I have used the source code from https://github.com/apache/incubator-mxnet
and follow the instructions from https://mxnet.incubator.apache.org/get_started/windows_setup.html. (That is, I use cmake to generate the solution file,etc)
The compilation is successful, and a DLL is produced. I install the python biding with python setup.py install. However, when I load such an installation, the mxnet library cannot be loaded


Python 2.7.12 |Anaconda 4.2.0 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

import mxnet as mx
Traceback (most recent call last):
File "", line 1, in
File "mxnet_init_.py", line 25, in
from .base import MXNetError
File "mxnet\base.py", line 110, in
_LIB = _load_lib()
File "mxnet\base.py", line 102, in load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "C:\Users\zawislae\AppData\Local\Continuum\Anaconda3\lib\ctypes_init
.py", line 362, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found


This basically could mean that some dependencies cannot be found. I've made my best to insure that all the dependencies are in path. It is enough to just repace the mxnet DLL that I have built with a pre-built DLL, and everything works as expected. [BTW I insist on using my version of DLL because I have to compile in some special operators for FCIS https://github.com/msracver/FCIS]

When I compare my installation with the pre-built version of mxnet from this site, I see that my version of the libary is much smaller.
my version size: 84 546 KB
pre-build version: 358 896 KB

So, it seems that the way I am building my version of mxnet is wrong. I have no clue why? Are there any other instructions to build mxnet on win?
Note that I am building with VS 2015. I've attempted to use VS 2013, but in this case, VS just crashes when I load the generated solution.
Any hints will be greatly appreciated.

@yajiedesign
Copy link
Owner

1.please use 2015,not 2013.
2.126 mean depend loss, use depend tool find it. http://www.dependencywalker.com/

@elzKit
Copy link
Author

elzKit commented Sep 5, 2017

Unfortunately, if I generate a solution with cmake for VS2013 and try to open it in my VS 2013, the Visual Studio is just crashing. I can open the same solution in VS2015 just fine.
I am using cmake with "Visual Studio 12 2013 wind64" and "use default native compilers" settings

@yajiedesign
Copy link
Owner

don't generate solution with VS2013 .generate VS2015 Win64 solution.the VS2013 is deprecated.

@elzKit
Copy link
Author

elzKit commented Sep 6, 2017 via email

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

2 participants