Overview

This guide takes you through the necessary steps required to install the workshop software on a machine running Ubuntu Linux.

The following has been tested on Fedora 16.

Installation instructions

Please note that for installation to be successful, the software must be installed in the following order.

Define some environmental variables

Add the following to your .bashrc file:

# Path to ipta_software directory (where /home/ is your home directory) eg:
export IPTA_DIR=/home//ipta_software

# OSTYPE
export OSTYPE=linux

# PSRCAT
export PSRCAT_FILE=$IPTA_DIR/psrcat_tar/psrcat.db

# Tempo
export TEMPO=$IPTA_DIR/tempo

# Tempo2
export TEMPO2=$IPTA_DIR/tempo2/T2runtime

# PGPLOT
export PGPLOT_DIR=$IPTA_DIR/pgplot_build
export PGPLOT_DEV=/xwindow

# PRESTO
export PRESTO=$IPTA_DIR/scottransom-presto-59b9e74

# LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:$IPTA_DIR/lib:\
$IPTA_DIR/pgplot_build:$IPTA_DIR/scottransom-presto-59b9e74/lib

# PATH
# Some Presto executables match sigproc executables so keep separate - 
# all other executables are found in $IPTA_DIR/bin
export PATH=$PATH:$IPTA_DIR/bin:$IPTA_DIR/scottransom-presto-59b9e74/bin
Then reload your .bashrc file and check changes are taken up:
$ source ~/.bashrc
$ echo $IPTA_DIR
Download the software archive Extract it with:
$ tar -xvf ipta_software.tar
Make the software directory your working directory
$ cd ipta_software
Install some dependencies
$ su
$ for line in $(<fedora_dependencies.txt); do yum install $line; done
$ exit
Download the latest versions of psrchive, tempo and tempo2
$ git clone git://psrchive.git.sourceforge.net/gitroot/psrchive/psrchive
$ cvs -z3 -d:pserver:anonymous@tempo.cvs.sourceforge.net:/cvsroot/tempo co -P tempo
$ cvs -z3 -d:pserver:anonymous@tempo2.cvs.sourceforge.net:/cvsroot/tempo2 co tempo2
Build fftw
$ cd fftw-3.3.1
a) single precision (for Psrchive)
$ ./configure --prefix=$IPTA_DIR --enable-float
$ make
$ make check
$ make install
$ make clean
b) double precision (for Tempo2)
$ ./configure --prefix=$IPTA_DIR
$ make
$ make check
$ make install
$ make clean 
Build cfitsio:
$ cd ../cfitsio
$ ./configure --prefix=$IPTA_DIR
$ make shared
$ make install
$ make clean
Build psrcat
$ cd ../psrcat_tar
$ source makeit
Copy psrcat executable to $IPTA_DIR/bin:
$ cp psrcat $IPTA_DIR/bin
Build pgplot
$ cd ../pgplot_build
$ ../pgplot/makemake ../pgplot linux g77_gcc

Edit the makefile with the following:

a) Set the fortran compiler to gfortran (line 25):

FCOMPL=gfortran

b) Check paths to png.h, pngconf.h, zlib.h, zconf.h:

Change line: 882

pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h

to eg:

pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h /usr/include/zconf.h

Save the file and compile it:

$ make
$ make clean
$ make cpg
$ ld -shared -o libcpgplot.so --whole-archive libcpgplot.a
Try pgplot demo:
$ ./pgdemo1

Press enter at the prompt.

Build Tempo
$ cd ../tempo
$ ./prepare
$ ./configure F77=gfortran --prefix=$IPTA_DIR --with-cfitsio-dir=$IPTA_DIR \
--with-fftw3-dir=$IPTA_DIR LIBS=-lgslcblas
$ make
$ make install
Build Tempo2
$ cd ../tempo2
$ ./bootstrap
$ ./configure F77=gfortran --prefix=$IPTA_DIR --with-cfitsio-dir=$IPTA_DIR \
--with-fftw3-dir=$IPTA_DIR LIBS=-lgslcblas
$ make && make install
$ make plugins && make plugins-install
Test tempo2:
$ cd ../tempo2_test_data
$ tempo2 -gr plk -f psr1_2.par psr1.tim
Build Psrchive
$ cd ../psrchive
$ ./bootstrap
$ ./configure F77=gfortran --prefix=$IPTA_DIR --with-cfitsio-dir=$IPTA_DIR \
--with-fftw3-dir=$IPTA_DIR
$ make
$ make install
Build Sigproc
$ cd ../sigproc-4.3
$ ./configure

Enter '/home//ipta_software/bin' at prompt to set default path of executables.

Edit makefile.linux with the following:

a) Ensure the PGPLOT libraries in the LPGPLOT line are in the following order, and add '-lpng' in order to get png output from PGPLOT:

-lcpgplot -lpgplot -lpng

b) Add the following to the end of the CCC line:

-I$(IPTA_DIR)/include

c) Add the following line defining the fortran compiler:

FC = gfortran -ffixed-line-length-none

d) Uncomment LFITS and LFFTW and edit paths to:

LFITS = -L$(IPTA_DIR)/lib/ -lcfitsio
LFFTW = -L$(IPTA_DIR)/lib/ -lfftw3 -lfftw3f

Remove the backslash and quote from dosearch.f (line 265):

Change from:

write(llog,*) 'DB\'s slow-but-simple harmonic summing routine'
to:
write(llog,*) 'DBs slow-but-simple harmonic summing routine'
Save the file and compile it:
$ make
$ make quickplot
Build Presto
$ cd ../scottransom-presto-59b9e74/src
$ make makewisdom
$ make prep
Edit Makefile with paths to libs and includes (from line 39):
# Path to FFT includes
FFTINCDIR = -I$(IPTA_DIR)/include
# Path to FFT libraries
FFTLIBDIR = -L$(IPTA_DIR)/lib
# Other lib directories (line 48):
OTHERLIBDIR = -L$(IPTA_DIR)/lib
Check the fortran compiler is set to gfortran on line 61 (if PGPLOT was compiled with gfortran):
FC = gfortran
Continue the compilation:
$ make
$ make clean
Build Gnuplot
$ cd ../../gnuplot-4.4.3
$ ./configure --prefix=$IPTA_DIR
$ make
$ make install
$ make clean
Test gnuplot with:
$ gnuplot
gnuplot> test
Common installation problems Tempo2

If you get a segfault error running:

$ tempo2 -gr plk -f psr1_2.par psr1.tim

Download a fresh copy through cvs, reboot and compile from scratch.

If you get lots of PGPLOT device errors, try a pgplot demo again, then run the above command again.