TOC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 13, 14

5) TUPLE SCOPE AND DEBUGGING


5.1) How do I debug CDS programs with dbx?

First, compile the program with the -g option, and link with -g and -linda tuple_scope. When executing the program with tuple scope, click the middle mouse button on the icon of the process you wish to debug. Tuple scope will bring up an xterm with a dbx session attached
to that process. (On HP/UX, it will use hpterm and xdb). The DEBUG environment variable can be set to use a different debugger, for example, gdb.

This requires that the system support attaching debuggers to running processes. This is supported on all Linda systems except DEC workstations (both DECstations and Alphas).


5.2) How do I debug Network Linda programs with dbx?

Use the -debug option with ntsnet. Make sure you compiled and linked your program with the -g option. Ntsnet will bring up a dbx session in an xterm for each Linda process. An alias, lrun, is used to start each process executing with the correct arguments.

This is currently not supported on HPs.


5.3) What is the difference between tuple scope and post mortem tuple scope?

CDS Linda supports the true, runtime tuple scope, which allows the execution of a Linda program to be monitored and controlled. It also allows a debugger, such as dbx, to be attached to a process as it executes.

Network Linda only supports post mortem tuple scope which allows the execution to be viewed after the program itself has finished running.


5.4) Can I use the CDS with tuplescope to do performance fine-tuning?

Not really. There are two major problems in trying to determine performance with CDS tuplescope. First, tuplescope has a large impact on performance, since each tuple operation incurs a lot of X windows support overhead. This overhead swamps the cost of the Linda operations. Secondly, the very nature of the CDS makes it hard to draw conclusions about performance, since the CDS timeshares several concurrent processes on a single CPU (see 7.7 for a discussion of the CDS implementation). Parallel performance tuning cannot generally be done in this context. For performance tuning in Network Linda, we recommend using the Paragraph profiling tool.


5.5) What are aggregate fields, and how do I display them with the tuplescope?

Aggregate fields are tuple fields that are not simple scalar values. In C, they are arrays, unions, and structs; in Fortran, arrays and common blocks.

Internally in tuplespace, aggregates are represented as simple byte arrays. However, tuplescope allows aggregates to be interpreted as arrays of all of the normal scalar types (e.g. int, long, float,etc.). Note that display of aggregates is currently only possible using tuplescope with shared-memory versions of Linda, including the Code Development System.

First, after executing the program, but before clicking on the RUN button, use the MODES menu to select ``Display Aggregates'', and ``Dynamic Tuple Fetch''. The second option causes the aggregate
fields to be dynamically formatted when viewed, rather than when produced.

Click the ``Run'' button and allow the program to produce some tuples. Now, when viewing a tuple, you will see the contents of aggregate fields instead of just the word ``block''. The default viewing type is array of ints. To change this, open the aggregate menu, click to deselect ``Int'', and select some other type.

If you selected ``Dynamic Tuple Fetch'' before running the program, the Aggregate format selection will affect existing tuples. If not, it will only affect tuples subsequently produced.

 



TOC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 13, 14

 
Manuals
Linda (pdf)
Paradise (pdf)

FAQs
Linda
Paradise

White Papers (PDF)
Virtual Shared Memory
Virtual Supercomputing
 
Copyright © 2024 Scientific Computing Associates, Inc.