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

Windows. #11

Open
dwerner95 opened this issue Nov 28, 2021 · 2 comments
Open

Windows. #11

dwerner95 opened this issue Nov 28, 2021 · 2 comments

Comments

@dwerner95
Copy link
Member

dwerner95 commented Nov 28, 2021

I successfully ran up4 on windows using the rust-standalone version.
One needs to install HDF5 (link) on windows and make sure that the bin folder is in PATH (which it should be automatically).

The main function in src/main.rs runs flawlessly and also plots the rotating drum (after some tweaks).

installing it in python works, however for some reason the HDF5-rust crate is not able to write a file.

pyo3_runtime.PanicException: Unable to create hdf5 File: Invalid file access property list id: 792633534417207322

@DanW97 can you try to reproduce this error? if so, i will raise an issue on HDF5-rust as I can not find anything online

@dwerner95
Copy link
Member Author

dwerner95 commented Jan 26, 2022

OK... I was able to run up4 properly on windows.
In a virtual machine you need at least 70 GB of space. (including windows installation)
Here is what to do:
Install:

After this we need to setup the environment.
Here is an guidance how to change environmental variables.
Create a new variable called HDF5_DIR and point it to the version folder of HDF5.
'C:\Program Files\HDF_Group\HDF5\1.10.7
Attach the following paths to the PATH variable:
C:\Users\USERNAME\anaconda3\
C:\Users\USERNAME\anaconda3\Scripts
C:\Program Files\HDF_Group\HDF5\1.10.7\bin

From here it depends on the IDE you are using. I am simply using powershell to execute and compile applications, hence i explain this:
open powershell in admin-mode and run set-executionpolicy remotesigned
open powershell and run conda init
restart powershell
install setuptools_rust:
python -m pip install setuptools_rust
install up4 by executing python -m pip install . in the up4 directory.

Enjoy!

@DanW97
Copy link
Collaborator

DanW97 commented Jan 27, 2022

Ahoy Dom,

The above method seems to work, I would propose that we say to use
%USERPROFILE%\anaconda3
as this is tied to the user installing up4.

For clarity when we (I) update the docs with how to install on windows I include below the components installed in VS2022 as copied from the the installer (make sure these are all ticked), and version info from also:

Microsoft Visual Studio Community 2022
Version 17.0.5
VisualStudio.17.Release/17.0.5+32112.339
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Community

  • Desktop development with C++ workflow
  • MSVC v143 - VS 2022 C++ x64/x86 build tools (assuming we aren't supporting ARM)
  • MSVC v141 - VS 2017 C++ x64/x86 build tools (for pyo3 to work, can't seem to get rid of v143 but up4 still installed).
  • Windows 10 SDK (10.0.019041.0) c.f. Fasani's comment to this answer

This should mean that the following boxes are also ticked to reproduce my setup (some of these i question whether they are needed):

  • Just-In-Time debugger
  • C++ Profiling tools
  • C++ CMake tools for Windows
  • C++ ATL for latest v143 build tools (x86 and x64)
  • Test Adapter for Boost.test
  • Test Adapter for Google Test
  • Live Share
  • IntelliCode
  • C++ AddressSanitizer

Once I got around Avast, up4 can be built and the rust side works, as you mentioned some tinkering with main.rs was required, i am currently unable to replicate that test here. When you get the chance, can you pass on what you used to perform your tests that passed?

Cheers,

Dan

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