Revision: 65448ccdd4d8
Branch: default
Author:
CCHa...@gmail.com
Date: Mon Sep 17 09:28:53 2012
Log: Edited wiki page Compiling through web user interface.
http://code.google.com/p/sunrise/source/detail?r=65448ccdd4d8&repo=wiki
Modified:
/Compiling.wiki
=======================================
--- /Compiling.wiki Mon Sep 17 07:47:31 2012
+++ /Compiling.wiki Mon Sep 17 09:28:53 2012
@@ -24,6 +24,24 @@
Also, if you are using a nonstandard compiler (ie intel icpc), remember to
set the CXX environment variable before you start. Mixing compilers is a
recipe for trouble, trust me...
+=== Boost: ===
+
+Download Boost from [
http://sourceforge.net/projects/boost/ SourceForge].
Cd to the directory where you put the distribution and do
+
+{{{
+./bootstrap.sh --without-libraries=python --with-toolset=intel-linux
--prefix=$HOME --libdir=$HOME/lib/boost_1_48_0
--includedir=$HOME/include/boost_1_48_0
+./b2 -j<n> --user-config=user-config.jam install
+}}}
+
+This will copy the Boost headers to $HOME/include/boost_1_48_0/boost and
will build the libraries and put them in $HOME/lib/boost_1_48_0. You
obviously need to set the toolset to whatever compiler you'll be using, see
the "getting started" instructions
[
http://www.boost.org/doc/libs/1_41_0/more/getting_started/unix-variants.html "getting
started"] for more info or if you run into trouble. Also, `<n>` should be
some reasonable number depending on how many cores your machine has,
because building Boost in parallel greatly decreases the build time.
+
+Note that you only need the `--user-config` option if you are building
Boost.MPI, which will be required once the new MPI-enabled version of
Sunrise is released. The user-config.jam file should contain "`using
mpi ;`". If you run into problems, google around for building Boost.MPI on
your particular platform.
+
+If you use the above commands, Boost will install its include files in a
directory `$PREFIX/include/boost-<version>/boost`. For the files to be
found without specifically adding that directory to the include directives,
I suggest you do
+`ln -s $PREFIX/include/boost-<version>/boost $PREFIX/include/boost`.
+
+Note that the current Sunrise trunk requires Boost 1.40.0 or later, and if
you are using MPI (see below) you must make sure that the Boost.MPI library
is included in your build.
+
=== Blitz: ===
First clone the Mercurial repository, see the
[
http://sourceforge.net/projects/blitz/develop SourceForge] site for how to
do this. (The version 0.9 tar file does *NOT* work, it's way old.)
@@ -35,7 +53,7 @@
export CXX=icpc
export CXXFLAGS='-g -O2 -pthread'
export LDFLAGS=-pthread
- ./configure --prefix=$HOME --enable-threadsafe --disable-cxx-flags-preset
+ ./configure --prefix=$HOME --enable-threadsafe --disable-cxx-flags-preset
--enable-serialization
make lib
make install
}}}
@@ -67,24 +85,6 @@
(Sometimes I've run into a weird error when linking the library with icpc.
If it fails with something like `_dso_locate` in the message, and the link
line has a bunch of gcc-3.3.3 or 3.4 .o files in it, libtool is confused
and thinks that you are compiling with an old gcc. In that case you'll have
to manually link by pasting the link line and removing all the .o files,
and then copy the library which is in .libs/ to where you want it. Then
copy the include files (all .h files and the file called just CCfits) to
$PREFIX/include/CCfits/.)
-=== Boost: ===
-
-Download Boost from [
http://sourceforge.net/projects/boost/ SourceForge].
Cd to the directory where you put the distribution and do
-
-{{{
-./bootstrap.sh --without-libraries=python --with-toolset=intel-linux
--prefix=$HOME --libdir=$HOME/lib/boost_1_48_0
--includedir=$HOME/include/boost_1_48_0
-./b2 -j<n> --user-config=user-config.jam install
-}}}
-
-This will copy the Boost headers to $HOME/include/boost_1_48_0/boost and
will build the libraries and put them in $HOME/lib/boost_1_48_0. You
obviously need to set the toolset to whatever compiler you'll be using, see
the "getting started" instructions
[
http://www.boost.org/doc/libs/1_41_0/more/getting_started/unix-variants.html "getting
started"] for more info or if you run into trouble. Also, `<n>` should be
some reasonable number depending on how many cores your machine has,
because building Boost in parallel greatly decreases the build time.
-
-Note that you only need the `--user-config` option if you are building
Boost.MPI, which will be required once the new MPI-enabled version of
Sunrise is released. The user-config.jam file should contain "`using
mpi ;`". If you run into problems, google around for building Boost.MPI on
your particular platform.
-
-If you use the above commands, Boost will install its include files in a
directory `$PREFIX/include/boost-<version>/boost`. For the files to be
found without specifically adding that directory to the include directives,
I suggest you do
-`ln -s $PREFIX/include/boost-<version>/boost $PREFIX/include/boost`.
-
-Note that the current Sunrise trunk requires Boost 1.40.0 or later, and if
you are using MPI (see below) you must make sure that the Boost.MPI library
is included in your build.
-
=== TBB ===
You need a pretty recent version of TBB. If you are using a recent version
of icpc (like v12) then this should be sufficient, but you have to find the
path to the library and supply it when configuring Sunrise. Usually you can
find it by looking at the path to the icpc executable, which will be
something like
`/n/sw/intel/mkl/
10.3.1.107/composerxe-2011.3.174/bin/intel64/icpc`. In
this case, you'll typically find the TBB library and headers at
`/n/sw/intel/mkl/
10.3.1.107/composerxe-2011.3.174/include` and `lib`.