Monthly Archives: March 2015

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

Calculate pressure on incompressible

Install foamCalcEx

#(if necessary yum install mercurial)
hg clone https://code.google.com/p/foamcalcex/
cd foamcalcex
./Allwmake
#usage
foamCalcEx multiplyDivide p multiply -value 1000 -latestTime   #creates p_multiply_value
ptot -latestTime  #creates ptot based on p
foamCalcEx multiplyDivide ptot multiply -value 1000 -latestTime  #creates ptot_multiply_value