Status of parallelization on Windows
Posted on

Forums
I was wondering what the status of supporting multicore systems on Windows. I thought that several compilers were available that supported OpenMP on Windows, and I was wondering if OpenMP-supporting builds of the OpenMX Windows binary were on a development timeline. (Note that this area is outside my wheelhouse, so I might be mistaken about the obstacle to Windows multicore support.)
OpenMP
Good question. For as long as I have been involved in OpenMx development, we have built OpenMx binaries with CRAN's official Windows toolchain, which has included gcc v4.6.3. We have never been able to build thread-safe OpenMP-enabled Windows binaries--they invariably crash. I have personally built a multihreaded Windows binary, run a parallelized loop under gdb, and watched as the current thread overran its array limit. Our consensus is that there is a compiler bug.
I have several times tentatively raised the possibility of trying a newer version of gcc, or perhaps a different optimizer (maybe Intel's), but have done so with more than a little trepidation. Per the R Installation and Administration Manual (emphasis in original):
In other words, it may take quite a bit of trial-and-error to get a different compiler to work (if it ever does). OpenMP-enabled Windows binaries are not currently a development priority, though we would be eager to hear from anyone who can set up a build environment that can produce thread-safe such builds.
Log in or register to post comments
Newer gcc
Rob,
Note that the latest toolchains use a newer gcc. From the official site you linked.
They also use a new CXX standard. Maybe this is worth trying again?
Log in or register to post comments
In reply to Newer gcc by mhunter
Oops
Oops. "v4.6.3" was a typo on my part. "v4.9.3" is correct.
Log in or register to post comments
gcc
Encouragingly, the Windows toolchain maintainers are planning a major toolchain update for this summer, based around gcc 8!
Log in or register to post comments
In reply to gcc by AdminRobK
That's really exciting news!
That's really exciting news!
Log in or register to post comments
The Rtools 40 Windows
The Rtools 40 Windows toolchain now uses gcc 8.30, so I was wondering if there was any developer interest in trying to compile a multithread build of Windows OpenMx again?
Log in or register to post comments
In reply to The Rtools 40 Windows by bwiernik
already tried, and failed
See my post in another thread. In summary: I already tried to build a multithreaded OpenMx Windows binary with the current toolchain, and the binary is still not thread-safe. Disappointing!
Per this comment on github, OpenMP appears not to be a good choice in the first place for multithreading an R package under Windows.
Log in or register to post comments
In reply to already tried, and failed by AdminRobK
Ah, that's unfortunate.
Ah, that's unfortunate. Thanks for the update!
Log in or register to post comments