Distributing Computing Using Triana

First Astro-Grid Workshop (Belfast, January 2001)

Ian Taylor, Ian.Taylor@astro.cf.ac.uk,

Cardiff University

Triana home page : http://triana.co.uk/

Introduction

The conventional approach to programming black boxes is to write subroutines, or functions that have well defined input and output. To connect a set of related procedures together, the programmer would have to write a main program to call the relevant functions in the desired order and make sure that at each stage the data is passed to the next function correctly. This code would then have to be compiled, linked with the other functions and debugged before it could be tested. Consequently, even though the result may not be satisfactory, the programmer would have to put a reasonable amount of effort in writing the program e.g. insuring input/output dimensions formats etc.

Alternatively, each program within Triana only needs to be designed, implemented and compiled once. Triana uses strong data-type checking at the input and output of the unit that defines how it can interact with other Triana units. Therefore, to write a new program, the programmer simply graphically connects desired units together. Furthermore, each unit in Triana can be distributed to any computer that runs an OCL (Object Connecting Language) Server. OCL is the API within Triana that enables the connection of Triana units. Triana's graphical user interface is simply an advanced editor that uses the OCL API to build OCL networks. Furthermore, each OCL network can be run as stand alone script and it is this script that can be distributed to the OCL servers. The rest of this presentation takes a closer look on how we create a parallel network step by step.

 

Implementing a Parallel FFT Using Triana

From the various Triana toolboxes, drag the units you want to use to the Main Triana window and then connect them together (by dragging from the output node of the sending unit to and input node of the receiving unit) to create a Triana network: -

To distribute this code follows the next 3 steps: -

(1) Make a Group out of the units you wish to distribute by selecting the units you wish to group and then choosing the Group Selected menu (or pop-up menu) option. For example I have made 2 groups out of the FFT1 and AmpSpect1 units and the Gaussian1, FFT2 and AmpSpect2 units, respectively:

Groups within Triana can be reconfigured easily i.e. units can be deleted or reconnected to other units. Therefore, when we want to distribute units to other computers we must use a more robust representation. We do this by converting each Group to an OCL (Object Connecting Language) script by choosing the Convert to OCL Script menu (or pop-up) menu item. This creates a script of the graphical units whose internal connections cannot be edited directly (although they can from within the Group units). These units are shown in the following screenshot and are now ready to be distributed to networked computers:

 

The user window for an OCL Script units looks like this: -

Which shows the actual OCL script used to represent the units and the Properties tag:

shows the location of where this script will be run e.g. not networked at present. The next tag shows a list of buttons that enables the user to view each unitís parameter window to change the parameters internal to each unit: - 

 

For example, pressing the fft1 button would produce: -

allowing the user to edit the parameters specific to the FFT algorithm.

 Step 3

Now, choose the Networking option from the Setup menu to give: -

 This allows the user to enable Triana networking and choose the OCL name server. This is where Triana finds a list of registered OCL servers that OCL scripts can be run on. Once the return key is hit, this list will be displayed in the OCLScript tag of the Networking window: -

..that automatically assign the available OCL Scripts (i.e. Algorithm1 and Algorithm2) to the available servers. In this case we are distributing the two algorithms to two Sun computers from a Windows 98 Laptop.

Bringing up the Properties tag again for the OCL Script Units will also show the server they will run on.

To run the parallel network the user clicks the Start button on the main Triana window. This will distribute the data to the relevant servers and run the network in parallel.

For more information about Triana go to the website http://triana.co.uk/