Thesis reboot: project setup

Easy start: let us do CPU-only first

gputwigstack [1] is the result of a Master research about XML query processing on GPGPU [2].

Image source: [3] [4].

Three steps:

  1. metadata generation from parsing XML file
  2. database creation
  3. query processing

What you will need to build

Dependencies:

  • scons software construction tool [5]
  • lemon parser generator [6]
  • libxml2 XML parser [7] (only for metadata generator)
  • glib GNOME core library [8] (only for metadata generator)
  • sqlite3 SQLite [9]

On Ubuntu:

sudo apt install scons

# Not really needed, see gputwigstack/twigstack_cuda/lemon
#sudo apt install lemon

# Not really needed, only to make scons happy
sudo apt install flex

sudo apt install libxml2-dev
sudo apt install libglib2.0-dev

sudo apt install sqlite3

See gputwigstack/twigstack_cuda/build_config.py for all sorts of library/include path configuration as well as build flags.

Build options

In gputwigstack/twigstack_cuda/SConstruct:

# 3 parameters
# VERBOSE = {0, 1, 2}
# - 0 : not verbose (release version)
# - 1 : print debug message on host
# - 2 : print debug message on host and on device
# DEBUG = {0, 1}
# - 0 : no debugging symbols (release version)
# - 1 : compile with debugging symbols for gdb and cuda-gdb or Nsight debugger
# EXEC_ON_HOST = {0, 1, 2}
# - 0 : execute on GPU (release version)
# - 1 : emulate GPU using Ocelot http://code.google.com/p/gpuocelot/
# - 2 : execute on CPU

Build all

git clone https://git.vjordan.info/vjp/gputwigstack.git
cd gputwigstack/twigstack_cuda
scons exec_on_host=2

Metadata generation

~/gputwigstack/twigstack_cuda$ mkdir metadata
~/gputwigstack/twigstack_cuda$ bash auto.sh testXML2.xml metadata
Reading, parsing and computing metadata from XML resource "testXML2.xml"... OK
~/gputwigstack/twigstack_cuda$ ls metadata
attributes.tsv  create.sql  elements.tsv  exec.sqlite  metadata.db  texts.tsv

Query

~/gputwigstack/twigstack_cuda/twigstack_algorithm$ ./main v ../testXML.xml b/c 1
Parsing XPath query...
Metadata fetch time: 23.00 msec
Query processing...
Query process exec. time: 33.00 msec (phase 1: 33.00 msec, phase 2: 0.00 msec)
Result: [2]
<c arg="value1">text1</c>
<c arg="value2">text1</c>