-
Notifications
You must be signed in to change notification settings - Fork 14
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
Issues building on Windows #50
Comments
We would be happy to try and help you out. It looks like you are using Windows? Are you running this from within VSCode, as I know there can be issues locating a Fortran compiler from inside that environment. As a first step could you try adding the following flag to the call to CMake:
if this doesn't work please also try adding the following to the CMake command:
Also note that CMake can cache some files that cause issues if you change the configuration and rebuild, so I suggest removing the Finally could you also send us the list of commands you are running from the git clone through to the error? |
The info you provided is useful. Please can you try running using the normal CMakeLists.txt with:
You will need to replace ' I would also suggest adding: Let me know how you get on with this. |
Thank you for your response, I appreciate it. So, including When I run make, the c++.exe errors come up again. Could this have something to do with my installations? |
Yes, that has the same effect as specifying the prefix in the CMakeLists. So I'm not 100% sure, but I think that error may associated with CUDA which is part of the GPU infrastructure. Do you have a GPU on your system? If downloading to a virtual environment via pip I think this is: If this is what you already did please could you try downloading libtorch direct and linking to that? I think you can get it here: https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-2.1.0%2Bcpu.zip Let me know if you get anywhere! |
After looking a bit further it seems that pytorch isn't officially supported with minGW at the moment. https://stackoverflow.com/questions/76153651/why-is-pytorch-failing-to-build-with-mingw pytorch/pytorch#24460 (comment) If it's still not working do you have a different set of compilers/generators you can use? |
OK, that looks like an issue with ifort. Can you send the output of running CMake with the It would also be useful to send the contents of: Finally, can you check the version of Windows you are running (32 or 64 bit): https://support.microsoft.com/en-us/windows/which-version-of-windows-operating-system-am-i-running-628bec99-476a-2c13-5296-9dd081cdd808 |
OK, it looks like CMake expects you to supply the full path to a compiler as it seems you have not added added it to your I have looked on a windows installation and managed to build, so it's definitely possible.
Do these compilers/setup match yours? |
Okay - yes, that's the same setup I've got. |
I have added some Windows instructions to a branch here: https://github.com/Cambridge-ICCS/FTorch/tree/windows-build-instructions This changes the process a little and adds some notes for Windows, could you look at these and let me know how you get on? Once we have something correct we'll merge it into the main repo. |
First, could you try running cmake as you report is working, but then instead of
And send the output. If this fails please could you also try running cmake as you report is working, but then:
and send the output. After this if there are sill issues please try replacing line 68 of the CMakeLists file (
And try rerunning then send the output. |
Note from working on this - we should emphasise that in windows where filepaths etc can have spaces it is important to enclose command line arguments in quotes. |
Hi @jatkinson1000 @mondus, thanks for all your input. I think I have managed to successfully install it. Here are my steps (for Windows 10 VM):
|
Just in case it's helpful, I have no idea what I also needed to activate the torch environment even though I don't think it should be necessary. In theory you should be able to source intel compilers inside and anaconda cmd line but again I found this more difficult than activating conda inside of the intel cmd. |
Thanks @TomMelt That's great, thanks. Couple of follow-ups:
|
Yes, just change
Nope, not yet. Building libtorch is a different issue though. I used the pip version of torch. |
Presumably also change the command line flag to
No need to build libtorch - you should be able to get a binary. |
I have just completed a powershell aand cmd build using libtorch downloaded as a zip file using powershell
using cmd
|
Just to summarise our recent meeting.
|
Copied from an email chain with a user:
I hope it's alright that I'm reaching out. I've recently set up a framework to incorporate physics-informed, neural net-based, user material subroutines in Abaqus. The framework is quite simple and doesn't take full advantage of the neural net setup. I would be very interested in coupling the PyTorch models directly to Fortran, and so, I'd be very interested in exploring FTorch.
I had a quick question - I've been trying to install the library, but the CMake configuration fails to identify the Fortran compiler. I've tried:
With both, I get the following error:
It fails with the following output:
Would you be able to help me work this out? What am I missing here?
Thank you for taking the time, I truly appreciate it.
The text was updated successfully, but these errors were encountered: