Commit 44bf9cdf authored by Tomas Hardin's avatar Tomas Hardin Committed by Tomas Härdin

Make HPC2N script a bit more self-contained

parent 46063dc7
Pipeline #1089 passed with stages
in 29 minutes and 4 seconds
ml purge ml purge
ml load gimpi/2017b itac/2017.3.030 ml load gimpi/2017b itac/2017.3.030
export PREFIX=/pfs/nobackup/home/t/thardin/local export PREFIX=$(pwd)/../build/local
alias python=$PREFIX/bin/python3 alias python=$PREFIX/bin/python3
export PATH=$PREFIX/bin:$PATH export PATH=$PREFIX/bin:$PATH
export MANPATH=$PREFIX/man:$MANPATH: export MANPATH=$PREFIX/man:$MANPATH:
......
# To build this you'll want to put this and boilerplate.sh one level above the fmigo directory # To build for HPC2N (abisko.hpc2n.umu.se or kebnekaise.hpc2n.umu.se), cd into here and run this script-
# and also download the dependencies that each step uses and put them in appropriate directories. # To be able to use the compiled fmigo-mpi you'll anso want to source boilerplate.sh into your shell.
# The second part hasn't been automated yet.
# An earlier version of this script would download and build cmake, but version 3.5.1 is fine.
set -e set -e
# Separated out so we can bring the required variables # Separated out so we can bring the required variables
# into the shell when fiddling with the build. # into the shell when fiddling with the build.
source boilerplate.sh source boilerplate.sh
cd ..
mkdir -p build
cd build
wget --no-verbose --continue https://github.com/zeromq/libzmq/releases/download/v4.2.3/zeromq-4.2.3.tar.gz
wget --no-verbose --continue https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz
wget --no-verbose --continue https://bootstrap.pypa.io/get-pip.py
wget --no-verbose --continue https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
sha256sum -c <<EOF
8f1e2b2aade4dbfde98d82366d61baef2f62e812530160d2e6d0a5bb24e40bc0 zeromq-4.2.3.tar.gz
fd65488e618032ac924879a3a94fa68550b3b5bcb445b93b7ddf3c925b1a351f protobuf-all-3.6.1.tar.gz
b89554206d31aeadb8bea05afe53552ed1370ff416b7b49d1abccc0d60b3dca8 get-pip.py
0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549 Python-3.7.0.tar.xz
EOF
if true if true
then then
pushd zmq
rm -rf zeromq-4.2.3 rm -rf zeromq-4.2.3
tar xfvz zeromq-4.2.3.tar.gz tar xfvz zeromq-4.2.3.tar.gz
cd zeromq-4.2.3 pushd zeromq-4.2.3
./configure --prefix=$PREFIX ./configure --prefix=$PREFIX
make -j12 make -j12
make install make install
...@@ -23,10 +35,9 @@ fi ...@@ -23,10 +35,9 @@ fi
if true if true
then then
pushd protobuf
rm -rf protobuf-3.6.1 rm -rf protobuf-3.6.1
tar xfvz protobuf-all-3.6.1.tar.gz tar xfvz protobuf-all-3.6.1.tar.gz
cd protobuf-3.6.1 pushd protobuf-3.6.1
./configure --prefix=$PREFIX ./configure --prefix=$PREFIX
make -j12 make -j12
make install make install
...@@ -35,10 +46,9 @@ fi ...@@ -35,10 +46,9 @@ fi
if true if true
then then
pushd python
rm -rf Python-3.7.0 rm -rf Python-3.7.0
tar xfvJ Python-3.7.0.tar.xz tar xfvJ Python-3.7.0.tar.xz
cd Python-3.7.0 pushd Python-3.7.0
./configure --prefix=$PREFIX ./configure --prefix=$PREFIX
make -j12 make -j12
make install make install
...@@ -50,24 +60,17 @@ fi ...@@ -50,24 +60,17 @@ fi
if true if true
then then
pushd pip
python3 get-pip.py --prefix $PREFIX python3 get-pip.py --prefix $PREFIX
popd
fi fi
if true if true
then then
pushd fmigo pip3 install -r ../Buildstuff/requirements.txt
pip3 install -r Buildstuff/requirements.txt
rm -rf build
mkdir build
cd build
cmake .. -DCMAKE_CXX_FLAGS="-I$PREFIX/include" -DCMAKE_C_FLAGS="-I$PREFIX/include" -DCMAKE_EXE_LINKER_FLAGS="-L$PREFIX/lib" -DCMAKE_INSTALL_PREFIX=$PREFIX -DUSE_TRACEANALYZER=ON cmake .. -DCMAKE_CXX_FLAGS="-I$PREFIX/include" -DCMAKE_C_FLAGS="-I$PREFIX/include" -DCMAKE_EXE_LINKER_FLAGS="-L$PREFIX/lib" -DCMAKE_INSTALL_PREFIX=$PREFIX -DUSE_TRACEANALYZER=ON
# call cmake a second time to tell it not to add any "impi" stuff to the link commands # call cmake a second time to tell it not to add any "impi" stuff to the link commands
cmake .. -DMPI_CXX_LIBRARIES="" -DMPI_C_LIBRARIES="" -DMPI_CXX_LINK_FLAGS="" -DMPI_C_LINK_FLAGS="" -DMPI_EXTRA_LIBRARY="" cmake .. -DMPI_CXX_LIBRARIES="" -DMPI_C_LIBRARIES="" -DMPI_CXX_LINK_FLAGS="" -DMPI_C_LINK_FLAGS="" -DMPI_EXTRA_LIBRARY=""
make -j12 make -j12
make install make install
popd
fi fi
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