Table of Contents
In this exercise, you will use the TAU performance observation tools to automatically generate a proxy component that monitors all of the method invocations on a port allowing you to track their performance information. While this approach won't provide all of the performance details of what is going on inside each component, it gives you a very simple way to begin analyzing the performance of a CCA-based application in order to identify which components might have performance issues.
We will start by create a proxy component for the integrator.IntegratorPort.
Note that you only need to have completed Chapter 3, Sewing CCA Components into an Application: the Driver
Component
in order to follow these instructions. Though the proxy will be
implemented in C++, it can proxy for components implemented in any
language.
![]() |
Warning |
|---|---|
|
The following instructions assume that you chose to implement the
|
Edit the file
and make the following addition:
$STUDENT_SRC/components/sidl/integrators.sidl
package integrators version 1.0 {
class MonteCarlo implements integrator.IntegratorPort,
gov.cca.Component,
gov.cca.ComponentRelease
{
// integrator.IntegratorPort methods:
double integrate(in double lowBound, in double upBound, in int count);
// gov.cca.Component methods:
void setServices(in gov.cca.Services services) throws gov.cca.CCAException;
// gov.cca.ComponentRelease methods:
void releaseServices(in gov.cca.Services services) throws gov.cca.CCAException;
}
class Trapezoid implements-all integrator.IntegratorPort,
gov.cca.Component,
gov.cca.ComponentRelease
{
}
class Simpson implements-all integrator.IntegratorPort,
gov.cca.Component,
gov.cca.ComponentRelease
{
}
class IntegratorProxy implements-all integrator.IntegratorPort,
gov.cca.Component
{
}
}
This will give us a new component, called IntegratorProxy that
implements the integrator.IntegratorPort.
Edit and make
the following additions:
$STUDENT_SRC/components/MakeIncl.components
# SIDL files containing component declarations
# For example:
# SIDL_FILES = sidl/drivers.sidl
SIDL_FILES = sidl/functions.sidl sidl/integrators.sidl sidl/randomgens.sidl \
sidl/drivers.sidl
# The COMPONENTS list contains the fully-qualified names of the component
# classes, augmented with -LANGUAGE, where LANGUAGE is the language
# in which the component is implemented, e.g., c, cxx, f90.
# For example:
# COMPONENTS = drivers.F90Driver-f90 drivers.CXXDriver-cxx
COMPONENTS = functions.PiFunction-cxx \
integrators.MonteCarlo-f90 randomgens.RandNumGenerator-cxx \
drivers.CXXDriver-cxx integrators.IntegratorProxy-cxx
In the
directory, type
$STUDENT_SRC/componentsmake .integrators.IntegratorProxy-cxx to rebuild the
repository. The output should look something like this:
### Generating XML for SIDL packages containing component declarations
/san/cca/cca-tools_gcc_intelF90_PIC/bin/babel -t xml -R../xml_repository \
-R/san/cca/cca-tools_gcc_intelF90_PIC/share/cca-spec-babel-0_7_8-babel-0.10.10/xml \
-o ../xml_repository sidl/functions.sidl sidl/integrators.sidl \
sidl/randomgens.sidl sidl/drivers.sidl
Babel: Parsing URL "file:/san/homedirs/bernhold/\
student-src/components/sidl/functions.sidl"...
Babel: Parsing URL "file:/san/homedirs/bernhold/\
student-src/components/sidl/integrators.sidl"...
Babel: Parsing URL "file:/san/homedirs/bernhold/\
student-src/components/sidl/randomgens.sidl"...
Babel: Parsing URL "file:/san/homedirs/bernhold/\
student-src/components/sidl/drivers.sidl"...
Babel: Parsing URL "file:/san/homedirs/bernhold/\
student-src/components/sidl/unitdrivers.sidl".
Babel: Parsing URL "file:/san/homedirs/bernhold/\
student-src/components/sidl/library.sidl".
touch .repository
### Generating a cxx implementation for the integrators.IntegratorProxy \
component.
/san/cca/cca-tools_gcc_intelF90_PIC/bin/babel -s cxx -R../xml_repository \
-R/san/cca/cca-tools_gcc_intelF90_PIC/share/cca-spec-babel-0_7_8-babel-0.10.10/xml \
-g -u -E -l -m integrators.IntegratorProxy. --suppress-timestamp \
integrators.IntegratorProxy
Babel: Resolved symbol "integrators.IntegratorProxy"...
touch .integrators.IntegratorProxy-cxx