-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
156 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# DYNAMIC BRANCH CAN BE OVERWRITTEN DURING RUNTIME | ||
ENV BRANCH="" | ||
|
||
# NEEDS TO BE UPDATED FOR SPECIFIC VERSIONS | ||
RUN apt update && \ | ||
apt install -y g++ libomp-dev libgsl-dev libhdf5-serial-dev git cmake | ||
|
||
WORKDIR /home/ubuntu/ | ||
|
||
# COPY PROJECT DIRECTORY | ||
# RUN git clone https://github.com/pelahi/VELOCIraptor-STF.git | ||
COPY . /home/ubuntu/VELOCIraptor-STF | ||
|
||
WORKDIR /home/ubuntu/VELOCIraptor-STF | ||
|
||
#RUN git checkout ${BRANCH} | ||
#&& git submodule update --init --recursive | ||
|
||
# BUILD BINARY | ||
RUN mkdir build && cd build && cmake .. && make all |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This Makefile profiles stf using perf to produce flame graphs | ||
.PHONEY: info record_prereq fold flamegraph run display | ||
|
||
#script that produces lots of qsub scripts to run velociraptor on simulation output | ||
info: | ||
@echo "This script profiles a VR run." | ||
|
||
# PERF | ||
_PERF_OPT_RECORD=--call-graph lbr -g -s -o | ||
_PERF_PATH_ROOT=`pwd`/fg | ||
_PERF_FILE_RAW=$(_PERF_PATH_ROOT)/perf.raw.`date +%Y%m%d`.`hostname`.data | ||
|
||
# FLAMEGRAPH | ||
_FLAMEGRAPH_GIT_URL=https://github.com/brendangregg/FlameGraph.git | ||
_FLAMEGRAPH_PATH=$(_PERF_PATH_ROOT)/FlameGraph | ||
_FLAMEGRAPH_FILE_FOLDED=$(_PERF_PATH_FOLDED)/perf.processed.`date +%Y%m%d`.`hostname`.folded | ||
_FLAMEGRAPH_SCRIPT_STACKCOLLAPSE=$(_FLAMEGRAPH_PATH)/stackcollapse-perf.pl | ||
_FLAMEGRAPH_SCRIPT_MAIN=$(_FLAMEGRAPH_PATH)/flamegraph.pl | ||
_FLAMEGRAPH_FILE_SVG=$(_PERF_PATH_ROOT) | ||
|
||
# STF | ||
# Dynamic stf input parameters through environment variables to be set in an input payload "./payloadname.env " | ||
_STF_PARAMETERS="DEFAULT" | ||
include ./payloadname.env | ||
|
||
record_prereq: | ||
@mkdir -p $(_PERF_PATH_ROOT) | ||
@cd $(_PERF_PATH_ROOT) && git clone $(_FLAMEGRAPH_GIT_URL) && cd.. | ||
|
||
record: record_prereq | ||
perf record $(_PERF_OPT_RECORD) -o $(_PERF_FILE_RAW) ./stf $(_STF_PARAMETERS) | ||
@echo "To manually test recorded data, execute: " | ||
@echo "perf report -i $(_PERF_FILE_RAW)" | ||
|
||
fold: | ||
perf script -i $(_PERF_FILE_RAW) | $(_FLAMEGRAPH_SCRIPT_STACKCOLLAPSE) > $(_FLAMEGRAPH_FILE_FOLDED) | ||
|
||
flamegraph: | ||
cat $(_FLAMEGRAPH_FILE_FOLDED) | $(_FLAMEGRAPH_SCRIPT_MAIN) > $(_FLAMEGRAPH_FILE_SVG) | ||
|
||
run: record fold flamegraph | ||
|
||
# Display output for proofreading | ||
# It can be appended to job scripts or test run in CLI | ||
display: | ||
@echo "perf record $(_PERF_OPT_RECORD) -o $(_PERF_FILE_RAW) ./stf $(_STF_PARAMETERS)" | ||
@echo "perf script -i $(_PERF_FILE_RAW) | $(_FLAMEGRAPH_SCRIPT_STACKCOLLAPSE) > $(_FLAMEGRAPH_FILE_FOLDED)" | ||
@echo "cat $(_FLAMEGRAPH_FILE_FOLDED) | $(_FLAMEGRAPH_SCRIPT_MAIN) > $(_FLAMEGRAPH_FILE_SVG)" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters