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 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/
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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s