Kategoriarkiv: Linux

Standalone gcc 4.8.4 with mpc, mpfr and gmp on CentOS 6.x

Install gmp 5.1.2

wget https://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
 tar -xjvf gmp-5.1.2.tar.bz2
 cd gmp-5.1.2
 ./configure --exec-prefix=/opt/gmp/5.1.2 --datarootdir=/opt/gmp/5.1.2/share --datadir=/opt/gmp/5.1.2/share --infodir=/opt/gmp/5.1.2/share/info --includedir=/opt/gmp/5.1.2/include --oldincludedir=/opt/gmp/5.1.2/include --prefix=/opt/gmp/5.1.2
 make
 make install

Module file: /etc/modulefiles/gmp/5.1.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/gmp/5.1.2/bin
prepend-path LD_LIBRARY_PATH /opt/gmp/5.1.2/lib
prepend-path CPLUS_INCLUDE_PATH /opt/gmp/5.1.2/include
prepend-path CPPFLAGS -I/opt/gmp/5.1.2/include
prepend-path LIBS -L/opt/gmp/5.1.2/lib
prepend-path GMP_LIBRARIES /opt/gmp/5.1.2/lib
prepend-path GMP_INCLUDE_DIR /opt/gmp/5.1.2/include
pre

Install mpfr 3.1.2

wget http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.gz
tar -xzvf mpfr-3.1.2.tar.gz
cd mpfr-3.1.2
./configure --exec-prefix=/opt/mpfr/3.1.2 --datarootdir=/opt/mpfr/3.1.2/share --datadir=/opt/mpfr/3.1.2/share --infodir=/opt/mpfr/3.1.2/share/info --includedir=/opt/mpfr/3.1.2/include --oldincludedir=/opt/mpfr/3.1.2/include
make
make install

Module file: /etc/modulefiles/mpfr/3.1.2

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##


## Add directory to the path
#prepend-path PATH /opt/mpfr/3.1.2/bin
prepend-path LD_LIBRARY_PATH /opt/mpfr/3.1.2/lib
prepend-path CPLUS_INCLUDE_PATH /opt/mpfr/3.1.2/include
prepend-path CPPFLAGS -I/opt/mpfr/3.1.2/include
prepend-path LIBS -L/opt/mpfr/3.1.2/lib
prepend-path MPFR_LIBRARIES /opt/mpfr/3.1.2/lib
prepend-path MPFR_INCLUDE_DIR /opt/mpfr/3.1.2/include
prepend-path LD_RUN_PATH /opt/mpfr/3.1.2/lib

Install mpc 1.0.1

wget https://ftp.gnu.org/gnu/mpc/mpc-1.0.1.tar.gz
tar -xzvf mpc-1.0.1.tar.gz
cd mpc-1.0.1
./configure --exec-prefix=/opt/mpc/1.0.1 --datarootdir=/opt/mpc/1.0.1/share --datadir=/opt/mpc/1.0.1/share --infodir=/opt/mpc/1.0.1/share/info --includedir=/opt/mpc/1.0.1/include --oldincludedir=/opt/mpc/1.0.1/include --with-gmp=/opt/gmp/5.1.2/ --with-mpfr=/opt/mpfr/3.1.2/
make
make install

Module file: /etc/modulefiles/mpc/1.0.1

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

## Add directory to the path
#prepend-path PATH /opt/mpc/1.0.1/bin
prepend-path LD_LIBRARY_PATH /opt/mpc/1.0.1/lib
prepend-path CPLUS_INCLUDE_PATH /opt/mpc/1.0.1/include
prepend-path CPPFLAGS -I/opt/mpc/1.0.1/include
prepend-path LIBS -L/opt/mpc/1.0.1/lib

Install isl 0.11.1

wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/isl-0.11.1.tar.bz2
tar -xjvf isl-0.11.1.tar.bz2
cd isl-0.11.1
./configure --exec-prefix=/opt/isl/0.11.1 --datarootdir=/opt/isl/0.11.1/share --datadir=/opt/isl/0.11.1/share --infodir=/opt/isl/0.11.1/share/info --includedir=/opt/isl/0.11.1/include --oldincludedir=/opt/isl/0.11.1/include --with-gmp-prefix=/opt/gmp/5.1.2/ 
make make install

Module file: /etc/modulefiles/isl/0.11.1

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/isl/0.11.1/bin
prepend-path LD_LIBRARY_PATH /opt/isl/0.11.1/lib
prepend-path CPLUS_INCLUDE_PATH /opt/isl/0.11.1/include
prepend-path CPPFLAGS -I/opt/isl/0.11.1/include
prepend-path LIBS -L/opt/isl/0.11.1/lib
prepend-path LD_RUN_PATH /opt/isl/0.11.1/lib

Install cloog 0.18.0

wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/cloog-0.18.0.tar.gz
tar -xzvf cloog-0.18.0.tar.gz
cd cloog-0.18.0
./configure --exec-prefix=/opt/cloog/0.18.0 --datarootdir=/opt/cloog/0.18.0/share --datadir=/opt/cloog/0.18.0/share --infodir=/opt/cloog/0.18.0/share/info --includedir=/opt/cloog/0.18.0/include --oldincludedir=/opt/cloog/0.18.0/include --with-gmp-prefix=/opt/gmp/5.1.2/
makemake install

