Page 1 of 1
Multithreading in-game
Posted: 22 May 2014, 12:40
by Alexandros
I have been trying to play this map:
http://addons.wz2100.net/265
Unfortunately, it is so big and complicated that I can't get any reasonable FPS out of it. After digging through some settings and monitors, I found that Warzone is saturating one of my four cores, but not touching any of the others. I haven't limited it (or anything, for that matter) to one core, and according to the Debian Google+ community, the Linux kernel by default allow any process any number of available cores. So it seems that Warzone, or at least my copy, isn't using multithreading. Is there a setting (and if there is, I'm expecting it to be a compile-time option) to make the executable use multithreading? I couldn't find a page of compile options in the wiki or in the source folder.
Basic system information follows.
- OS: Debian "Wheezy" 7.5
Kernel: 3.2.0-4-amd64
CPU: AMD Athlon X4 630 Quad-Core @ 2.8 GHz
RAM: 6 GB @ 400 MHz
GPU: GeForce GT 640 (384 CUDA cores @ 941 MHz)
VRAM: 2 GB @ 891 MHz
Using NVIDIA non-free driver 304.117
Warzone version: 3.1.1, downloaded tarball of source code, compiled according to
http://developer.wz2100.net/wiki/CompileGuideLinux short instructions. I did not make install, so it is easy to change the executable.
Dependencies: All default Debian Wheezy versions. Details follow.
Code: Select all
build-essential 11.5
automake 1.11.6-1
flex 2.5.35-10.1
bison 2.5.dfsg-2.1
libpng12-dev 1.2.49-1
libsdl1.2-dev 1.2.15-5
libopenal-dev 1.14-4
libphysfs-dev 2.0.2-6
libvorbis-dev 1.3.2-1.3
libtheora-dev 1.1.1+dfsg.1-3.1
libglc-dev 0.7.2-5+b1
libglew1.5-dev: virtual, provided by libglew-dev 1.7.0-3
libxrandr-dev 1.3.2-2+deb7u1
zip 3.0-6
unzip 6.0-8
libqt4-opengl-dev 4.8.2+dfsg-11
libqt4-network 4.8.2+dfsg-11
libqjson-dev 0.7.1-7
Re: Multithreading in-game
Posted: 23 May 2014, 21:10
by NoQ
There's not much multithreading coded into the game, apart from a separate thread for pathfinding.
So, no, it can't be turned on without additional coding for what else can be parallelized.
Re: Multithreading in-game
Posted: 24 May 2014, 03:21
by vexed
If you are using the default ./configure, then I would suggest you use release mode, and add some compiler optimization flags.
Re: Multithreading in-game
Posted: 28 May 2014, 04:53
by Alexandros
vexed wrote:If you are using the default ./configure, then I would suggest you use release mode, and add some compiler optimization flags.
Sorry for my exasperating ignorance, but can you please translate that into commands for me to type? I don't even know what options ./configure will accept.
Re: Multithreading in-game
Posted: 31 Jul 2014, 10:39
by Berg
When you compile warzone you can use many configuration optoins here is a list.
Code: Select all
./configure --help
`configure' configures Warzone 2100 3.1.1 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/warzone2100]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
--enable-installer Build NSIS installer [no]
--enable-portable Build portable version of Warzone (windows ONLY!)
[no]
--enable-static Link statically [no]
--disable-sound Disable sound [no]
--enable-debug=yes/relaxed/profile/debugprofile/optimised/no
Compile debug version [[yes]]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-perl=[[PATH]] absolute path to perl executable
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir
--with-backend=sdl/qt Backend rendering code to use [sdl]
--with-x use the X Window System
--with-icondir=DIR icon files [DATADIR/icons]
--with-applicationdir=DIR
application files [DATADIR/applications]
--with-distributor Name of distributor compiling this package
--with-makensis Path to makensis
--with-videos Install videos with the portable version of Warzone
(windows ONLY!) [no]
--with-installer-compression
Compression method to use when building NSIS [lzma]
--with-installer-extdir Path to external data for NSIS script
--with-installer-version
4-tuble version of the installer. i.e. 1.2.3.4
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
PERL Absolute path to perl executable
CPP C preprocessor
PKG_CONFIG path to pkg-config utility
QT4_CFLAGS C compiler flags for QT4, overriding pkg-config
QT4_LIBS linker flags for QT4, overriding pkg-config
XMKMF Path to xmkmf, Makefile generator for X Window System
CXX_FOR_BUILD
C++ compiler that produces binaries that will run on the build
system
CC_FOR_BUILD
C compiler that produces binaries that will run on the build
system
CFLAGS_FOR_BUILD
Flags to use for the C compiler that produces binaries for the
build system
CXXFLAGS_FOR_BUILD
Flags to use for the C++ compiler that produces binaries for the
build system
CPPFLAGS_FOR_BUILD
Preprocessor flags to use for the C and C++ compilers that
produce binaries for the build system
PKGCONFIG_PREFIX
Prefix path to look in for pkg-config templates
PKGCONFIG_DEFAULT_PREFIX
Prefix path to look in for pkg-config templates
SDL_CFLAGS C compiler flags for SDL, overriding pkg-config
SDL_LIBS linker flags for SDL, overriding pkg-config
PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
PNG_LIBS linker flags for PNG, overriding pkg-config
THEORA_CFLAGS
C compiler flags for THEORA, overriding pkg-config
THEORA_LIBS linker flags for THEORA, overriding pkg-config
OPENAL_CFLAGS
C compiler flags for OPENAL, overriding pkg-config
OPENAL_LIBS linker flags for OPENAL, overriding pkg-config
VORBIS_CFLAGS
C compiler flags for VORBIS, overriding pkg-config
VORBIS_LIBS linker flags for VORBIS, overriding pkg-config
VORBISFILE_CFLAGS
C compiler flags for VORBISFILE, overriding pkg-config
VORBISFILE_LIBS
linker flags for VORBISFILE, overriding pkg-config
GLEW_CFLAGS C compiler flags for GLEW, overriding pkg-config
GLEW_LIBS linker flags for GLEW, overriding pkg-config
FRIBIDI_CFLAGS
C compiler flags for FRIBIDI, overriding pkg-config
FRIBIDI_LIBS
linker flags for FRIBIDI, overriding pkg-config
FREETYPE_CFLAGS
C compiler flags for FREETYPE, overriding pkg-config
FREETYPE_LIBS
linker flags for FREETYPE, overriding pkg-config
FONTCONFIG_CFLAGS
C compiler flags for FONTCONFIG, overriding pkg-config
FONTCONFIG_LIBS
linker flags for FONTCONFIG, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
I actualy use this when compiling on my dual core.
Code: Select all
./configure --enable-debug=no CFLAGS='-march=core2 -O3 -pipe' CXXFLAGS='-march=core2 -O3 -pipe' && make -j2
Re: Multithreading in-game
Posted: 02 Feb 2015, 00:45
by wayward4now
Thanks! I'm checking that out now. Ric