Parallel
Systems
EPPA for pvm:
User Documentation
Code Instrumentation
The files & their purpose
On our LINUX system, the files are under the PARDIR directory
(set to /home/parallel/software).
Or download the files from the pvm
example with EPPA.
The files:
- the executable EPPA
- the header files: EPPAInstrumentation.h, standardlib.h
- the library: libpar.a (contains the necessary object
files)
The compiler needs:
pvm, mysql : pvm and database
parlib.a : library with the class measure
EPPAInstrumentation.h & standardlib.h
: headers for compiling
Include them in the projectfile as follow:
INCLUDEPATH = /usr/include/g++
$(PVM_ROOT)/include $(MYSQLDIR)/include
$(PARDIR)/include
LIBS
= -L$(PVM_ROOT)/lib/LINUX -L$(MYSQLDIR)/lib
-L$(PARDIR)/lib -lpar -lpvm3
-lgpvm3 -lmysqlclient
If you put the EPPA files in a different directory as your code, add
this
path
to the INCLUDEPATH and change -L$(PARDIR)/lib
into -L plus the path
Start:
EPPAProbe(const string& alg_name, int machines, DO_WITH_SIMILAR_EXP doWithSimilarExp=REPLACE_IF_FASTER, int W=1, const string& comment_str = " ")
- constructor for the master
- alg_name: specify a
name of the parallel algorithm under study
- machines = #
processors. If your master doesn't do anything
useful, it must NOT be included, then it will not be used in the
performance calculation. To write the sequential experiment to the
database, set machines to
1.
- doWithSimilarExp:
experiments of the same user, with the same name, #processors and
problem size W are considered to be similar,
so there are no reasons to keep multiple measurements in the database.
Specify here what should be done with similar experiments
- possible values: enum
DO_WITH_SIMILAR_EXP {REPLACE_IF_FASTER,
REPLACE_IF_SUCCESFULL, ASK_USER, DO_NO_REPLACE_EXP};
- REPLACE_IF_FASTER
(default): experiment replaces similar experiments, if the runtime is
less.
- REPLACE_IF_SUCCESFULL:
the new experiment will always replace similar ones (if the master ends
without crashing).
- ASK_USER: the user
will be asked what should happen
- DO_NO_REPLACE_EXP:
do not replace anything.
- (optional) W = the
problem size (e.g. # cities for TSP)
- (optional) comment text
- each experiment gets
a unique number: the experimentID
EPPAProbe();
- this will not activate the measuring. Use this for the master.
EPPAProbe(bool activateMeasurements);
- constructor for the slaves. Specify whether to activate the
measuring, be aware that measuring should be on or off for all processes.
void StartMeasuring();
- (optional) This restarts the time measurement, which starts
automatically after the constructor. Don't call it when there are
already phases instrumented.
void SlaveIsSpawned(int slaveTid);
- Mandatory! Call this function whenever a process is spawned, pass
its pvm task id (tid). A phase of type PH_SPAWN is automatically added
to the measurements.
Destructor:
~EPPAProbe();
- Ends the parallel measurement, then calculates and writes the
totals to the database.
void Stop();
- (optional) Use if you want to stop the measurents before the
destructor is called.
Measure:
TIME EndOfPhase(int
phaseType,
int nbrQuantums=0, int nbrOperations=0, string comment="");
- Indicate the end of a phase of your parallel program.
- Specify the type of the phase :
enum BasicPhaseType {PH_IDLE=2, PH_WORK=3, ..., PH_PART=8, PH_SYNC=9};
PH_IDLE: whenever the process was idle (at blocking receive points)
PH_WORK: when the process has performed useful work
PH_PART: the partitioning of the work
PH_SYNC: for extra synchronisation overhead, specific for your parallel algorithm
- (optional) nbrQuantums:
value for the size of work, the number of basic 'quantums'
processed. For the moment, this is just for information, it is shown on
the execution profile of EPPA..
- (optional) nbrOperations:
the number of operations performed, if different than nbrQuantums (like the number
of sort operations). NOT USED FOR THE MOMENT
- (optional) comment:
for informative reasons only. Can be changed with EPPA.
- Returns the duration of the elapsed phase in us. TIME is defined in standardlib.
TIME EndOfCommPhase(int
phaseType, int commPartnerTid=-1, int nbrQuantums=0, string comment="");
Information:
int GetExperimentID(); // database experiment ID
TIME ViewExpChrono(); // time since start of experiment (us)
TIME ViewPhaseChrono(); // time
of current phase (us)
<>
<>
<>
- Back to
the top
-