Friday, 11 December 2015

Experiences with the TRISTAN-MP

Tristan-mp (and on TRAC ) is a massively parallel, fully relativistic, Particle-In-Cell code for plasma physics applications. Inspired by a tutorial by Rony Keppens on the induction equation and the Petschek model of magnetic reconnection  ( sample models for VAC )

This code is barely documented and this posting provides a few clues on how to get going!

Recipe for Building Tristan-MP

We built the hdf5 libraries and compiled your code in the home directory. It seems there is no error with a missing library problem mentioned by a colleague.
Just a brief instruction of building hdf5 libraries and compiling Tristan-MPI is here:
1- inside hdf/hdf5-1.8.9 folder
- make clean
- module add mpi/gcc/openmpi/1.4.4
- ./configure --prefix=/home/usr/hdf/hdf5-1.8.9 --enable-fortran --enable-parallel --enable-unsupported --enable-debug=all
- make
- make check
- make install
- make check-install
2- compiling Tristan-MPI
- inside Tristan-MPI
- module add mpi/gcc/openmpi/1.4.4
- go to source
- make clean
- make
* Note: We editted Makefile which is inside Tristan-MPI/source :
e.g. :
FC= /home/usr_dir/hdf/hdf5-1.8.9/bin/h5pfc
LD= /home/usr_dir/hdf/hdf5-1.8.9/bin/h5pfc
INCPATH= -I/usr/local/mpi/gcc/openmpi/1.4.4/include
and also we added LIBPATH to the Makefile
LIBPATH = -L/usr/local/mpi/gcc/openmpi/1.4.4/lib -L/home/usr_dir/hdf/hdf5-1.8.9/lib -lmpi -lmpi_f90  -lmpi_f77 -lhdf5_fortran -lhdf5
You can do the same for your own makefile.
Guidelines on building HDF5 are on the HDF5 site.
A link to  the Makefile we use is here

 Running the Code and Analysing the Ouput

The compiled model is run using an MPI with the following command embedded in a script file
mpirun tristan-mp2d
Loading the output was easy starting Matlab on our HPC cluster

The code generates a mountain of data
For each timestep (where xxx is the timestep) (bx,by,bz,dens,densi, ex,ey,ez,jx,jy,jz) (dens,dens0,dpx,dpy,dpz,p(x,y,z)bin, p(x,y,z)lim, p(x,y,z)elogsp,xshock,xsl  (particle data)

All we need now is to complete this post with some output from one of the initial test runs!


  1. Hi,
    Thanks for your post, it is difficult to find information about this code on web. Being post-doc in plasma astrophysics it's been some time I'm trying to find the source code for Tristan-mp but it seems not to be open to everybody. Need a pass for the svn repository on the code wiki page. Maybe I'm wrong, is there any way I could download the src of the code?
    Thank you

  2. Please e-mail

    See are reference at

    Let me know how you get on