As per recurring request on the IRC, here is a PRELIMINARY ‘how to’ for those of you that
may be interested in using Intel Parallel Studio to generate extended SSE2/3/4 instructions
and use optimization C compiler.
Please note that I’m in no way a specialist in Compilers/linkers and that I submit this with
the intent that some of you can use and improve it so that Intel Compiler & tools could be part
of the Panda3D build system.
In term of performance, this should be noticeable for those of us that use C++ Panda programming with a lot of non panda processing involved in the application.
Let’s share our experience on this!
Having said so, here is the state of the current exploration:
b[/b] assumption you’re on Windows, have a decent processor(!), and use Visual Studio 2008
b[/b] if you don’t have yet the Intel Performance compiler, you can get a trial version at:
http://software.intel.com/en-us/articles/intel-parallel-studio-xe/
http://software.intel.com/en-us/articles/intel-parallel-studio-xe-evaluation/
b[/b] once installed and set-up, you have Intel Compiler & other tools integrated in your
Visual Studio development suite.
OK, So download latest Panda source code (ie Panda_1.8 as of today)!
b[/b] now, you need to use two slightly modified generation files
makepanda.py and makepandacore.py
The aim is for the build system to recognize Intel Compiler (and its bunch of tricky options)
I prepared these files, and they’re downloadable at
https://rapidshare.com/files/2235485460/makepanda.py
https://rapidshare.com/files/429889059/makepandacore.py
(4) run the build with option
makepanda --verbose --everything --no-directcam --no-opencv --no-pandatool --no-maya2012 --optimize 4 --installer
you can try others options at your leasure, some will fail, try again
(5) Note that I included per default some performance compile flags, in case you want to change them
edit makepanda.py
per default compile to the specific capabilities of your machine (ie supposely the machine
performing compilation)
if you want to generate to a different Intel architecture, replace
/QxHost with /arch:SSxxx ie /arch::SSE3, /arch::SSE4.1, ...
> if you don't want to use intel optimized headers, remove
cmd += " /Quse-intel-optimized-headers"
> if you don't want to enable parallelization, remove
cmd += " /Qparallel"
> if you're interested in getting optimization (ugly) warnings/reports, add
cmd += " /Qopt-report:2 /Qopt-report-phase:hlo /Qopt-report-phase:hpo" # some optimization reports
BTW: Depending on the options you selected, get ready for a substantial compile time and make sure
you’ve got a comfortable sofa, enough drinks and a nice video movie to watch…
Please note too that depending on the options you may need to :
get ddraw.lib
Microsoft no longer include this library in the latest version of DirectX SDK,
since usage of directdraw is discouraged for new programs.
Anyway you can get a working version from previous DirectX SDK (2009), such as:
microsoft.com/download/en/ex … x?id=10084
edit slight modifications in glGraphicsBuffer_src.h ie
replace PFNGLDRAWARRAYSINSTANCEDPROC by PFNGLDRAWARRAYSINSTANCEDEXTPROC
replace PFNGLDRAWELEMENTSINSTANCEDPROC by PFNGLDRAWELEMENTSINSTANCEDEXTPROC
OK, if everything goes fine you should eventually get
1>Makepanda Final Status Report
1>Makepanda: Regular build
1>Makepanda: Compiler: MSVC
1>Makepanda: Optimize: 4
1>Makepanda: Keep Pkg: PYTHON DIRECT GL DX9 TINYDISPLAY NVIDIACG OPENAL FMODEX FFMPEG ODE ZLIB PNG JPEG TIFF SQUISH FREETYPE FCOLLADA VRPN OPENSSL FFTW ARTOOLKIT NPAPI GTK2 WX OSMESA PVIEW DEPLOYTOOLS CONTRIB
1>Makepanda: Omit Pkg: GLES GLES2 DX8 EGL PHYSX BULLET SPEEDTREE MAYA6 MAYA65 MAYA7 MAYA8 MAYA85 MAYA2008 MAYA2009 MAYA2010 MAYA2011 MAYA2012 MAX6 MAX7 MAX8 MAX9 MAX2009 MAX2010 MAX2011 SWSCALE OPENCV DIRECTCAM AWESOMIUM FLTK X11 XF86DGA XRANDR XCURSOR PANDATOOL
1>Makepanda: Don't generate API reference manual
1>Makepanda: Build installer, using zlib
1>Makepanda: Version ID: 1.8.0
1>Makepanda: I cannot locate SDK for DX8
1>Makepanda: I have automatically added this command-line option: --no-dx8
1>Makepanda: Using DX9 sdk: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)
1>Makepanda: The registry does not appear to contain a pointer to the MAYA6 SDK.
1>Makepanda: I have automatically added this command-line option: --no-maya6
...
1>Makepanda: The registry does not appear to contain a pointer to MAX2011
1>Makepanda: I have automatically added this command-line option: --no-max2011
1>Makepanda: I cannot locate SDK for PhysX
1>Makepanda: I have automatically added this command-line option: --no-physx
1>Makepanda: I cannot locate SDK for SpeedTree
1>Makepanda: I have automatically added this command-line option: --no-speedtree
1>Makepanda: thirdparty/win-libs-vc9/awesomium/lib/Awesomium.lib not found. Skipping Package AWESOMIUM
1>Makepanda: thirdparty/win-libs-vc9/fltk/lib/fltk.lib not found. Skipping Package FLTK
1>Makepanda: Elapsed Time: 16 min 25 sec
1>-------------------------------------------------------------------
1>Build successfully finished, elapsed time: 16 min 25 sec
1>Build log was saved at "file://c:\Users\jc\Desktop\PANDA_BUILD_BOT\SOURCE_BOT_RELEASE_1.8_INtel\panda3d\built\BuildLog.htm"
1>makepanda - 0 error(s), 5 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
and get a install file.
Let me know how it goes.
Cheers
jean-claude