Grid service library

Using the grid service library

TopPreviousNext

Setting up the environment

TopPreviousNext

The grid service library requires the ITM data structure version 4.09a (or later). Before using it you have to make sure your environment is set up properly. The following section assumes you are using csh or tcsh on the Gateway.

First, your environment variables have to be set up properly. To check them do

echo $TOKAMAKNAME
It should return
test
Also do
echo $DATAVERSION
It should return
4.09a
(or some higher version number). If either of them returns something different, run
source $ITMSCRIPTDIR/ITMv1 kepler test 4.09a > /dev/null
and check the variables again.

Second, you have to ensure your data tree is set up properly. Do

ls ~/public/itmdb/itm_trees/$TOKAMAKNAME/$DATAVERSION/mdsplus/0/
If you get something like "No such file or directory", you have to set up the tree first by running
$ITMSCRIPTDIR/create_user_itm_dir $TOKAMAKNAME $DATAVERSION
and then do the previous check again.

Checking out and testing the grid service library

TopPreviousNext

To be able to get the code of the grid service library, you have to be a member of the ITM General Grid description (itmggd) project (you can apply for this here).

Once you are a member, you can check out the code by

svn co https://gforge6.eufus.eu/svn/itmggd itm-grid

Then you can run the unit tests for the grid service library by

cd itm-grid
source setup.csh
This will setup environment variables (especially OBJECTCODE) and aliases. Then do
testgrid setup
This will set up the build system for the individual languages. It will also build and execute a Fortran program that writes a simple 2d example grid stored in an edge CPO into shot 1, run 1.

To actually run the tests do

testgrid all
This will go through the implementations in the different languages (F90, Python, ...) and run unit tests for every on of them. If all goes well, it should end with the message
Test all implementations: OK
If this is not the case, something is broken and must be fixed.

Example applications (outdated)

TopPreviousNext
Note: this is a bit outdated. Have a look here.

Plotting 3d wall geometry with VisIt (temporary solution, not required any more)

TopPreviousNext

This example plots a 3d wall representation stored in the edge CPO (in the future, this information will be stored in the wall CPO). The example data used here is generated by a preprocessing tool which is part of the ASCOT code.

  1. Check out the grid service library (See above. You don't necessarily have to run the tests)
  2. Change to the python/ directory and setup the environment:
    cd itm-grid/python/; source setup.csh
  3. Edit the file itm/examples/write_xdmf.py to use the right shot number
  4. Run it (still in the python/ directory of the service library) with
    python26 itm/examples/write_xdmf.py
    This will create two files: wall.xmf and wall.h5
  5. Start visit with
    visit23
    and open the wall.xmf file. Then select Plot->Mesh->Triangle and click on the "Draw" button.

Using UALConnector to visualize CPOs using the general grid description

TopPreviousNext

UALConnector allows you to bring data directly from the UAL into VisIt.

  1. Check out the grid service library (See above. You don't necessarily have to run the tests)
  2. Run UALConnector. Examples:
    ./itm-grid/ualconnector -s 9001,1,1.0 -c edge -u klingshi -t test -v 4.09a
    ./itm-grid/ualconnector -s 15,1,1.0 -c edge -u klingshi -t test -v 4.09a
  3. When finished, close VisIt and terminate the UALConnector by typing 'quit'.

You don't even have to check out the service library. UALConnector is made available at

~klingshi/bin/itm-grid/ualconnector
, i.e.
~klingshi/bin/itm-grid/ualconnector -s 9001,1,1.0 -c edge -u klingshi -t test -v 4.09a
~klingshi/bin/itm-grid/ualconnector -s 15,1,1.0 -c edge -u klingshi -t test -v 4.09a


last update: 2019-01-31 by g2dpc