Xmgr Tutorial

To begin this xmgr tutorial first launch the application xmgr by typing xmgr at the Unix prompt.

The five options at the top of the xmgr main window, File, Data, Graph, Page and View, each provide extensive pulldown menus with several options. For example, left clicing on the View button produces the following options:

Each set options followed by ... have their own submenu or several associated options.To keep this introduction to xmgr short, only a few of the options in each pulldown menu will be discussed. Consult the xmgr users guide for more details.

HANDS ON 1 -- EXPLORE SOME OF THE PULLDOWN MENUS

Spend about five minutes exploring some of the options under the File, Edit and View. Be sure to explore:

Part of the aim of performance programming is to use vector and parallel architectures to gain an increase in computational power over conventional single CPU, scalar architectures. An elementary performance programming model is given by Amdahl's Law, which in its simplest form states

where speedup is the ratio of computation time in scalar mode divided by the computation time in vector mode; f is the fraction of code that is processed by the vector functional units and v is the vector length.

HANDS ON 2 -- PREPARE A DATA FILE FOR XMGR

In this part of the tutorial you will create a data file containg results drawn from Amdahl's Law by doing the following:

EXAMPLE PROGRAM XMGR1

Having completed the above tasks, you now have a data file to load into the application xmgr. If xmgr is still running you can load the data file test1_xmgr.dat using the option File/Read sets.... This method will usually require that the viewport be rescaled to fit the data. This resizing can be accomplished by left clicking on the button marked on the left side of the xmgr window or with the option Graph/Autoscale.... If xmgr is not running then your data set can be loaded from the command line by typing xmgr test1_xmgr.dat . Loading from the command line will generally avoid the need to rescale the viewport.

HANDS ON 3 -- FORMATTING YOUR GRAPH

Before beginning this part of the tutorial, have a look at Figure 1 , which displays a bar graph of the the data set containing the results of program xmgr1.f. Your goal in this part of the tutorial is to create a graph that looks similar to that of Figure 1. Below, some of the steps required in formatting your graph are outlined to save you from having to search all of the menu items for the needed option.

At this point, your graph should look similar to that of Figure 1. If time permits continue your exploration of xmgr with the following:

HANDS ON 3 -- MULTIPLE DATA SETS

A single xmgr data file can contain multiple data sets. The following program illustrates the construction of such a data file with graphs separated by an ampersand (&). The three curves in the data file test2_xmgr.dat represent the solution to a diffusion PDE at different times. Physical interpretations of these curves could be the height of a groundwater mound or the temperature in a metal bar as a function of space at three different times.

EXAMPLE PROGRAM XMGR2

To gain more experience with xmgr, compile and execute the above program and repeat the formatting exercises of the previous hands-on exercises. Try some new commands under different headings.