|
Table of Contents
How to build GetFEM++ from SVN on Ubuntu Karmic for Matlab 2007b/2008aThat's what I did - might be incomplete etc. # Determine MATLAB directory, mex must be in the PATH. MATLAB_ROOT=`mex -v 2>&1 | grep "MATLAB " | awk '{print $4}' | sed -e '2,$d'` # May be thats not all you need sudo apt-get install build-essential gcc-4.2 automake subversion \ libtool libblas-dev liblapack-dev libqhull-dev libmuparser-dev # Get the sources svn co http://svn.gna.org/svn/getfem/trunk/getfem cd getfem/ ./autogen.sh ./configure --enable-matlab --disable-python --enable-superlu --with-pic \ --enable-qhull --enable-mumps=no --with-matlab-toolbox-dir=$MATLAB_ROOT/toolbox/getfem_toolbox # compile the library, speeded up using -j4, where 4 is the number of CPUs in your machine make -j4 # we have to move the old libraries to a different folder to make matlab use the newer ones from ubuntu sudo mkdir $MATLAB_ROOT/sys/os/glnxa64/old sudo mv $MATLAB_ROOT/sys/os/glnxa64/{libstdc*,libgcc_s*} $MATLAB_ROOT/sys/os/glnxa64/old/. make -j4 check # If all checks passed do cd interface/src/matlab sudo make install # Add the path to the matlab path definitions file echo "p=[matlabroot,'/toolbox/getfem_toolbox:',p];" | sudo tee -a $MATLAB_ROOT/toolbox/local/pathdef.m # If you see an empty output, the path should be added correctly $MATLAB_ROOT/bin/matlab -nodisplay -r "rehash toolboxcache; gf_workspace('clear'); exit;" How to build GetFEM++ from SVN on Ubuntu Lucid for Matlab 2010aThe following steps have to be executed before the steps in the instruction in the section above. # Add old karmic package sources to install gcc-4.2, which is needed for mex echo "deb http://de.archive.ubuntu.com/ubuntu/ karmic universe" | sudo tee -a /etc/apt/sources.list # install gcc-4.2 sudo apt-get update; sudo apt-get install gcc-4.2 # Determine MATLAB directory, mex must be in the PATH. MATLAB_ROOT=`mex -v 2>&1 | grep "MATLAB " | awk '{print $4}' | sed -e '2,$d'` # change gcc to gcc-4.2 and g++ to g++-4.2 in the mexopts file: # note that for older matlab releases you need gcc-4.0 etc. # make copy of the original file sudo cp $MATLAB_ROOT/bin/mexopts.sh $MATLAB_ROOT/bin/mexopts.sh.old # replace version numbers sudo sed -i "s/CC='gcc'/CC='gcc-4.2'/" $MATLAB_ROOT/bin/mexopts.sh sudo sed -i "s/CXX='g++'/CXX='g++-4.2'/" $MATLAB_ROOT/bin/mexopts.sh How to build GetFEM++ from SVN on Ubuntu Lucid for Matlab 2010bThe following steps have to be executed before the steps in the instruction in the section above.
# install gcc-4.3 sudo apt-get install gcc-4.3 # Determine MATLAB directory, mex must be in the PATH. MATLAB_ROOT=`mex -v 2>&1 | grep "MATLAB " | awk '{print $4}' | sed -e '2,$d'` # change gcc to gcc-4.3 and g++ to g++-4.3 in the mexopts file: # note that for older matlab releases you need gcc-4.0 etc. # make copy of the original file sudo cp $MATLAB_ROOT/bin/mexopts.sh $MATLAB_ROOT/bin/mexopts.sh.old # replace version numbers sed -i "s/CC='gcc'/CC='gcc-4.3'/" $MATLAB_ROOT/bin/mexopts.sh sed -i "s/CXX='g++'/CXX='g++-4.3'/" $MATLAB_ROOT/bin/mexopts.sh How to configure the parallelized version of GetFEM++ in UbuntuThere is no parallel version of the matlab interface yet. The parallelization is still a work in progress in GetFEM++. The assembly procedures of the bricks are parallelized so that if the parallel version of MUMPS is used as the solver, one can build rather easily a parallelized code. This is all what it is done for the moment.
This is section I describe the steps to build the parallelized version of GetFEM++, which can be used in C++ code. This section is rather untested # download, build and install libmetis cd ~ wget -O- http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz | tar -xzvf - cd metis-4.0 # we need a patch, to avoid a compile error (at least in Ubuntu Lucid), it does just some renaming wget http://www.math-linux.com/IMG/patch/metis-4.0.patch patch -p1 < metis-4.0.patch # add this option echo "COPTIONS = -fPIC" >> Makefile.in make -j4 sudo cp libmetis.a /usr/lib64/. # additionally to the dependencies mentioned in the sections above sudo apt-get install libmumps-4.9.2 libmumps-dev mpich2 # append `--parallel-level=4` where 4 is the number of CPUs of your computer cd ~/getfem/ ./configure --disable-matlab --disable-python --enable-superlu --with-pic \ --enable-qhull --enable-paralevel=4 Precompiled binariesInstead of building by your own you can easily download and install the following precompiled version of GetFEM++:
Install using: link=<paste the link from above here> MATLAB_ROOT=`mex -v 2>&1 | grep "MATLAB " | awk '{print $4}' | sed -e '2,$d'` cd $MATLAB_ROOT/toolbox wget -O- $link | sudo tar -xzvf - Comments |