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 $TOKAMAKNAMEIt should return
testAlso do
echo $DATAVERSIONIt 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/nulland 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 $DATAVERSIONand then do the previous check again.
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.cshThis will setup environment variables (especially OBJECTCODE) and aliases. Then do
testgrid setupThis 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 allThis 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: OKIf this is not the case, something is broken and must be fixed.
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.
cd itm-grid/python/; source setup.csh
python26 itm/examples/write_xdmf.pyThis will create two files: wall.xmf and wall.h5
visit23and open the wall.xmf file. Then select Plot->Mesh->Triangle and click on the "Draw" button.
UALConnector allows you to bring data directly from the UAL into VisIt.
./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
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