-
Notifications
You must be signed in to change notification settings - Fork 14
build
we modify cgpop's build script to support llvm-pred. and provided it on github.
before, you need some prepare steps.
-
install llvm static library package
in Build on taub make sure you also install llvm-static-3.5.0.*.rpm , because dragonegg needs a static library link.
-
install gcc48 package
also in Build on taub make sure you install following packages:
gcc48-4.8.2-...rpm
provide gcc48 exe
gcc48-c++-4.8.2-...rpm
provide g++48 exe
gcc48-plugin-devel-4.8.2-...rpm
provide plugin development file, wchich needed by dragonegg
gcc48-gfortran-4.8.2-...rpm
provide gfortran exe, needed by cgpop compile
libstdc++48-devel-4.8.2-...rpm
provide libstdc++ static library and c++11 header files
libquadmath-4.8.2-...rpm
needed when build netcdf-fortran
-
build dragonegg
since most distributions didn't contail dragonegg package, you need compile it by self. download dragonegg-3.5, and uncompress it, run:
GCC=gcc48 CXX=g++48 make VERBOSE=1 rm dragonegg.so GCC=gcc48 CXX=g++48 make VERBOSE=1 LDFLAGS="-static-libgcc -static-libstdc++"
to use with above gcc48. when link, dragonegg use g++48. we should link static gcc and stdc++ libraries. because gcc48 package provide shared library just link to /lib64/lib*.so.
after this, you would get a dragonegg.so file.
don't forget add a DRAGONEGG environment into your .bashrc file like:
export DRAGONEGG=$HOME/project/dragonegg-3.5.0/dragonegg.so
after these steps, you can clone a cgpop fork in our github account.
-
build cgpop dependencies
according to this wiki to build dependencies.
then as for gcc48 do
ln -s libquadmath.so.0 libquadmath.so
in home lib64 directory, to let it can be find by ld.when build, should add some prefix to let build system find our gcc48:
CC=gcc48 FC=gfortran48 ./configure --prefix=$HOME/usr # when build netcdf-fortran
Warning
you didn't need build all dependencies, because taub have already installed netcdf and netcdf-fortran. the problem is, we need build dragonegg, it depends gcc plugin header files. but we couldn't add one for system's gcc. so we install custom gcc with header files. then netcdf-fortran header would incompable with new gfortran. we should build netcdf-fortran. but only header files is what we need.
so you should delete libnetcdff.a libnetcdff.so from $HOME/usr/lib directory. let gfortran find system library. because we only need netcdf header file associate with gfortran48. library file is unnecessary.
-
clone fork cgpop
git clone https://github.com/wzzhang-HIT/cgpop.git
and following README guides and to compile it.
in master branch, the ARCHDIR=llvm is what we modified, to compile with llvm-prof's EdgeProfiling
but here we need compile with our llvm-pred's PredBlockProfiling, so you need change to llvm-pred branch.
git checkout -b llvm-pred origin/llvm-pred
in this branch, ARCHDIR=llvm would compile PredBlockProfiling instead of EdgeProfiling