Skip to content
bbanerjee edited this page Nov 13, 2014 · 4 revisions

ParSim (Parallel Particle Simulation) contains a number of different and unrelated codes. The main trunk contains a fork of Uintah (http://uintah.utah.edu) codenamed Vaango.

Accessing the ParSim repository on GitHub via Ubuntu 13.10+

  • Create a GitHub account
   https://github.com/signup/free
  • Install git on your machine
   sudo apt-get install git-core
  • Setup git configuration
   git config --global user.email "your_email@your_address.com"
   git config --global user.name "your_github_username"
  • Email your github username to Biswajit @ gmail.com
   b.banerjee.nz
  • Create a clone of the ParSim repository
   git clone https://github.com/bbanerjee/ParSim
  • Check branches/master
  git branch -a
  • Configure ssh for secure access (if needed)
  cd ~/.ssh
  mkdir backup
  cp * backup/
  rm id_rsa*
  ssh-keygen -t rsa -C "your_email@your_address.com"
  sudo apt-get install xclip
  cd ~/ParSim/
  xclip -sel clip < ~/.ssh/id_rsa.pub
  ssh -T git@github.com
  ssh-add
  ssh -T git@github.com
  • For password-less access with ssh, use
  git remote set-url origin git@github.com:bbanerjee/ParSim.git
  • To change the default message editor, do
  git config --global core.editor "vim"

Getting the latest version, adding files etc.

  • Check status
  git status
  git diff origin/master
  • Update local repository
  git pull
  • Add file to your local repository
  git add README
  git commit -m 'Added README file for git'
  • Update main repository with your changes
  git push origin master

Building Vaango

Instructions for building Vaango on Ubuntu are given below. Instructions for building the other codes will follow soon.

Prerequisites

Cmake:

  • You will probably need to install Cmake to control the software compilation process. To do that:
     sudo apt-get install cmake

Compilers:

  • You also need to have gfortran:
     sudo apt-get install gfortran
  • and a C Compiler known as gcc:
     sudo apt-get install gcc
  • You will need boost for parts of the code (and also the unit tests) to compile.
     sudo apt-get install libboost-all-dev

MPI and XML libraries:

  • the OpenMPI libraries:
     sudo apt-get install mpi-default-dev
  • and libxml2:
     sudo apt-get install libxml2
     sudo apt-get install libxml2-dev

Other libraries:

  • You will also need to install the development version of zlib.
     sudo apt-get install zlib1g zlib1g-dev
  • The Peridynamics code uses parts of the Eigen3 library. You will have to install this library if you don't have it in your system:
     sudo apt-get install libeigen3-dev
  • In order for related code like MPM3D_xx etc. to work, you will also need the VTK libraries. Use
     sudo apt-get install libvtk5-dev
     sudo apt-get install python-vtk tcl-vtk libvtk-java libvtk5-qt4-dev
  • In some older versions of Vaango, libpcl is used read point data file. In order to get PCL(The Point Cloud Library) you need to run these three commands:
    sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
    sudo apt-get update
    sudo apt-get install libpcl-all

Building the executables

The Vaango repository

After you get the code from GitHub, follow these steps:

  • Go to the Vaango directory:
     cd ParSim/Vaango
  • The source code is in the directory src.

Out-of-source optimized build

  • For the optimized build, create a new directory called opt under Vaango:
    mkdir opt
  • followed by:
    cd opt
  • To create the make files do:
    cmake ../src

Out-of-source debug build

  • For the debug build, create a directory dbg under Vaango:
    mkdir dbg
    cd dbg
  • To create the makefiles for the debug build, use
    cmake -DCMAKE_BUILD_TYPE=Debug ../src

Unit tests

If you want the units tests to be compiled, use the alternative command

    cmake ../src -DBUILD_UNITS_TESTS=1

Clang compiler:

If you want to used the clang compiler instead of gcc:

    cmake ../src -DUSE_CLANG=1

Visit build:

Older versions of Visit required the following extra step if you want to make sure that Visit is able to read Uintah output format files (also called UDA files) you will need to use

   cmake ../src -DVISIT_DIR=/path/to/Visit

Compiling the code:

  • Next you need to compile the needed files from src. So enter your opt directory and then type :
...:~/ParSim/Vaango/opt$ make
  • After this compilation you have all the executable files in your opt directory.
  • The same process can also be used for the debug build.

Running example problems

  • Create a directory called runs under Vaango
     mkdir runs
  • Create links to the optimized and debug executables:
     cd runs
     ln -s ../dbg/StandAlone/vaango vaango_dbg
     ln -s ../opt/StandAlone/vaango vaango_dbg
  • Create links to the inputs directory:
     ln -s ../src/StandAlone/inputs/MPM MPM_inputs
  • Do a serial test run
     ./vaango_opt MPM_inputs/const_test_hypo.ups
  • Do a parallel test run
    mpirun ./vaango_opt MPM_inputs/const_test_hypo.ups
  • Send an email to Biswajit if something else is needed but not listed in these instructions.