[Ariadne Logo]


Compilation procedure in pC++

To run a program in pC++, we need to ensure that the environment variable PATH contains the sage bin directory in the .cshrc file. This can be done by using

set path=($path /home/csi/cuny/sameer/rs/sage/bin/sgi8k)
Next, the files SAGEROOT and SOURCE in the program directory should be contain the location of the sage distribution and the name of the source file (without the .pc extension) respectively.
geos [~/ts/newbic]% cat SAGEROOT
/home/csi/cuny/sameer/rs/sage
geos [~/ts/newbic]% cat SOURCE
newbic
The targets that can be built using the build command are mpi , trc-mpi (for tracing), prf-mpi (for profiling), rpl-mpi (for replay), snz-mpi (for sneezy support), snz-rpl-mpi (for both sneezy and replay support), et. al. Currently, we are using mpi version of pC++ on the SGITRIO. The pC++ program was compiled for the SGI Power Challenge and run on eight processors. Compilation for tracing was done as follows:
geos [~/ts/newbic]% build trc-mpi
        /home/csi/cuny/sameer/rs/sage/bin/sgi8k/pc++  -O -t -w \
                -o trc-temp.C -I. -I/home/csi/cuny/sameer/rs/sage/tulip/include -I/home/csi/cuny/sameer/rs/sage/pcxxrts/include \
                -D__MPI__ newbic.pc
        CC  -g -I. -I/home/csi/cuny/sameer/rs/sage/tulip/include -I/home/csi/cuny/sameer/rs/sage/pcxxrts/include \
                -D__MPI__ -DTRACING_ON -c trc-temp.C
        CC  -g  -o trc-mpi trc-temp.o \
                 /home/csi/cuny/sameer/rs/sage/tulip/mpi/lib/sgi8k/libtrc-tulip.a  /home/csi/cuny/sameer/rs/sage/pcxxrts/lib/sgi8k/kernelsupport.o -lm -lmpi
To run it on eight processors, we use the Ariadne Event Class "G" (for Ariadne tracing)
geos [~/ts/newbic]% setenv MPI_DEFAULT_NP 8
geos [~/ts/newbic]% trc-mpi -pcxx_EVENTCLASS G
...
Elt 128 merged elt 136 at level 4
Elt 224 merged elt 232 at level 4
Elt 208 merged elt 216 at level 4
...
Note : we could also have used mpirun as in :
% mpirun -np 8 trc-mpi -pcxx_EVENTCLASS G
The trace files are generated from the above execution.
geos [~/ts/newbic]% ls mpi.0*
mpi.0000.trc   mpi.0002.trc   mpi.0004.trc   mpi.0006.trc
mpi.0001.trc   mpi.0003.trc   mpi.0005.trc   mpi.0007.trc

These eight trace files are then merged into a single pC++ format trace file using the command
geos [~/ts/newbic]% pcxx_merge -a mpi.0* MPI.trc
mpi.0000.trc: 203 records read.
mpi.0001.trc: 190 records read.
mpi.0002.trc: 209 records read.
mpi.0003.trc: 164 records read.
mpi.0004.trc: 176 records read.
mpi.0005.trc: 138 records read.
mpi.0006.trc: 157 records read.
mpi.0007.trc: 138 records read.
This generates the MPI.trc trace file. We then convert it to the Ariadne/AVE file format using the filter pcxx2ar
geos [~/ts/newbic]% pcxx2ar MPI.trc newbic.edf newbic.trace
The file newbic.trace generated by the filter is now ready to be loaded in Ariadne/AVE. To describe the behavior of the program as captured in this trace file, we need a modeling language.
[PREV] [Back to tutorial] [NEXT]
Sameer Shende <sameer@cs.uoregon.edu>