Module file: /etc/modulefiles/cloog/0.18.0

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##

#Add directory to the path
#prepend-path PATH /opt/cloog/0.18.0/bin
prepend-path LD_LIBRARY_PATH /opt/cloog/0.18.0/lib
prepend-path CPLUS_INCLUDE_PATH /opt/cloog/0.18.0/include
prepend-path CPPFLAGS -I/opt/cloog/0.18.0/include
prepend-path LIBS -L/opt/cloog/0.18.0/lib
prepend-path LD_RUN_PATH /opt/cloog/0.18.0/lib

Install gcc 4.8.4

I had to install 32 bit glibc-devel:
 yum install glibc-devel.i686

module load gmp/5.1.2
module load mpfr/3.1.2 
module load mpc/1.0.1 
module load isl/0.11.1
module load cloog/0.18.0
wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.4/gcc-4.8.4.tar.bz2
tar -xjvf gcc-4.8.4.tar.bz2
cd gcc-4.8.4
./configure --prefix=/opt/gcc/4.8.4 --exec-prefix=/opt/gcc/4.8.4 --datarootdir=/opt/gcc/4.8.4/share --datadir=/opt/gcc/4.8.4/share --infodir=/opt/gcc/4.8.4/share/info --includedir=/opt/gcc/4.8.4/include --oldincludedir=/opt/gcc/4.8.4/include --with-gmp=/opt/gmp/5.1.2/ --with-mpfr=/opt/mpfr/3.1.2/ --with-mpc=/opt/mpc/1.0.1/ --with-isl=/opt/isl/0.11.1/ --with-cloog=/opt/cloog/0.18.0/ --disable-isl-version-check
 make 
make install

Module file: /etc/modulefiles/gcc/4.8.4

#%Module1.0####################################################################
##
## gcc modulefile
##
## 
##

prepend-path PATH /opt/gcc/4.8.4/bin
#prepend-path PATH /opt/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/
set-alias "cc" "/opt/gcc/4.8.4/bin/gcc"
prepend-path LD_LIBRARY_PATH /opt/gcc/4.8.4/lib/../lib64 
prepend-path LD_RUN_PATH /opt/gcc/4.8.4/lib/../lib64 
#prepend-path LIBS -I/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include
prepend-path MANPATH /opt/gcc/4.8.4/share/man

prepend-path CPLUS_INCLUDE_PATH /opt/gcc/4.8.4/include
#prepend-path CPLUS_INCLUDE_PATH /opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include/ssp
prepend-path CPPFLAGS -I/opt/gcc/4.8.4/include
prepend-path CPPFLAGS -L/opt/gcc/4.8.4/lib
#prepend-path LIBS -L/opt/gcc/4.8.4/lib64
#prepend-path LIBS -L/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path LIBS -B/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/
#prepend-path LIBS -L/opt/gcc/4.8.4/lib/
#prepend-path LIBS -B/opt/gcc/4.8.4/lib/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/libexec/gcc/
#prepend-path GCC_EXEC_PREFIX -L/opt/gcc/4.8.4/lib/gcc/

Install Octave 4.0.0 on CentOS 6.6

Download from: ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz

tar -xzvf octave-4.0.0.tar.gz
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64
./configure --exec-prefix=/opt/octave/4.0.0 --datarootdir=/opt/octave/4.0.0/share --datadir=/opt/octave/4.0.0/share --infodir=/opt/octave/4.0.0/share/info --includedir=/opt/octave/4.0.0/include --oldincludedir=/opt/octave/4.0.0/include
make -j64 # if you want to compile on 64 cores...
make install

Create module file /etc/modulefiles/octave/4.0.0:

#%Module1.0####################################################################
##
## octave modulefile
##
##
##
prepend-path PATH /opt/octave/4.0.0/bin
prepend-path LD_LIBRARY_PATH /opt/octave/4.0.0/lib
prepend-path MANPATH /opt/octave/4.0.0/share/man

 

Install Octave 3.8.2 on CentOS 6.6

Download from: ftp://ftp.gnu.org/gnu/octave/octave-3.8.2.tar.gz

tar -xzvf octave-3.8.2.tar.gz
export JAVA_HOME=/usr/lib/jvm/java/
./configure --exec-prefix=/opt/octave/3.8.2 --exec-prefix=/opt/octave/3.8.2  --datadir=/opt/octave/3.8.2/share
make -j64 # if you want to compile on 64 cores...

Create module file /etc/modulefiles/octave/3.8.2:

#%Module1.0####################################################################
##
## octave modulefile
##
##
##
prepend-path PATH /opt/octave/3.8.2/bin
prepend-path LD_LIBRARY_PATH /opt/octave/3.8.2/lib
prepend-path MANPATH /opt/octave/3.8.2/share/man

 

Standalone install of boost 1.49.0 on Centos 6.6

Get file: http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.gz/download

tar -xzvf
module load openmpi-x86_64
./bootstrap.sh -prefix=/opt/boost/1.49.0
./b2 -j20 # if you want to compile on 20 cores :-)
mkdir -p /opt/boost/1.49.0
cp -r stage/ /opt/boost/1.49.0/

Create module file /etc/modulefiles/boost/1.49.0

#%Module1.0####################################################################
##
## boost modulefile
##
##
##

prepend-path LD_LIBRARY_PATH /opt/boost/1.49.0/stage/lib

Add Numpy to python install

install Numpy numpy-1.8.1.tar.gz download from http://sourceforge.net/projects/numpy
module load python/2.7.6  # build python
use gfortran
python setup.py build –fcompiler=gnu95
checkinstall python setup.py install

Python 3.4

python setup.py clean
module unload python/2.7.6
module load python/3.4.1
python3 setup.py build –fcompiler=gnu95
checkinstall python3 setup.py install

Cantera installation

Download cantera from http://code.google.com/p/cantera

module load scons/2.3.1  # build scons
module load python/2.7.6  # build python
scons build prefix=/opt/cantera/2.0-python-2.7.6
scons test
scons install

module file /etc/modulefiles/cantera/2.0-python-2.7.6

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##
## Add directory to the path
prepend-path PATH /opt/cantera/2.0-python-2.7.6/bin
prepend-path PYTHONPATH /opt/cantera/2.0-python-2.7.6/lib/python2.7/site-packages

module load python/2.7.6

Elmer tetgen plugin and more

tetgen plugin in
module load tetgen/1.4.3 qt/4.8.6
export ELMER_HOME=/opt/elmer/7
qmake
make -j4
make install

elmer solvers
#build elmer solvers
export FC=gfortran
export F77=gfortran

#Optimization:
export CFLAGS=”-O3″
export FCFLAGS=”-O3″
export FFLAGS=”-O3″
export CXXFLAGS=”-O3″

export NPROCS=4
#export USE_OWN_MATHLIBS=”yes”
export LIBS=-lpthread
buildtools/compile.sh

mathlibs
export LIBS=-lpthread
./configure –prefix=/opt/elmer/7 –exec-prefix=/opt/elmer/7 –oldincludedir=/opt/elmer/7 –with-mpi=yes –with-mpi-inc-dir=/usr/include/openmpi-x86_64 –with-mpi-lib-dir=/usr/lib64/openmpi/lib/openmpi/

compile elmerfem/fem
module load openfoam/2.3.x
cd fem
./configure –prefix=/opt/elmer/7 –exec-prefix=/opt/elmer/7
compile post
change in configure file: acx_tcltk_tcl_h_locs=”$acx_tcltk_tcl_h_locs /opt/tcltk/8.5.13/include /usr/include /usr/local/include /include /usr/swf/include /sw/include /sw/usr/include /really/weird/place /ok/I/quit”
./configure –prefix=/opt/elmer/7 –exec-prefix=/opt/elmer/7
make -j4;make install

ElmerGUI standalone installation on CentOS

elmergui dir from elmerfem trunk (http://www.csc.fi/english/pages/elmer)
edit ElmerGUI.pri
module load qt/4.8.6 vtk/5.10.1 tbb/3.0-018
qmake
make
make install

module file /etc/modulefiles/elmer/7

#%Module1.0#########################################
##
## Discretizer AB modulefile
##
##
setenv ELMER_HOME /opt/elmer/7
setenv ELMERGUI_HOME /opt/elmer/7/bin
setenv ELMER_POST_HOME /opt/elmer/7/share/elmerpost
prepend-path PATH /opt/elmer/7/bin
prepend-path LD_LIBRARY_PATH /opt/elmer/7/lib

module load qwt/6.0.2 vtk/5.10.1 occ/6.5.4 tbb/3.0-018 openfoam/2.3.x

Elmergui.pri file: ElmerGUI.pri

Tetgen install

Download tetgen1.4.3.tar.gz from http://wias-berlin.de/software/tetgen
make
cp libtet.a and tetgen to lib and bin place

module file /etc/modulefiles/tetgen/1.4.3

#%Module1.0##########################################
##
## Discretizer AB modulefile
##
## Add directory to the path
prepend-path PATH /opt/tetgen/1.4.3/bin
prepend-path LD_LIBRARY_PATH /opt/tetgen/1.4.3/lib

PythonQT 2.1 standalone install on CentOS

Download PythonQt2.1_Qt4.8.zip from http://sourceforge.net/projects/pythonqt
module load cmake/2.8.12.2 qt/4.8.6  # check cmake and qt installations (also python should be loaded?)
cmake . -DCMAKE_INSTALL_PREFIX=/opt/pyqt/2.1
make -j4
make install

module file /etc/modulefiles/pyqt/2.1

#%Module1.0#########################################
##
##  Discretizer AB modulefile
##
##
## Set environment variables
setenv          PYQT4_ROOT_DIR     ”/opt/pyqt/2.1”
prepend-path    LD_LIBRARY_PATH    /opt/pyqt/2.1/lib