Skip to content
Snippets Groups Projects
Commit 7518f333 authored by Regfare's avatar Regfare
Browse files

Added setup and demo script

parent 1cd1e7f7
No related branches found
No related tags found
No related merge requests found
setup.sh 0 → 100644
#get MetaCG from repo
git clone git@git.rwth-aachen.de:tuda-sc/projects/metacg.git
cd metacg
#build and install metacg dependency for cg validate
mkdir -p deps/install
cd deps
wget http://apps.fz-juelich.de/scalasca/releases/cube/4.5/dist/cubelib-4.5.tar.gz
mkdir cubelib
cd cubelib
tar xzf ../cubelib-4.5.tar.gz
cd cubelib-4.5
./configure --prefix=$(realpath ../../install/cubelib)
make install -j
#install metacg graph lib and tools
cd ../../../
mkdir build
mkdir install
cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DMETACG_BUILD_CGCOLLECTOR=ON -DCUBE_LIB=../deps/install/cubelib/lib -DCUBE_INCLUDE=../deps/install/cubelib/include/cubelib -DCMAKE_INSTALL_PREFIX=../install ..
make install -j
cd ../..
git clone git@git.rwth-aachen.de:tim.heldmann/CTUApex.git
cd CTUApex
mkdir build
cd build
cmake -Dmetacg_DIR=$(realpath ../../metacg/install/lib64/cmake/metacg) -Dspdlog_DIR=$(realpath ../../metacg/install/lib64/cmake/spdlog) -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
make -j
\ No newline at end of file
# this is the cgcollector from metacg
cgcollector --metacg-format-version=2 lulesh.cc
cgcollector --metacg-format-version=2 lulesh-init.cc
cgcollector --metacg-format-version=2 lulesh-comm.cc
cgcollector --metacg-format-version=2 lulesh-util.cc
cgcollector --metacg-format-version=2 lulesh-viz.cc
echo "null" > merged.ipcg
#this is cgmerge from metacg
cgmerge merged.ipcg *.ipcg
#this currently uses hardcoded include directories as to be compatible with C++
#this is a terrible solution and is currently being worked on
CTUApex --extra-arg=-I/home/groups/da_sc/moduletree/packages-2023-08-24/.gcc/8.5/clang/15.0.7.debug/include \
--extra-arg=-I/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12 \
--extra-arg=-I/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux \
--extra-arg=-I/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/backward \
--extra-arg=-I/work/groups/da_sc/moduletree/packages-2023-08-24/.gcc/8.5.0/clang/debug.15.0.7/lib/clang/15.0.7/include \
--extra-arg=-I/usr/local/include \
--extra-arg=-I/usr/include \
--cg-file=merged.ipcg \
--extra-arg=-DUSE_MPI=0 \
--log-level=debug \
lulesh.cc lulesh-init.cc lulesh-comm.cc lulesh-util.cc lulesh-viz.cc 2> log.log
#This should result in 5 files with the names lulesh.mini.cc lulesh-init.mini.cc lulesh-comm.mini.cc lulesh-util.mini.cc lulesh-viz.mini.cc
#which should then be able to be compiled
#The resulting binary is currently not able to be run, as no wrapper script can be generated the does the memory setup
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment