Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Components to be installed

Fat-client setup

If we are using the fat-client set-up then following needs to be installed locally:

* UDA fat-client
* UDA plugins 

Thin-client setup

If we are using the thin-client set-up then only the UDA client needs to be installed – though a UDA server will need to be running somewhere accessible with the UDA plugins running on that server.


UDA

...

Dependencies

UDA is completely DD & AL independent.

A common uda server can be used for all IMAS versions to date and the IMAS backend calls this in fat mode.

Installation

Info

Installation described below uses system compiler (GCC 4.8.5), because of its advantage - it can be used by both: higher GCC versions and Intel compiled libraries

...

  1. git clone ssh://git@git.iter.org/imas/uda.git 
  2. cd uda
  3. git checkout tags/<tag_number> 

vs UDA -plugins

The same plugins can be used for different UDA installs.

Current UDA does not dynamically search for plugins, i.e. it does not try and load every shared library in a directory. To load a plugin, it reads the plugin library name from a text file. “Registering” a plugin just means adding this plugin to that text file. (I plan to change this to remove the need for the text file at some point).

Only the plugin library name is in the text file though. To be able to load the plugin, the directory needs to be added to the LD_LIBRARY_PATH. Therefore, a module is needed.

UDA

Version 2.7.3

Installation

Prepare environment:

Code Block
module load IMAS/3.39.0/AL/5.0.0/gcc/7.3.0
module load itm-gcc/7.3.0
module load xmllib/3.3.1/gcc/7.3.0
module load itm-hdf5/1.12.2/gcc/7.3.0
module load cmake/3.5.2
module load capnproto/0.10.4
module load fmt/10.0.0
module load spdlog/1.11.0
module load itm-python/3.10
setenv BOOST_DIR /gw/switm/boost/1.80.0/gcc/7.3.0
setenv UDA_HOME 

...

/gw/swimas/extra/uda/

...

2.7.3/gcc/

...

7.

...

make -C build-gcc-4 

...

Installation

  1. make -C build-gcc-4 install

Setting system module (has to be done manually)

3.0


Tip

install latest version of cmake if needed:

Code Block
wget https://github.com/Kitware/CMake/releases/download/v3.27.7/cmake-3.27.7.tar.gz
tar zxvf cmake-3.27.7.tar.gz
cd cmake-3.27.7
./bootstrap --prefix=<YOUR_LOCAL_PATH>
make --prefix=<YOUR_LOCAL_PATH>
make install


Get latest version of UDA:

Code Block
git clone https://github.com/ukaea/UDA
git checkout 2.7.3

Then configure and install library:

Code Block
cmake \
	-Bbuild -H. \
	-DCMAKE_INSTALL_PREFIX=${UDA_HOME} \
	-DMAKE_INSTALL_PREFIX=${UDA_HOME} \
	-DBUILD_SHARED_LIBS=ON \
	-DENABLE_CAPNP=ON \
	-DCMAKE_BUILD_TYPE=Debug \
	-DUDA_PORT=56565 \
	-DUDA_HOST=localhost \
	-DUSER=root \
	-DBOOST_ROOT=${BOOST_DIR}
make -C build -j 4
make -C build -j 4 install

cd ${UDA_HOME}/python_installer
python3 setup.py install --prefix=${UDA_HOME}/python 


Tip

Modulefile is also installed, and is located at $UDA_HOME/modulefiles

Version 2.5.1

Dependencies

DD & AL dependency

UDA is completely DD & AL independent.

A common uda server can be used for all IMAS versions to date and the IMAS backend calls this in fat mode.

Other dependencies:

module load cmake/3.5.2
module load

...

itm-boost/1.78.0

...

/

...

gcc/4.8

Installation

Please check installation IMAS eco-system installation scripts:

https://gforge-next.eufus.eu/#/project/imasscripts/scm/browse/uda


See also Releasing new version of IMAS ecosystem

Tip

The latest tips on how to install the latest version of the UDA/2.5.1 are below


Code Block
module purge
module load cineca
module unload gnu
module load gnu/7.3.0
module load itm-openmpi/4.0.4--gnu--7.3.0
module load imasenv/3.33.0/gcc
module unload uda
module load libssh
module load cmake/3.5.2
module load itm-boost/1.61.0--gnu--7.3.0

cmake -Bbuild -H. \
    -DCMAKE_INSTALL_PREFIX=/

...

gw/swimas/extra/uda/

...

2.5.1/gcc/

...

7.

...

3.0 \
    -DBUILD_SHARED_LIBS=ON \
    -DTARGET_TYPE:STRING=OTHER

make -C build
make -C build install

...

UDA Plugins

Dependencies

DD & AL dependency

* UDA-plugins is IMAS LL dependent. There is no run-time dependency on the data-dictionary (only access layer), only on mapping files, that should be consistent with DD version. The inconsistency will not cause any runtime errors (crash etc) but the data retrieval will fail as the mappings do not yet comply with the latest DD updates. Procedurally, perhaps there should be a step to confirm DD compliance of the mappings at each release too.

...

In addition to the basic installation steps I believe a new module-file should be produced for the uda-plugins library produced in this process which should be named with the corresponding access layer version it’s valid for. I think Jonathan set something up to achieve this a couple of  years ago but I don’t know if it will be executed in the default build. scripts/cmake-itm-marconi.sh seems to install to /gw/swimas/extra/uda/plugins/1.2.0/AL/$AL_VERSION so maybe this already works out of the box

Other dependencies:

libssh/0.9.6/gcc/4.8

module load itm-boost/1.78.0/gcc/4.8
module load uda/2.5.0/gcc/7.3.0


Installation

  1. Cloning repository
    1. git clone ssh://git@git.iter.org/imas/uda-plugins.git
    2. cd uda-plugins
    3. git checkout tags/<tag numer>
  2. Building
    1. env UDA_INSTALL=/gw/swimas/extra/uda/plugins/1.2.0/AL/4.9.2/gcc/7.3.0 ./scripts/cmake-itm-marconi.sh
    2. make -C build

An additional command is required after building and installing the plugins which is to execute the script at build/scripts/activate_plugins.sh which will register the compiled plugins in a configuration file for the uda-server to be aware of

Tip

The latest tips on how to install the latest version of the UDA-PLUGINS/1.2.1 are below


Code Block
module purge
module load cineca
module unload gnu
module load gnu/7.3.0
module load itm-openmpi/4.0.4--gnu--7.3.0
module load imasenv/3.33.0/gcc
module load libssh
module load cmake/3.5.2
module unload uda
module load uda/2.5.1/gcc/7.3.0
module load itm-boost/1.61.0--gnu--7.3.0

export CC=gcc
export CXX=g++

cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Debug \
    -DLibSSH_ROOT="$LIBSSH_ROOT" \
    -DCMAKE_INSTALL_PREFIX=/gw/swimas/extra/uda/plugins/1.2.1/gcc/7.3.0 \
    -DBUILD_PLUGINS=exp2imas\;imas_mapping\;imasdd\;imas_uda\;west_tunnel\;imas_partial\;imas_remote

make -C build
make -C build install

cp $UDA_DIR/etc/plugins/udaPlugins.conf /gw/swimas/extra/uda/plugins/1.2.1/gcc/7.3.0/etc/plugins
build/scripts/activate-plugins.sh
cp /gw/swimas/extra/uda/2.5.1/gcc/7.3.0/lib/plugins/* /gw/swimas/extra/uda/plugins/1.2.1/gcc/7.3.0/lib/plugins


Warning

You also need to add one line of code to the /afs/gw/swimas/extra/uda/plugins/1.2.1/gcc/7.3.0/etc/plugins/udaPlugins.conf file if the installer doesn't add it automatically

Code Block
EXP2IMAS, function, exp2imasPlugin, libexp2imas_plugin.so, *, 1, 1, 1, Map IMAS element name to experiment static or dynamic data using XML mapping files, EXP2IMAS::read()


Simple test case

Below is a simple example for testing uda and uda-plugins

Code Block
module purge
module load cineca
module unload gnu
module load gnu/7.3.0
module load itm-openmpi/4.0.4--gnu--7.3.0
module load imasenv/3.33.0/gcc
module load libssh
module load cmake/3.5.2
module unload uda
module load uda/2.5.1/gcc/7.3.0
module load itm-boost/1.61.0--gnu--7.3.0
module load uda-plugins/1.2.1

setenv JET_MDSPLUS_USERNAME sdixon

python3
import imas
jet = imas.ids(86400,0)
jet.open_public('JET')
jet.magnetics.get()
jet.magnetics.flux_loop[0].flux.data