Differences between revisions 5 and 6
Revision 5 as of 2005-12-19 03:05:38
Size: 4434
Comment:
Revision 6 as of 2005-12-19 10:43:39
Size: 4547
Comment:
Deletions are marked like this. Additions are marked like this.
Line 63: Line 63:
 The first set of optimizations can be activated by usingprocessor-specific optimizations. If you edit theFox/ObjCryst/rules.mak file, and search for the dpart where the!CPPFLAGS are defined:  The first set of optimizations can be activated by using processor-specific optimizations. If you edit the ```Fox/ObjCryst/rules.mak``` file, and search for the dpart where the ```CPPFLAGS``` are defined:
Line 67: Line 67:
 ''Auto-vectorization'': starting with gcc 4.0.0, it is possible to autmatically vectorize some loops: append "-ftree-vectorize" to the options to do that.  ''Auto-vectorization'': starting with gcc 4.0.0, it is possible to automatically '''vectorize''' some loops: append ```-ftree-vectorize``` to the ```CPPFLAGS``` options to do that (see the examples commented out in the ```rules.mak``` file).
Line 73: Line 73:
make clean

Compiling F.O.X. under Linux is normally easy (it is developped using Mandriva Linux). The source code for Fox now includes the [http://wxwidgets.org wxWidgets] and [http://freeglut.sf.net freeglut] librairies, so dependencies should be minimal. As always, send me an email at vincefn@users.sf.net if you have any trouble with the installation.

Steps:

  • [#lib Install the required graphical libraries]

  • [#fox Get, compile & install Fox]

  • [#optimize Compile an optimized version of Fox]

Installing the required graphics libraries

Anchor(lib) Below are specific instructions to install the required graphics libaries for the following distributions :

  • [#mdk Mandriva]BR

  • [#fedora Fedora]BR

  • [#suse Suse]BR

Please add or correct the instructions for your distribution...

If your distribution is not listed, just follow the [#general general building instructions]. Anchor(general)

General Instructions (if your distribution is not listed below)

To install F.O.X. under Linux:

  • You will need valid libraries and development files for OpenGL. You may require a specific library for your card (NVidia,...), the Xfree-devel or libxorg-devel, and the gtk-devel (or gtk+-devel or gtk2-devel...) packages. For all major distributions, these packages are included either in the default install or as an additionnal package.

Mandrake & Mandriva

Anchor(mdk)

Mandriva 10.2 (2006)

  • The required packages (just urpmi followed by tha package names - you need the main and contrib rpm repositories) are :

    • Development packages (should be obvious but...): gcc gcc-c++ gcc-cpp gcc-g77

    • Graphics development packages : libxorg-x11-devel, libgtk+1.2-devel 

Fedora

Anchor(fedora) This is partially a guess since I do not have this distribution, so feel free to correct these

Fedora Core 3 & 4

  • Development packages (should be obvious but...): gcc gcc-c++ gcc-g77

  • Graphics development package : xorg-x11-devel, gtk+-devel

SuSE

Anchor(suse) This is partially a guess since I do not have this distribution, so feel free to correct these

SuSE 9.3

  • Development packages (should be obvious but...): gcc gcc-c++ gcc-g77

  • Graphics development package : xorg-x11-devel, gtk-devel (or gtk2-devel)

Get, compile & install Fox

Anchor(fox) Get the Fox.tar.bz2 from [http://sourceforge.net/project/showfiles.php?group_id=27546&release_id=203604 SourceForge], [ftp://ftp.ccp14.ac.uk/ccp14/ftp-mirror/objcryst/ CCP14(UK)], [http://ccp14.sims.nrc.ca/ccp/ccp14/ftp-mirror/objcryst/ CCP14(Canada)] or [http://ccp14.semo.edu/ccp/ccp14/ftp-mirror/objcryst/ CCP14(USA)]

Then compile and install Fox (replace VERSION by your version of Fox):

  tar -xjf Fox-VERSION.tar.bz2
  cd Fox-VERSION
  make
  make install (for this last step you must be root).

Fox will be installed in /usr/local/bin/Fox. Otherwise the compiled file is in the src/Fox subdirectory.

Compiling an optimized version of Fox

Anchor(optimize)

Compile options

  • The first set of optimizations can be activated by using processor-specific optimizations. If you edit the Fox/ObjCryst/rules.mak file, and search for the dpart where the CPPFLAGS are defined:

    CPPFLAGS = -O3 -w -ffast-math -fstrict-aliasing -pipe -fomit-frame-pointer -funroll-loops

    Auto-vectorization: starting with gcc 4.0.0, it is possible to automatically vectorize some loops: append -ftree-vectorize to the CPPFLAGS options to do that (see the examples commented out in the rules.mak file).

Profile driven optimizations

Fox can be further optimized by making "test runs" which are used to give hints to the compiler on how to best optimize the code. To do this you (i) compile Fox by enabling the "recording" of the optimization, then (ii) you run a few optimizations, then (iii) you recompile using the recorded profile. This requires gcc version 3.2 or above.To do that from the Fox directory, do:

make clean
make Fox profile=2
src/Fox --nogui example/pbso4-joint.xml --randomize -n 50000 -o /dev/null
src/Fox --nogui example/Cimetidine-powder.xml --randomize -n 50000 -o /dev/null
src/Fox --speedtest
make clean
make Fox profile=3
make install

This yields about 10% faster code.

None: FoxInstallLinux (last edited 2006-08-29 14:43:21 by nallo)