Python switch version

alias python=/usr/local/repos/Python-2.7.10/python

Advertisements

Install boost library

Following the instructions of http://fenics-hpc.blogspot.hu/2015/04/build-fenics-150-on-archer.html.

Assuming that there are 3 directories: packages, modules, src.

Download boost

cd src
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_59_0.tar.gz/download
tar xf boost_1_59_0.tar.gz

Create folders

cd packages
mkdir boost-1.59.0
cd boost-1.59.0
mkdir lib
mkdir include

Install

cd src/boost_1_59_0
./bootstrap.sh

Then edit project-config.jam as it is said on fenics-hpc.blogspot, but with the appropriate gcc version (4.4.7) and with the appropriate paths.

# Boost.Build Configuration
# Automatically generated by bootstrap.sh

import option ;
import feature ;

# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam
# file.
if ! gcc in [ feature.values ]
{
using gcc : 5.3.0 : : -std=c++11 ;
}

project : default-build gcc ;

# List of –with- and –without- # options. If left empty, all libraries will be built.
# Options specified on the command line completely
# override this variable.
libraries = –with-filesystem –with-program_options –with-timer –with-chrono –with-system –with-thread –with-iostreams –with-serialization ;

# These settings are equivivalent to corresponding command-line
# options.
option.set prefix : /home/1/nonlinpde/packages/boost-1.59.0 ;
option.set exec-prefix : /home/1/nonlinpde/packages/boost-1.59.0 ;
option.set libdir : /home/1/nonlinpde/packages/boost-1.59.0/lib ;
option.set includedir : /home/1/nonlinpde/packages/boost-1.59.0/include ;

# Stop on first error
option.set keep-going : false ;

Pcre, swig, cmake, eigen installation

Following the instructions of: http://fenics-hpc.blogspot.hu/2015/04/build-fenics-150-on-archer.html.

Create directories

mkdir packages
mkdir modules
mkdir src

Installing pcre, swig, cmake

create directories

cd packages
mkdir swig-3.0.7
mkdir pcre-8.37
mkdir cmake-3.4.1

get files

cd src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.bz2
wget http://prdownloads.sourceforge.net/swig/swig-3.0.7.tar.gz
wget --no-check-certificate http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz
tar xf swig-3.0.7.tar.gz
tar xf pcre-8.37.tar.bz2
tar xf cmake-3.4.1

installation (the same for pcre, swig, cmake)

cd pcre-8.37
./configure --prefix=/home/1/nonlinpde/packages/pcre-8.37
make
make install

Install eigen

Based on the bug: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1072

cd packages
mkdir eigen-3.2.7
cd ..
cd src
wget http://bitbucket.org/eigen/eigen/get/3.3-alpha1.tar.gz
tar xf 3.3-alpha1.tar.gz
cd ..
cd packages/eigen-3.2.7
cmake /home/1/nonlinpde/src/eigen-eigen-09a8e2186610/
cmake -DEIGEN_BUILD_PKGCONFIG=off .
make install

Create modules

Create directories

cd modules
mkdir -p pcre/8.37
cd pcre/8.37

Create module file with vim (http://bcu.copsewood.net/pcnd3/tut1.html)

vim module

Insert the following

#%Module -*- tcl -*-
##
## modulefile
##
proc ModulesHelp { } {

  puts stderr "\tAdds pcre 8.37 to your environment.\n"
}

module-whatis "adds pcre 8.37 to your environment"

set               root                 /home/1/nonlinpde/packages/pcre-8.37
prepend-path      PATH                 $root/bin
prepend-path      CPATH                $root/include
prepend-path      LIBRARY_PATH         $root/lib
prepend-path      LD_LIBRARY_PATH      $root/lib
prepend-path      MANPATH              $root/share/man

Then create directories and copy the module file into modules/swig/3.0.7, modules/eigen/3.2.6, modules/cmake/3.4.1 and edit the root path. For example:

cp module ~/modules/cmake/3.4.1

Then load modules:

module use /home/1/nonlinpde/modules
module load /pcre/8.37
module load /swig/3.0.7
module load /cmake/3.4.1
module load /eigen/3.2.7

We can check the loaded modules:

module avail