Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save szarnyasg/b5bd8cb4dea917de6276c0c2f3b05aaf to your computer and use it in GitHub Desktop.
Save szarnyasg/b5bd8cb4dea917de6276c0c2f3b05aaf to your computer and use it in GitHub Desktop.
Useful snippets for LDBC Graphalytics

Get the data sets

ls &&
    wget -i https://graphalytics.org/assets/datasets/xs.txt && \
    wget -i https://graphalytics.org/assets/datasets/s.txt && \
    wget -i https://graphalytics.org/assets/datasets/m.txt && \
    wget -i https://graphalytics.org/assets/datasets/l.txt && \
    wget -i https://graphalytics.org/assets/datasets/xl.txt && \
    wget -i https://graphalytics.org/assets/datasets/2xl.txt && \
    unzip '*.zip' && \
    mv */* . && \
    rm -rf */

Unweighted graphs

Graphs that only have an unweighted variant: cit-Patents, wiki-Talk, twitter-mpi, friendster, graph500*

for d in */; do echo ${d::-1} && \
    cd $d && \
    mv graph.mtx ${d::-1}.mtx && \
    mv graph.vtx ${d::-1}.vtx && \
    zip ${d::-1}.mtx.zip ${d::-1}.mtx && \
    zip ${d::-1}.vtx.zip ${d::-1}.vtx && \
    cd ..; \
done

Weighted graphs

Graphs that have a weighted variant: dota-league, kgs, datagen*

We produce two sets of graphs from these. Note that you need to categorize the directories manually , e.g. for graphZ, directory graphZ goes to the unweighted variant and graphZ.e_weight goes to the weighted one.

Unweighted variants of weighted graphs

for d in */; do echo ${d::-1} && \
    cd $d && \
    mv graph.mtx ${d::-1}-unweighted.mtx && \
    mv graph.vtx ${d::-1}-unweighted.vtx && \
    zip ${d::-1}-unweighted.mtx.zip ${d::-1}-unweighted.mtx && \
    zip ${d::-1}-unweighted.vtx.zip ${d::-1}-unweighted.vtx && \
    cd ..; \
done

Weighted variants of weighted graphs

for d in *.e_weight/; do echo ${d::-10} && \
    cd $d && \
    mv graph.mtx ${d::-10}-weighted.mtx && \
    mv graph.vtx ${d::-10}-weighted.vtx && \
    zip ${d::-10}-weighted.mtx.zip ${d::-10}-weighted.mtx && \
    zip ${d::-10}-weighted.vtx.zip ${d::-10}-weighted.vtx && \
    cd ..;
done
# jump to latest benchmark log in default editor
alias log='editor report/`ls -t report | head -n 1`/log/benchmark-full.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment