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 compatibility #81

Open
13 of 14 tasks
slizzered opened this issue Aug 5, 2015 · 5 comments
Open
13 of 14 tasks

Windows compatibility #81

slizzered opened this issue Aug 5, 2015 · 5 comments
Assignees

Comments

@slizzered
Copy link
Contributor

In theory, a windows compatibility should be possible, especially since we use CMake nowadays.

Things that might be problematic and should be looked at:

  • Line endings in config files and input files (Unix \n VS Windows \n\r)
  • Threading support (should be ok since we use C++11 threads?)
  • Are additional libraries needed?
  • Path names and path separators (should be taken care of by Boost?)
  • Documentation how to build for Windows (what tools are needed?)
  • Newline when printing things (does \n work for Windows terminals?)
  • Printing of the progress bar (it uses commands to move the cursor on the command line)
  • M_PI is not defined per default (calc_phi_ase.cu, mesh.cu, reflection.cu, parser.cc) see Add definition to enable M_PI in VS2013 #82
  • find_package(Boost) needs sometimes help to find BOOST_ROOT (and Boost is annoying to install, if you also want MPI support)
  • pthreads.h is included but not needed and can not be found (main.cc)
  • unistd.h is not available (progressbar.cc)
  • sys/time.h not available (progressbar.cc)
  • GrayBat fails to build (see Compilation fails with VS2013 graybat#41)
  • color printing with dout
@slizzered
Copy link
Contributor Author

After several hours wrestling with Visual Studio and Windows, I managed to get a first version compiled. Unfortunately, it crashes if I try actually running an example 😞 (--help works, though 💃 )

Main Problems:

  • graybat does not compile
  • Boost.MPI is a very special ❄️ and will not compile along with all the other boost libs. For this reason, it is also not contained in the precompiled boost libraries.
  • that means, the only parallel-mode that currently compiles is "threaded". This might actually be good enough for typical windows workstations. For now, we could use preprocessor-guards and just not compile that stuff for Windows.
  • progressbar.cu uses libraries that are not available for Linux. Should be somewhat easy to fix
  • Our CMakeLists.txt does not generate usable output for visual studio. Things that have to be done manually:
    • Ignore MSVCRT library in the linker, otherwise there will be duplicate symbols
    • add the boost library folder to the linker
    • Set the compiler runtime library to MultiThreaded+Statically Linked (MT)

@erikzenker
Copy link
Member

Regarding to the "Boost.MPI" issue, I am currently working on a ZMQ communication policy for graybat, thus, MPI support is not necessary anymore (in the case someone wants to distribute computation on a windows machine :puke:).

The graybat compile problems in msvc are impossible for me to solve until I have a windows machine or we sit together and try to solve it on your machine.

@slizzered
Copy link
Contributor Author

After #84 is merged, there are some more things in the pipeline:

  • The progressbar is rewritten to use <chrono> instead of <sys/time.h>, so this should be fixed
  • Some code changes to enable conditional compilation of features only if they are found by CMake (currently, MPI parallel mode and GrayBat parallel mode are excluded if their preconditions are not met). This is done through #ifdef preprocessor stuff, but it's actually not very much. Could be made nicer in the future, once we know exactly how we want it to behave :)

@slizzered
Copy link
Contributor Author

About the GrayBat compile problems: sure, let us meet during the next weeks, so we can tackle that last big problem (I hope it's the last...)

slizzered added a commit to slizzered/haseongpu that referenced this issue Aug 31, 2015
 - removed fileProgressbar
 - removed deprecated fancyProgressbar with additional parameter
 - removed simpleProgressbar
 - changed to modern std::chrono time library
 - this should also help with ComputationalRadiationPhysics#81, since we no longer use `<sys/time.h>`
@slizzered
Copy link
Contributor Author

@erikzenker ZMQ is now installed on the Hypnos cluster, so we can begin testing very soon :)

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