# This script can be used to install SCALASCA on a Linux computer.
# Please also have a look at the SCALASCA documentation at
# https://www.scalasca.org/scalasca/software/scalasca-2.x/documentation.html,
# especially the installation instructions.
#
# Note that you need an MPI installation (mpich2) and Qt5 in order to build SCALASCA.
#
# The best way to use this script is to execute the steps maually. In paricular, you
# should check the result of the '.configure' commands.

# Specify the directory where SCALASCA should be installed.
# SCALASCA is then available at $INSTDIR/bin/scalasca, so be sure to add $INSTDIR/bin
# to your PATH variable.
export INSTDIR=$HOME/scalasca

wget http://perftools.pages.jsc.fz-juelich.de/cicd/opari2/tags/opari2-2.0.6/opari2-2.0.6.tar.gz
tar zxf opari2-2.0.6.tar.gz
cd opari2-2.0.6
./configure --prefix=$INSTDIR
make
make install
cd ..

wget http://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-2.3/otf2-2.3.tar.gz
tar zxf otf2-2.3.tar.gz
cd otf2-2.3
./configure --prefix=$INSTDIR
make
make install
cd ..

wget http://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-7.1/scorep-7.1.tar.gz
tar zxf scorep-7.1.tar.gz
cd scorep-7.1
./configure --prefix=$INSTDIR --with-mpi=mpich2
make
make install
cd ..

wget http://apps.fz-juelich.de/scalasca/releases/cube/4.6/dist/cubelib-4.6.tar.gz
tar zxf cubelib-4.6.tar.gz
cd cubelib-4.6
./configure --prefix=$INSTDIR
make
make install
cd ..

wget http://apps.fz-juelich.de/scalasca/releases/cube/4.6/dist/cubew-4.6.tar.gz
tar zxf cubew-4.6.tar.gz
cd cubew-4.6
./configure --prefix=$INSTDIR
make
make install
cd ..

wget http://apps.fz-juelich.de/scalasca/releases/cube/4.6/dist/jcuber-4.6.tar.gz
tar zxf jcuber-4.6.tar.gz
cd jcuber-4.6
./configure --prefix=$INSTDIR
make
make install
cd ..

wget http://apps.fz-juelich.de/scalasca/releases/cube/4.6/dist/cubegui-4.6.tar.gz
tar zxf cubegui-4.6.tar.gz
cd cubegui-4.6
./configure --prefix=$INSTDIR --with-cubelib=$INSTDIR
make
make install
cd ..

wget http://apps.fz-juelich.de/scalasca/releases/scalasca/2.6/dist/scalasca-2.6.tar.gz
tar zxf scalasca-2.6.tar.gz
cd scalasca-2.6
./configure --prefix=$INSTDIR --with-mpi=mpich2
make
make install
cd ..

