View Issue Details

IDProjectCategoryView StatusLast Update
0003902Spring engineBuildbotpublic2013-08-02 05:07
Reportercleanrock Assigned Toabma  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionno change required 
Product Version94.1.1+git 
Summary0003902: threadpool with mingw-w64
DescriptionThis report is for us to get threadpool running on windows.

engine-legacy in threadpool now builds for me on arch with the following mingw-w64 packages installed:
https://aur.archlinux.org/packages/mingw-w64-binutils/
https://aur.archlinux.org/packages/mingw-w64-crt-svn/
https://aur.archlinux.org/packages/mingw-w64-gcc/ (with --enable-threads=posix)
https://aur.archlinux.org/packages/mingw-w64-headers-svn/
https://aur.archlinux.org/packages/mingw-w64-winpthreads/

I am not sure the -svn packages are needed, perhaps the vanilla packages are fine.
To get std::thread working use --enable-threads=posix instead of win32 when building gcc.

I needed some spring source changes, see attached patch_cr1.

I had to place the following dlls next to spring.exe to have spring.exe not complain about missing DLLs in my win7 qemu vm:
libgcc_s_sjlj-1.dll
libwinpthread-1.dll
libstdc++-6.dll

Spring didn't start fully, my win7 was missing proper opengl driver so extensions were missing.
I built a small test app which used std::thread that at least worked when running on win7.
TagsNo tags attached.
Attached Files
patch_cr1 (Attachment missing)
Checked infolog.txt for Errors

Relationships

duplicate of 0003907 resolvedabma desync since threadpool merge in validation test 
related to 0003840 resolvedabma Old instance of Spring remains after a Spring.Restart (windows only) 

Activities

abma

2013-07-28 15:59

administrator   ~0011101

from the mingw64 homepage:

"winpthreads, a implementation of POSIX threads for win32 is also available under the experimental directory. Its main goal is to support C++11 standard threading, which supports only using POSIX threads at the moment. "

http://mingw-w64.sourceforge.net/

abma

2013-07-28 16:49

administrator   ~0011102

Last edited: 2013-07-28 16:50

USE="openmp cxx -fortran" EXTRA_ECONF="--enable-threads=posix" emerge -va =cross-i686-w64-mingw32/gcc-4.7.3

doesn't compile: http://paste.springfiles.com/view/09da085e

abma

2013-07-29 01:14

administrator   ~0011103

i'll try to setup mxe: http://mxe.cc/

abma

2013-07-29 03:59

administrator   ~0011104

FYI: jk tried with boosts threadpool implementation which seems to work. spring.restart worked as well!

can't say anything about drawbacks, etc...

cleanrock

2013-07-30 11:09

reporter   ~0011109

jk seem to have solved the last problems.
windows users can test now:
http://springrts.com/dl/buildbot/default/threadpool/

The_Yak

2013-07-30 17:57

reporter   ~0011110

Last edited: 2013-07-31 10:32

Ok did some playing around with it. The good news is that it makes use of all 6 cores on my AMD FX-6100 (hooray!). Most usage appears to be occurring in cores 5 and 6, occasional bursts in core 2, minimal usage of all other cores. Loading times are MUCH faster. No gains in performance though, in fact average framerate is lower then 94.1.1-730-g1852c22 with identical settings. Still, all 94.1+ git builds run much jerkier and slower then 91.0 even with near same framerates, threadpool doesn't improve this.

Some /give all tests on Folsom Dam Deluxe and BA 7.78:

-Threadpool, with /luaui enabled, after /give all ~25fps
-with /luaui disable increases to ~38fps

-94.1.1-730, /luaui enabled, ~30fps
-/luaui disable ~45fps

EDIT: I swapped around the first numbers, sorry!

abma

2013-08-02 05:07

administrator   ~0011139

compiles/runs (with bugs)

Issue History

Date Modified Username Field Change
2013-07-28 14:48 cleanrock New Issue
2013-07-28 14:54 cleanrock File Added: patch_cr1
2013-07-28 15:28 abma Relationship added related to 0003840
2013-07-28 15:59 abma Note Added: 0011101
2013-07-28 16:49 abma Note Added: 0011102
2013-07-28 16:50 abma Note Edited: 0011102
2013-07-28 16:50 abma Note Edited: 0011102
2013-07-29 01:14 abma Note Added: 0011103
2013-07-29 03:59 abma Note Added: 0011104
2013-07-30 11:09 cleanrock Note Added: 0011109
2013-07-30 17:57 The_Yak Note Added: 0011110
2013-07-30 17:58 The_Yak Note Edited: 0011110
2013-07-31 10:32 The_Yak Note Edited: 0011110
2013-08-02 05:07 abma Note Added: 0011139
2013-08-02 05:07 abma Relationship added duplicate of 0003907
2013-08-02 05:07 abma Status new => resolved
2013-08-02 05:07 abma Resolution open => no change required
2013-08-02 05:07 abma Assigned To => abma