Commit 63ff0c4a authored by Robert Dietrich's avatar Robert Dietrich

no root permissions required to build the PIKA package

parent 77a00641
......@@ -2,15 +2,21 @@
source ../pika_install.conf
install_path=$PIKA_INSTALL_PATH
if [ `id -u` -ne 0 ]; then
install_path=$PIKA_BUILD_PATH
fi
# set collectd install path
COLLECTD_INST_PATH=$PIKA_INSTALL_PATH/collectd/${COLLECTD_VERSION}
PYTHON_ROOT=$PIKA_INSTALL_PATH/python/$PYTHON_VERSION
COLLECTD_INST_PATH=$install_path/collectd/${COLLECTD_VERSION}
PYTHON_ROOT=$install_path/python/$PYTHON_VERSION
# expose Python3 path
export PATH=$PYTHON_ROOT/bin:$PATH
mkdir -p $PIKA_INSTALL_PATH/../sources
cd $PIKA_INSTALL_PATH/../sources
mkdir -p $install_path/../sources
cd $install_path/../sources
# download, unpack, remove source package
if [ $COLLECTD_VERSION == 'GIT' ]; then
......@@ -69,7 +75,7 @@ export COLLECTD_ROOT=${COLLECTD_INST_PATH}
#export LIKWID_ROOT=$PIKA_ROOT/sw/pika/$PIKA_VERSION/likwid/$LIKWID_VERSION
export LIKWID_ROOT=${COLLECTD_INST_PATH}/../../likwid/$LIKWID_VERSION
cd ${PIKA_ROOT}/daemon/collectd/collectd-plugins/c
make
make likwid
# copy custom types into collectd installation
cp $PIKA_ROOT/daemon/collectd/custom_types.db ${COLLECTD_INST_PATH}/share/collectd/
......@@ -2,6 +2,12 @@
source ../pika_install.conf
install_path=$PIKA_INSTALL_PATH
if [ `id -u` -ne 0 ]; then
install_path=$PIKA_BUILD_PATH
fi
# set compiler
if [ -n "${PIKA_TARGET}" ] && [ ${PIKA_TARGET} == 'power' ]; then
COMPILER=GCCPOWER
......@@ -9,11 +15,11 @@ else
COMPILER=GCC #GCCPOWER for IBM Power systems
fi
mkdir -p $PIKA_INSTALL_PATH/../sources
cd $PIKA_INSTALL_PATH/../sources
mkdir -p $install_path/../sources
cd $install_path/../sources
PYTHON_ROOT=$PIKA_INSTALL_PATH/python/${PYTHON_VERSION}
LIKWID_INST_PATH=$PIKA_INSTALL_PATH/likwid/${LIKWID_VERSION}
PYTHON_ROOT=$install_path/python/${PYTHON_VERSION}
LIKWID_INST_PATH=$install_path/likwid/${LIKWID_VERSION}
### Build Likwid
......@@ -65,8 +71,8 @@ cp config.mk config.mk.backup
sed -i "/^PREFIX .*/ s|.*|PREFIX = $LIKWID_INST_PATH|" config.mk
# set access mode
sed -i "/^ACCESSMODE = .*/ s|.*|ACCESSMODE = direct|" config.mk
#sed -i "/^ACCESSMODE = .*/ s|.*|ACCESSMODE = perf_event|" config.mk
#sed -i "/^ACCESSMODE = .*/ s|.*|ACCESSMODE = direct|" config.mk
sed -i "/^ACCESSMODE = .*/ s|.*|ACCESSMODE = perf_event|" config.mk
# do not build access daemon or frequency changer
sed -i "/^BUILDDAEMON = .*/ s|.*|BUILDDAEMON = false|" config.mk
......
......@@ -3,16 +3,31 @@
source ../pika_install.conf
#delete old installation
rm -rf /opt/pika/
if [ `id -u` -ne 0 ]; then
if [ ! -z "$PIKA_BUILD_PATH" ] && [ -d "$PIKA_BUILD_PATH" ]; then
rm -rf $PIKA_BUILD_PATH/../sources
cd $PIKA_BUILD_PATH/..
rm -rf $PIKA_VERSION
cd -
else
echo Error with build path $PIKA_BUILD_PATH
fi
else
rm -rf /opt/pika/
fi
./install_python3.sh
./install_likwid.sh
./install_python3.sh 2>&1 | tee python_install.log
./install_likwid.sh 2>&1 | tee likwid_install.log
# collectd requires likwid and python
./install_collectd.sh
./install_collectd.sh 2>&1 | tee collectd_install.log
# go to PIKA install root folder
cd $PIKA_INSTALL_PATH/..
if [ `id -u` -ne 0 ]; then
cd $PIKA_BUILD_PATH/..
else
cd $PIKA_INSTALL_PATH/..
fi
#create tarball in /sw/taurus/tools/pika/archives
tar czf ${PIKA_PACKAGE_PATH} ${PIKA_VERSION}
......@@ -5,10 +5,16 @@
source ../pika_install.conf
mkdir -p $PIKA_INSTALL_PATH/../sources
cd $PIKA_INSTALL_PATH/../sources
install_path=$PIKA_INSTALL_PATH
DEST_INST=${PIKA_INSTALL_PATH}/python/${PYTHON_VERSION}
if [ `id -u` -ne 0 ]; then
install_path=$PIKA_BUILD_PATH
fi
mkdir -p $install_path/../sources
cd $install_path/../sources
DEST_INST=${install_path}/python/${PYTHON_VERSION}
# download python
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz
......@@ -28,11 +34,15 @@ rm -rf Python-${PYTHON_VERSION}.tar.xz
export PATH=${DEST_INST}/bin:$PATH
export LD_LIBRARY_PATH=${DEST_INST}/lib:${DEST_INST}/lib/python3.7:${DEST_INST}/lib/python3.6:$LD_LIBRARY_PATH
PYTHONHOME=${DEST_INST}
PYTHONROOT=${DEST_INST}
pip3 install --upgrade pip
# install influxdb and mysql client
pip3 install influxdb
pip3 install mysql-connector #==2.1.4
#pip3 install mysql-connector #==2.1.4
pip3 install PyMySQL
#pip3 install nvidia-ml-py
pip3 install ClusterShell
#pip install python-memcached
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment