Spectral methods for FEM
Short: sudo apt-get install libvtk5-dev libblas-dev mpic++
Install headers and libraries for C++: sudo apt-get install libvtk5-dev
For a list of related packages: https://launchpad.net/ubuntu/+source/vtk
Documentation: http://www.netlib.org/lapack/explore-html/ or old-fashion http://www.netlib.org/blas/
Beside being implementations, BLAS and LAPACK are also API standard for basic linear algebra operations (such as vector and matrix multiplication). So one can test with calls to blas, and then change to a optimized implementation, eg. Atlas or Openblas later.
cblas is a part of the blas installation(actually it is just an interface for calling the fortran library blas.so). Pass all arguments by reference because of the Fortran implementation.
http://packages.ubuntu.com/source/quantal/blas sudo apt-get install libblas-dev
User guide http://www.netlib.org/lapack/lug/lapack_lug.html
http://www.math.utah.edu/software/lapack.html http://www.netlib.org/clapack/readme
http://www.math.utah.edu/software/c-with-fortran.html
Start by looking at http://stackoverflow.com/questions/329259/how-do-i-debug-an-mpi-program
And then at http://www.open-mpi.org/faq/?category=debugging
It is possible to use valgrind with MPI. There is two directions to go:
OpenMPI have a memchecker included. It is enabled like this:
First MPI needs to be compiled with support for valgrind. Download Open MPI and configure as described here.
Then it is possible to run $ mpirun -np 8 valgrind ./my-exe
that is, launch 8 valgrinds, each running one process’ worth of my-exe
Valgrind needs to be compiled with support for mpi, as described here.
$./configure –with-mpicc=/path/to/mpicc
This will make a library file: libmpiwrap-<platform>.so(libmpiwrap-amd64-linux.so) which is needed when valgrind is called. Alternatively the lib can be linked directly to my-exe at compilation time. This should not influence the generel behavior of my-exe.
Look here for a technical description of the difference of the two methods.
http://packages.ubuntu.com/source/quantal/vtk
MPI: http://liberlocus.blogspot.dk/2013/03/how-to-write-vtk-file-in-parallel.html
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/DataManipulation/Cxx/RGrid.cxx
!HUSK! At binær data skal skrives som Big Indian. Standard er litle indian. Kun relevant hvis vi selv skriver rutinen.
Set the following.
module load python/2.7.3 python=’pyhton2.7’ module load VTK/5.10.1
Path to libraries on gbar ########
######## LIBBLAS = -L/appl/htopopt/RH61/atlas-3.9.49/lib/ -lcblas -latlas INCBLAS = -I/appl/htopopt/RH61/atlas-3.9.49/include/
#######
####### LIBVTK = -L/appl/VTK/5.10.1/lib/vtk-5.10/ -lvtkCommon -lvtkIO -lvtkFiltering INCVTK = -I/appl/VTK/5.10.1/include/vtk-5.10/
module load: studio/12u3b mpi/studio