Scalasca and trace conversion tools

In my “UPC related” project I tightly worked with tool called Scalasca. I utilized Cube GUI (as well as APIs) from Scalasca and performed conversion from my own tracing format to Cube’s (or Scalasca’s) EPILOG format to be able to use Cube.

Scalasca has several tracing format conversion tools integrated into it, which are handy to allow analysis of EPILOG traces in other tools like Jumpshot, Vampir, Paraver and others. Here I’ll describe how to install Scalasca with converters support. I worked with Scalasca 1.3, so keep in mind that this blog entry can be rather outdated.

Basic Scalasca installation

I prefer to install Scalasca without Cube, and then install Cube separately. Because Scalasca usually includes outdated version of Cube.

# ./configure --prefix=/opt/scalasca-1.3 --disable-gui

You need to install binutils-devel, otherwise you won’t be able to compile and will get the following error:

cannot find -liberty

Cube installation

You need qt4 and qt4-devel RPMs for Cube installation. Then go with:

# PATH=$PATH:/usr/lib64/qt4/bin ./configure --prefix=~fred/cube-3.3
# make
# make install

Scalasca with OTF, SLOG2 and Paraver support

The most interesting part starts here. To make conversion functionality available in Scalasca you need to perform several additional steps. You don’t need to install extra packages to get Paraver support. Just get and install Paraver from the official site. You will also need to install wxWigets library (wxGTK for example), wxPropertyGrid and Boost.

OTF and VTF3 are formats of Vampir performance analysis instrument. VTF3 is predecessor of OTF and isn’t needed. You can get OTF at the official site.

To get SLOG2 support, download Oracle Java JDK and JRE from the Oracle site and install rpms. I also needed to uninstall Compat Java:

yum remove openoffice.org-core-2.3.0-6.5.el5.x86_64 \
tomcat5-servlet-2.4-api-5.5.23-0jpp.7.el5.x86_64 \
xml-commons-apis-1.3.02-0.b2.7jpp.10.x86_64 \
hsqldb-1.8.0.9-1jpp.2.x86_64 \
tomcat5-jsp-2.0-api-5.5.23-0jpp.7.el5.x86_64 \
gjdoc-0.7.7-12.el5.x86_64 antlr-2.7.6-4jpp.2.x86_64 \
xerces-j2-2.7.1-7jpp.2.x86_64 xalan-j2-2.7.0-6jpp.1.x86_64 \
bsf-2.3.0-11jpp.1.x86_64 bsh-1.3.0-9jpp.1.x86_64 \
xml-commons-resolver-1.1-1jpp.12.x86_64 java java-gcj-compat

After OTF and Java are installed invoke configure script with the following flags and install Scalasca:

# CFLAGS=”-I/usr/java/latest/include -I/usr/java/latest/include/linux” ./configure --prefix=/opt/scalasca-1.3 --with-otf=/opt/otf-1.7 --with-slog2=~/install/slog2sdk-1.2.6

As the last step go to SLOG2 sources and type:

# ./configure --prefix=/opt/slog2sdk-1.2.6 --with-java=/usr/java/latest --with-trace-libdir=`scalasca --config --prefix`/lib --with-trace-name=elg --disable-build CC=`scalasca --config --cc`
# make
# make install

Errors during installation

If you try to compile the code right away you can potentially get an error:

gcc -m64 -I. -I../../config -I../../utils -I../../episode -OpenMPnotAvailable -c epk_omplock.c
cc1: error: invalid option argument ‘-OpenMPnotAvailable’

To get rid of it go to scalasca-1.3.0/build-linux-gnu-nompi and change line 63 in Makefile.defs from

OMPFLAG    = -OpenMPnotAvailable

to

OMPFLAG    = -fopenmp

If you get an error:

gcc gen_slogconf.c -o gen_slogconf
gen_slogconf.c: In function ‘main’:
gen_slogconf.c:14: error: ‘__int64’ undeclared (first use in this function)
gen_
slogconf.c:14: error: (Each undeclared identifier is reported only once
gen_slogconf.c:14: error: for each function it appears in.)

then add the following two lines to gen_slogconf.c:

#include <sys/types.h>
#define __int64 int64_t

Another possible error, which I got, has the following output:

/usr/java/latest/include -I/usr/java/latest/include/linux ../../../utils/epk_archive.c -c -o so_epk_archive.o
gcc gen_slogconf.c -o gen_slogconf
./gen_slogconf > trace_impl.h
make[5]: *** [trace_impl.h] Error 25
make[5]: Leaving directory `/root/Install/scalasca-1.3.0/build-linux-gnu-nompi/build/epik/epilog/tools/elg2slog2′
make[4]: *** [all] Error 2
make[4]: Leaving directory `/root/Install/scalasca-1.3.0/build-linux-gnu-nompi/build/epik/epilog/tools’
make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/Install/scalasca-1.3.0/build-linux-gnu-nompi/build/epik’
make[2]: *** [all-epik] Error 2
make[2]: Leaving directory `/root/Install/scalasca-1.3.0/build-linux-gnu-nompi/build’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/Install/scalasca-1.3.0/build-linux-gnu-nompi’
make: *** [all] Error 2

Solution here is to substitute gen_slogconf.c from distribution with the following code:

#include <stdio.h>
#include <stdint.h>

int main() {
  printf("/* -- DO NOT CHANGE ---------------------------- */\n");
  printf("/* -- AUTOMATICALLY GENERATED BY gen_slogconf -- */\n\n");
  printf("#define HAVE_JNI_H 1\n");
  printf("#define STDC_HEADERS 1\n");
  printf("#define SIZEOF_INT %zd\n", sizeof(int));
  printf("#define SIZEOF_LONG %zd\n", sizeof(long));
  printf("#define SIZEOF_LONG_LONG %zd\n", sizeof(long long));
  printf("#define SIZEOF_VOID_P %zd\n", sizeof(void*));
  printf("#define SIZEOF___INT64 %zd\n", sizeof(int64_t));

  return 0;
}

After that just enter directory /root/Install/scalasca-1.3.0/build-linux-gnu-nompi/build/epik/epilog/tools/elg2slog2 and run make manually by yourself.

Usage examples

To convert EPILOG trace gathered by Scalasca to OTF use the following command:

# LD_LIBRARY_PATH=/opt/otf-1.7/lib elg2otf trace.elg

Convertion to Paraver format is done using elg2prv:

# elg2prv trace.elg

Then to view converted trace in Paraver GUI run:

# LD_LIBRARY_PATH=/opt/boost-1.43.0/lib:/opt/wxGTK-2.8.11/lib:/opt/wxpropgrid-1.4.12/lib:/opt/paraver-kernel-1.0/lib/paraver-kernel /opt/wxparaver-3.99/bin/wxparaver trace.elg

Advertisement

Tags: , , , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: