home | next | cmake install
This tutorial will guide you through installing HPX and running the Fibonacci example included with HPX (Command Line Structure)!
If you have any issues following this tutorial or have compilation related errors, please feel free to post to the GoPX mailing list.
The first step is to download Boost. Boost is a set of libraries that HPX relies on to work.
Now we will download the latest stable version of Boost (1.43 at the time of this writing) and install it.
For convenience sake I set some environment variables (to keep from writing out the full path). You should save these environment variables in your ~/.bash_profile
so you always have them.
$ cd $HOME $ mkdir projects $ cd projects/ $ wget http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.tar.gz/download $ tar vxf boost_1_43_0.tar.gz $ cd boost_1_43_0 $ export BOOST=$HOME/usr/local/boost $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BOOST/lib $ mkdir -p $BOOST $ ./bootstrap.sh --prefix=$BOOST --with-libraries=date_time,filesystem,program_options,regex,serialization,system,signals,thread 2> bootstrap.err > bootstrap.out $ head bootstrap.err && tail bootstrap.out $ ./bjam 2> bjam.err > bjam.out $ head bjam.err && tail bjam.out $ ./bjam install 2> bjam.install.err > bjam.install.out $ head bjam.install.err && tail bjam.install.out
Congratulations! You have installed Boost!
Now, update your ~/.bash_profile
to include the BOOST
environment variable, and to update the LD_LIBRARY_PATH
.
Now we will download and install HPX. Again we will set some environmental variables for convenience sake which you should include in your ~/.bash_profile
.
You should have the program cmake
(you can check by running 'which cmake
', if nothing shows up then you need to install it). If you don't have cmake
, click here for detailed instructions on how to install it.
$ cd $HOME/projects $ svn checkout https://svn.cct.lsu.edu/repos/projects/parallex/trunk/hpx hpx_head $ cd hpx_head $ export HPX_HEAD=$HOME/projects/hpx_head $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HPX_HEAD/lib $ cmake -DCMAKE_PREFIX=$HPX_HEAD -DBOOST_ROOT=$BOOST . 2> cmake.err > cmake.out $ head cmake.err && tail cmake.out $ make 2> make.err > make.out $ head make.err && tail make.out $ make install 2> make.install.err > make.install.out $ head make.install.err && tail make.install.out
Congratulations! You have installed HPX!
Now, update your ~/.bash_profile
to include the HPX_HEAD
environment variable, and to update the LD_LIBRARY_PATH
.
To test your installation you can run the fibonacci example included with HPX.
$ cd $HPX_HEAD/bin $ ./fibonacci elapsed: 0.054876, result: 55 Number of invocations of fib(): 177
Continue to the next part of this tutorial to learn about how to run HPX programs!