Search code examples
cwindowsforkopenmpi

Cygwin or Gnuwin32 or MYSYS?


I've tried to google it and I understood some stuff, but still don't know which one is suitable for my needs. all I want to do is to compile C file (or C++) under Unix environment (so I can use Fork and stuff that don't work on windows) and run these files after compiling it.

to be more exact, I need to use Fork+Semaphores and to use OpenMPI. I know I can do these with Cygwin (or that's what I understood), but it seems like it has a very large size, so I thought if this Gnuwin32 or MYSYS can do what I want to do and they have less size then Cygwin, then it's better ?


Solution

  • If you are absolutely sure you require fork and cannot instead use a more platform independent way of multiprocessing (a thin fork/CreateProcess wrapper) or multithreading (pthreads, Boost.Thread, C++11 std::thread, ...), then you are forcing yourself to use Cygwin.

    Note that Cygwin's fork is pretty much as efficient as fork can get on Windows, which is not very, as the OS wasn't designed with that operation in mind, hence the kernel level support is missing.

    Cygwin itself is not that big: it's only a DLL you link to that provides the POSIX interface. But do note that Cygwin is GPL and linking to the Cygwin DLL will force copyleft on your project as well.