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
Windows install issue: corecrt.h not found #80
Comments
You'd need to add it as an include path via |
So adding C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ucrt\ to my path via -I or just in my system variables didn't do the trick. After some google searches and reading, I realized that Microsoft created this "universal directory," which contains the corecrt.h file in the Visual 2015 release. So after too much frustration I just went and got the Visual 2013 release, which still has the corecrt.h file in the VC/INCLUDE directory. So I got passed all that. I can successfully run "nvcc -c -O -o cudamat.obj cudamat.cu", and for that matter, I can now successfully run the setup.py file in the cudamat directory. But once I've run the setup file, and I try to import cudamat, I get a "%1 is not a valid win32 operation". I've tried installing cudamat with the setup.py file, and then I tried the directions provided in #57. With both methods I ultimately complete the setups seemingly successfully, but when I try to import cudamat, I get that same "%1 is not a valid win32...". I don't have the exact wording of the error text as I'm not at my desktop. I can provide it later this evening if it will help. I can obviously also provide the exact python code that is failing on the "import cudamat" call if that will help. Really, i should just open a new issue as the above one is "fixed/worked around". I can do that if you prefer? |
This looks like you're compiling with 64 bits for 32-bit Python, or vice versa. This won't help you, but if you're at it, I'd be interested if you can also get it to compile with #79.
It's okay, there's a ton of Windows installation issues already. Let's just continue discussing here. |
Thanks. I'll check how I'm compiling vs which python (bit) version I'm running this evening and update here. Does cudamat work fine with both 32-bit and 64-bit python? I'll also attempt #79. |
I've only used it with 64-bit, but I assume it would work if you don't mix them up :) |
Just got it working! I had previously switched my python interpreter to a 32-bit version when I was trouble shooting something else. I never changed it back, so when I finally got cudamat compiled, it was in a 64-bit form and my python interpreter was 32-bit. I uninstalled 32-bit python and put the 64-bit version back in. Then I ran the setup.py file, which compiled cudamat with no issues, and ran the test script from the readme file. All good. (Separately, I then uninstalled cudamat and tried out #79, which also worked without any issues, and I left a comment on #79 to that effect). I'll admit that it took me 15+ hours to get cudamat installed and running. I came across many of the same issues previously noted in various posts, but some of the posts leave you hanging...wondering what ultimately resolved the issue referenced. Tomorrow when I get some time, I'll recap the various issues and error messages I got, what caused each, and what to do to rectify the issue in layman's terms, which I think will be helpful to others like myself. thanks again! |
It seems two working days is typical to get CUDA to run in Windows along with Python. There are just too many options for the Python distribution and compiler version.
Where do you plan to put this? We could add an installation guide to the wiki, similar to what I did for Lasagne: https://github.com/Lasagne/Lasagne/wiki/From-Zero-to-Lasagne |
Sorry for the delay in getting back to this, but replicating my errors and error messages at my various steps throughout this process seemed more onerous once I attempted the process than I initially thought. What I feel would be the most helpful for new users is for there to be a straightforward "cudamat install friendly" environment outlined here. Just something to get cudamat up and running that will allow you to play around with it and get familiar (which is all I was looking for). If you find cudamat useful, and you have a different environment you ultimately need to install cudamat in, you can tackle that in another post. My primary issue is that Microsoft Visual Studio 2015 release created the "universal CRT" (see post https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/). The cudamat "setup.py install" fails every time with something like... C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/../../VC/INCLUDE\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory Then when you change around your path variable to look here... But enough of that...the following software environment should get cudamat up and running on a Windows 10 box. Windows 10 path variables: command line navigate to your cudamat-master directory where the setup.py file is found and execute the setup. something like... This environment with these path variables (and no conflicting path variables) should work. *command line run "nvcc -V" If you don't get version information, you either don't have the CUDA toolkit installed or you're missing the path variable to \CUDA\v8.0\bin *run the following in python27 *Once you think you've got cudamat successfully installed, run the "readme file" python test script. I'll check back to this post to see if anyone using this environment posts any error messages. I'll likely have seen them myself and can hopefully help out. thanks again. |
I can imagine that! It will still be very helpful that you posted the error message verbatim and provided one way of getting it to work. This should be easy to find for people from the future running into the same error. Thank you! |
Wait, did you really use Visual Studio Express 2013 you linked to? From what I wrote for Lasagne, it seems the Express editions do not include a 64-bit compiler, so I recommended Microsoft Windows SDK for Windows 7 and .NET Framework 4 instead (this also seems to work for Windows 10). |
My apologies for the late reply...I kept meaning to reply to your comment, but just hadn't yet. Yes I, in fact, do have Windows SDK installed. I haven't had to re-install cudamat on any new boxes yet. Though I likely will be doing so in the next month or so. It'll be a brand new box, and I'll take detailed notes as to each piece of software I have installed when attempting to get cudamat up and running. It'll be one of the first few items I install. |
Cool! Looking forward to your notes. |
Windows 10
Python 2.7
CUDA toolkit 8
MS Visual 14 with c++ compiler
I was attempting to get #57 "solution" to work, but when I run from the cudamat.cu dir the following...
nvcc -c -O -o cudamat.obj cudamat.cu
I get the following error...
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/../../VC/INCLUDE\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
It turns out that corecrt.h is found in...
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ucrt\
I added that directory to my path variable, but I still get the same error...
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/../../VC/INCLUDE\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
The text was updated successfully, but these errors were encountered: