Category Archives: centos

mbdyn 1.6.0 installation on Centos 6.6

First install some stuff:

yum install ginac ginac-devel ginac-utils

Install metis 4 or update mbdyn..

module load metis/4.0.3

Download from:

wget https://www.mbdyn.org/userfiles/downloads/mbdyn-1.6.0.tar.gz
wget https://www.mbdyn.org/userfiles/downloads/mbdyn-1.6.0-nested-string-drive.1.patch
wget https://www.mbdyn.org/userfiles/downloads/mbdyn-1.6.0-function-in-statement.1.patch
tar -xzvf mbdyn-1.6.0.tar.gz
 cd mbdyn-1.6.0
 patch -p0 < ../mbdyn-1.6.0-nested-string-drive.1.patch
 patch -p0 < ../mbdyn-1.6.0-function-in-statement.1.patch
 ./configure -prefix=/opt/mbdyn/1.6.0 -exec-prefix=/opt/mbdyn/1.6.0 -oldincludedir=/opt/mbdyn/1.6.0/include

Some more stuff (with correct version) has to be installed (some day):

configure: WARNING: Umfpack not supported
 configure: WARNING: KLU not supported
 checking for jdqz... no
 configure: WARNING: MPI not supported

We just skip forward:

make -j4  # if you want to compile on 4 cores...
make install

Module file /etc/modulefiles/mbdyn/1.6.0

#%Module1.0####################################################################
 ##
 ## modulefile by Discretizer AB
 ##
 ##
 prepend-path PATH /opt/mbdyn/1.6.0/bin
 prepend-path LD_LIBRARY_PATH /opt/mbdyn/1.6.0/lib
 prepend-path MANPATH /opt/mbdyn/1.6.0/share/man
 prepend-path CPLUS_INCLUDE_PATH /opt/mbdyn/1.6.0/include
 prepend-path CPPFLAGS -I/opt/mbdyn/1.6.0/include
 prepend-path LIBS -L/opt/mbdyn/1.6.0/lib

Test run:

module load mbdyn/1.6.0
mkdir rigidbody
cd rigidbody
wget https://www.mbdyn.org/userfiles/documents/examples/rigidbody
mbdyn rigidbody
cd ..
mkdir rigidpendulum
cd rigidpendulum/
wget https://www.mbdyn.org/userfiles/documents/examples/rigidpendulum
mbdyn rigidpendulum
cd ..
mkdir planemech
cd planemech/
wget https://www.mbdyn.org/userfiles/documents/examples/planemech
mbdyn planemech

Install old Metis 4.0.3 for mbdyn on Centos 6.6

Get the latest version in the 4-series:

wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.3.tar.gz
tar -xzvf metis-4.0.3.tar.gz
cd metis-4.0.3
make -j4
mkdir -p /opt/metis/4.0.3/bin
mkdir /opt/metis/4.0.3/lib
mkdir /opt/metis/4.0.3/include
cp Lib/*.h /opt/metis/4.0.3/include/
cp libmetis.a /opt/metis/4.0.3/lib/libmetis.so
chmod +x /opt/metis/4.0.3/lib/libmetis.so
cp pmetis kmetis oemetis onmetis mesh2dual mesh2nodal partdmesh partnmesh graphchk /opt/metis/4.0.3/bin/
cp -r Doc/ /opt/metis/4.0.3/doc

Module file /etc/modulefiles/metis/4.0.3 :

#%Module1.0####################################################################
 ##
 ##  Discretizer AB modulefile
 ##
 ##
 ## Add directory to the path
 prepend-path PATH /opt/metis/4.0.3/bin
 prepend-path LD_LIBRARY_PATH /opt/metis/4.0.3/lib
 prepend-path CPLUS_INCLUDE_PATH /opt/metis/4.0.3/include
 prepend-path CPPFLAGS -I/opt/metis/4.0.3/include
 prepend-path LIBS -L/opt/metis/4.0.3/lib

 

Vortexje compilation error on Centos 6.6

 

First:

yum install eigen3-devel  (probably from epel)
module load cmake/2.8.12.2  # installation here

I downloaded vortexje from:

git clone git://git.baayen-heinz.com/Vortexje.git
cd Vortexje
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/vortexje/git_20150326
make -j4

then I got this problem:

[ 93%] Building CXX object examples/hawt/CMakeFiles/hawt.dir/hawt.cpp.o
/root/build/Vortexje/examples/hawt/hawt.cpp: In function \u2018int main(int, char**)\u2019:
/root/build/Vortexje/examples/hawt/hawt.cpp:286: error: call of overloaded \u2018moment(std::shared_ptr<HAWT>&, Eigen::Vector3d&)\u2019 is ambiguous
/root/build/Vortexje/./vortexje/solver.hpp:112: note: candidates are: Eigen::Vector3d Vortexje::Solver::moment(const std::shared_ptr<Vortexje::Body>&, const Eigen::Vector3d&) const
/root/build/Vortexje/./vortexje/solver.hpp:113: note: Eigen::Vector3d Vortexje::Solver::moment(const std::shared_ptr<Vortexje::Surface>&, const Eigen::Vector3d&) const
make[2]: *** [examples/hawt/CMakeFiles/hawt.dir/hawt.cpp.o] Error 1
make[1]: *** [examples/hawt/CMakeFiles/hawt.dir/all] Error 2
make: *** [all] Error 2

which i resolved with a dynamic cast of the hawt and vawt object (in hawt.cpp and vawt.cpp):

// Log shaft moment:
Vector3d M = solver.moment( dynamic_pointer_cast< Vortexje::Body >(hawt), position);

module file: /etc/modulefiles/vortexje/git_20150326

#%Module1.0####################################################################
##
## Discretizer AB modulefile
##
##
prepend-path CPLUS_INCLUDE_PATH /opt/vortexje/git_20150326/include/vortexje/
prepend-path LD_LIBRARY_PATH /opt/vortexje/git_20150326/lib

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