The code for the tutorial itself comes in two forms, with pointers to
both at http://www.cca-forum.org/tutorials/#sources. The file
tutorial-src- is the complete package, which has the full code
for all of the components created in this Guide as well as a number of
others. The file version.tar.gzstudent-src- is a stripped-down version of the
tutorial code, from which we've removed all of the components created
in working through this Guide.
version.tar.gz
![]() |
Note |
|---|---|
|
At the time this particular version of the Hands-On Guide was
generated, the |
In order to give you a richer set of components to play with
initially, we use the tutorial-src tree in Chapter 2, Assembling and Running a CCA Application, and the student-src tree for the
remaining exercises. Throughout, the tutorial-src tree can be used
as a reference, so see how things should look
when you complete the exercises.
If you're participating in an organized tutorial, we will have built
the tutorial-src tree for you in advance in a common location,
whereas if you're working through these exercises on your own, you'll
need to build it yourself. In both cases, you'll need to build your
own copy of the student-src tree to work in. The procedure for
both is nearly identical, and unless otherwise indicated, we will use
tutorial-src to indicate either
tutorial-src or student-src.
![]() |
Tip |
|---|---|
|
Make sure you've setup your login environment per Section B.4, “Setting Up Your Login Environment”. To complete the procedures
in this section, you will need to have Babel and Ccaffeine in your
execution path, and your |
Download the file(s) you need from the location above. (If you're
participating in an organized tutorial, the student-src- tar
file will already be on the system system, in the location indicated
in your account information handout.)
version.tar.gz
Untar the file in a convenient place with tar zxf
. When it completes, change
directories into the new code tree.
tutorial-src-version.tar.gz
The code tree includes components written in C, C++, F90, and
Python. You may need to configure the code tree according to the
languages you have available (dependent on how the CCA tools were
built in Appendix B, Building the CCA Tools and TAU, and Setting Up Your
Environment). Run
./configure --with-languages=" using the appropriate
space-separated list of languages for your environment. The default
is to include the languages for which Babel was configured when the
CCA tools were installed (see Appendix B, Building the CCA Tools and TAU, and Setting Up Your
Environment).
f90 c cxx
python"
Once the tree is configured, type make to
build it. This step may take several minutes. At the end of the
build output, you should see a list of components that were
successfully built, such as:
SUCCESS building arrayDrivers.CDriver
and when it finally completes, you should see this message:
################ Finished building everything ################# ####### You can run some simple tests with 'make check' #######
If the build terminates with an error message instead, please ask for assistance.
Once the build is complete, you can type make
check to perform a basic check that the component have
been built correctly. This is a convenience of the
Makefile system we've put together for the
tutorial that tries to instantiate each component within the
Ccaffeine framework. This provides a basic check that the software
you've built are “well-formed” CCA components. You
should see a message like this, along with a couple of lines of
output from make itself:
#### Testing component instantiation.
====
==== Simple tests passed, all built components were successfully \
instantiated.
====
Test simple example involving a subset of the available languages: \
c cxx f90 f77 python java
#### Testing component connection and execution.
====
==== All simple run tests passed, go command executed successfully.
====
Note that the second test (“Testing
component connection and execution” is expected to
fail at this stage when building the
student-src tree because the component you're going to write
in these exercises are missing. Both tests should succeed for the
tutorial-src tree.