Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
84b3742
Graph-Analytics-Benchmarks
mlk12333 Mar 13, 2025
0164458
Graph-Analytics-Benchmarks
mlk12333 Mar 15, 2025
fe95074
Graph-Analytics-Benchmarks
mlk12333 Mar 16, 2025
fecdb46
Graph-Analytics-Benchmarks
mlk12333 Mar 16, 2025
cf36890
Merge branch 'alibaba:main' into main
Lingkai981 Mar 16, 2025
e54c2ea
Graph-Analytics-Benchmarks
mlk12333 Mar 16, 2025
e125a5e
Graph-Analytics-Benchmarks
mlk12333 Mar 16, 2025
58718ff
Merge branch 'alibaba:main' into main
Lingkai981 Mar 20, 2025
3322792
Merge branch 'alibaba:main' into main
Lingkai981 Sep 6, 2025
23d1382
Graph-Analytics-Benchmarks
mlk12333 Sep 6, 2025
817c830
Graph-Analytics-Benchmarks
mlk12333 Sep 7, 2025
848fdc9
Delete analytical_engine/benchmarks/framework/Graphx directory
Lingkai981 Sep 8, 2025
914fd61
Delete analytical_engine/benchmarks/framework/Data_Generator directory
Lingkai981 Sep 8, 2025
ff279ba
Update README.md
Lingkai981 Sep 8, 2025
06702e1
Update run.sh
Lingkai981 Sep 8, 2025
e413b40
Update README.md
Lingkai981 Sep 8, 2025
1c8a8da
Update README.md
Lingkai981 Sep 8, 2025
ec81f50
Update README.md
Lingkai981 Sep 8, 2025
e9c9d47
Update analytical_engine/benchmarks/framework/README.md
Lingkai981 Sep 8, 2025
35b9f36
Update analytical_engine/benchmarks/framework/README.md
Lingkai981 Sep 8, 2025
11129bf
Update analytical_engine/benchmarks/framework/README.md
Lingkai981 Sep 8, 2025
bab07be
Update analytical_engine/benchmarks/framework/README.md
Lingkai981 Sep 8, 2025
1dd230f
Update analytical_engine/benchmarks/framework/README.md
Lingkai981 Sep 8, 2025
cfc6335
Update analytical_engine/benchmarks/framework/Flash/run.sh
Lingkai981 Sep 8, 2025
5cb5f73
Update analytical_engine/benchmarks/framework/Grape/run.sh
Lingkai981 Sep 8, 2025
5bfcbf7
Update analytical_engine/benchmarks/framework/Flash/run.sh
Lingkai981 Sep 8, 2025
e65c97c
Update analytical_engine/benchmarks/framework/PowerGraph/graphlab-mpi…
Lingkai981 Sep 8, 2025
0b41b07
Update analytical_engine/benchmarks/framework/Ligra/run.sh
Lingkai981 Sep 8, 2025
73a6542
Update analytical_engine/benchmarks/framework/README.md
Lingkai981 Sep 8, 2025
fbf68f3
Update analytical_engine/benchmarks/framework/Grape/run.sh
Lingkai981 Sep 8, 2025
af40a0d
Update README.md
Lingkai981 Sep 9, 2025
0bdd5a4
Create .env.example
Lingkai981 Sep 9, 2025
89348b7
Create gab.py
Lingkai981 Sep 9, 2025
d1b64d3
Rename gab.py to cli.py
Lingkai981 Sep 9, 2025
e130eb5
Update README.md
Lingkai981 Sep 9, 2025
01359d5
Update README.md
Lingkai981 Sep 9, 2025
0af8f9c
Update cli.py
Lingkai981 Sep 10, 2025
69d2649
Create config.py
Lingkai981 Sep 10, 2025
29f8535
Delete analytical_engine/benchmarks/framework/Pregel+ directory
Lingkai981 Sep 10, 2025
19b76c2
Delete analytical_engine/benchmarks/framework/PowerGraph directory
Lingkai981 Sep 10, 2025
e33e4ea
Delete analytical_engine/benchmarks/framework/Ligra directory
Lingkai981 Sep 10, 2025
503ca63
Delete analytical_engine/benchmarks/framework/Gthinker directory
Lingkai981 Sep 10, 2025
20207d4
Delete analytical_engine/benchmarks/framework/Grape directory
Lingkai981 Sep 10, 2025
e96fb83
Delete analytical_engine/benchmarks/framework/Flash directory
Lingkai981 Sep 10, 2025
9a6b52a
Update cli.py
Lingkai981 Sep 10, 2025
421ce1b
Update config.py
Lingkai981 Sep 10, 2025
d57da33
Update cli.py
Lingkai981 Sep 10, 2025
bfc7223
Update cli.py
Lingkai981 Sep 10, 2025
9af72d4
Merge branch 'alibaba:main' into main
Lingkai981 Oct 22, 2025
ba28afd
Update cli.py
Lingkai981 Oct 22, 2025
39507f8
Delete analytical_engine/benchmarks/framework/config.py
Lingkai981 Oct 22, 2025
17c8ce8
Add files via upload
Lingkai981 Oct 22, 2025
d38995c
Rename analytical_engine/benchmarks/framework/flash-mpijob-template.y…
Lingkai981 Oct 22, 2025
c4223ff
Rename analytical_engine/benchmarks/framework/grape-mpijob-template.y…
Lingkai981 Oct 22, 2025
b67326f
Rename analytical_engine/benchmarks/framework/gthinker-mpijob-templat…
Lingkai981 Oct 22, 2025
98bd785
Rename analytical_engine/benchmarks/framework/ligra-mpijob-template.y…
Lingkai981 Oct 22, 2025
d0b5c09
Rename analytical_engine/benchmarks/framework/powergraph-mpijob-templ…
Lingkai981 Oct 22, 2025
0da16f4
Move pregel-mpijob-template.yaml to config directory
Lingkai981 Oct 22, 2025
7481616
Update cli.py
Lingkai981 Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions analytical_engine/benchmarks/framework/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPENAI_API_KEY="your_openai_api_key_here"
325 changes: 325 additions & 0 deletions analytical_engine/benchmarks/framework/README.md

Large diffs are not rendered by default.

928 changes: 928 additions & 0 deletions analytical_engine/benchmarks/framework/cli.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
name: flash-mpijob
spec:
slotsPerWorker: ${SLOTS_PER_WORKER}
runPolicy:
cleanPodPolicy: None
ttlSecondsAfterFinished: 60
sshAuthMountPath: /home/mpiuser/.ssh
mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
${VOLUMES_BLOCK}
containers:
- image: graphanalysisbenchmarks/flash-mpi:v0.1
name: mpi-launcher
securityContext:
runAsUser: 1000
${VOLUME_MOUNTS_BLOCK}
command: ["/bin/bash", "-c"]
args:
- |
set -e
echo "[INFO] Waiting for DNS sync..."; sleep 5;

if [ "${ALGORITHM}" = "sssp" ]; then

if [ "${SINGLE_MACHINE}" = "1" ]; then
echo "Running in single-machine mode..."
mpirun -n ${MPIRUN_NP} ./flash format /opt/data_sssp/ /opt/scratch/gfs/ data_sssp
echo "Running ${ALGORITHM} in single-machine mode..."
mpirun -n ${MPIRUN_NP} ./${ALGORITHM} /opt/scratch/gfs/ data_sssp ${ALGORITHM_PARAMETER}

else
echo "Running in multi-machine mode..."
mpirun -n ${MPIRUN_NP} -hostfile /etc/mpi/hostfile ./flash format /opt/data_sssp/ /opt/scratch/gfs/ data_sssp
mpirun -n ${MPIRUN_NP} -hostfile /etc/mpi/hostfile ./${ALGORITHM} /opt/scratch/gfs/ data_sssp ${ALGORITHM_PARAMETER}

fi

else
if [ "${SINGLE_MACHINE}" = "1" ]; then
echo "Running in single-machine mode..."
mpirun -n ${MPIRUN_NP} ./flash format /opt/data/ /opt/scratch/gfs/ data
echo "Running ${ALGORITHM} in single-machine mode..."
mpirun -n ${MPIRUN_NP} ./${ALGORITHM} /opt/scratch/gfs/ data ${ALGORITHM_PARAMETER}

else
echo "Running in multi-machine mode..."
mpirun -n ${MPIRUN_NP} -hostfile /etc/mpi/hostfile ./flash format /opt/data/ /opt/scratch/gfs/ data
mpirun -n ${MPIRUN_NP} -hostfile /etc/mpi/hostfile ./${ALGORITHM} /opt/scratch/gfs/ data ${ALGORITHM_PARAMETER}

fi
fi

resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
Worker:
replicas: ${REPLICAS}
template:
spec:
${VOLUMES_BLOCK}
containers:
- image: graphanalysisbenchmarks/flash-mpi:v0.1
name: mpi-worker
securityContext:
runAsUser: 1000
${VOLUME_MOUNTS_BLOCK}
command:
- /usr/sbin/sshd
args:
- -De
- -f
- /home/mpiuser/.sshd_config
resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
name: grape-mpijob
spec:
slotsPerWorker: ${SLOTS_PER_WORKER}
runPolicy:
cleanPodPolicy: None
ttlSecondsAfterFinished: 60
sshAuthMountPath: /home/mpiuser/.ssh
mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
${VOLUMES_BLOCK}
containers:
- image: graphanalysisbenchmarks/grape-mpi:v0.1
name: mpi-launcher
securityContext:
runAsUser: 1000
${VOLUME_MOUNTS_BLOCK}
command: ["/bin/bash", "-c"]
args:
- |
set -e
echo "[INFO] Waiting for DNS sync..."; sleep 10;

if [ "${SINGLE_MACHINE}" = "1" ]; then
echo "Running in single-machine mode..."
if [ "${ALGORITHM}" = "sssp" ]; then
time mpirun -n 1 ./run_app --app_concurrency ${MPIRUN_NP} --vfile /opt/data/graph_sssp.v --efile /opt/data/graph_sssp.e --application ${ALGORITHM} --bfs_source 0 --sssp_source 0 --pr_d 0.85 --pr_mr 10 --cdlp_mr 10 --opt
else
time mpirun -n 1 ./run_app --app_concurrency ${MPIRUN_NP} --vfile /opt/data/graph.v --efile /opt/data/graph.e --application ${ALGORITHM} --bfs_source 0 --sssp_source 0 --pr_d 0.85 --pr_mr 10 --cdlp_mr 10 --opt
fi
else
echo "Running in multi-machine mode..."
if [ "${ALGORITHM}" = "sssp" ]; then
time mpirun -n ${REPLICAS} --hostfile /etc/mpi/hostfile ./run_app --app_concurrency 32 --vfile /opt/data/graph_sssp.v --efile /opt/data/graph_sssp.e --application ${ALGORITHM} --bfs_source 0 --sssp_source 0 --pr_d 0.85 --pr_mr 10 --cdlp_mr 10 --opt
else
time mpirun -n ${REPLICAS} --hostfile /etc/mpi/hostfile ./run_app --app_concurrency 32 --vfile /opt/data/graph.v --efile /opt/data/graph.e --application ${ALGORITHM} --bfs_source 0 --sssp_source 0 --pr_d 0.85 --pr_mr 10 --cdlp_mr 10 --opt
fi
fi

resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
Worker:
replicas: ${REPLICAS}
template:
spec:
${VOLUMES_BLOCK}
containers:
- image: graphanalysisbenchmarks/grape-mpi:v0.1
name: mpi-worker
securityContext:
runAsUser: 1000
${VOLUME_MOUNTS_BLOCK}
command:
- /usr/sbin/sshd
args:
- -De
- -f
- /home/mpiuser/.sshd_config
resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
name: gthinker-mpijob
spec:
slotsPerWorker: ${SLOTS_PER_WORKER}
runPolicy:
cleanPodPolicy: None
ttlSecondsAfterFinished: 120
sshAuthMountPath: /home/mpiuser/.ssh

mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
restartPolicy: OnFailure
volumes:
- name: hadoop-config
configMap:
name: my-hadoop-cluster-hadoop
- name: scratch
emptyDir: {}
${VOLUMES_BLOCK}
- name: shared-mpi-data
emptyDir: {}


containers:
- name: mpi-launcher
image: graphanalysisbenchmarks/gthinker-mpi:v0.1
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 1000
env:
- name: HADOOP_CONF_DIR
value: "/etc/hadoop"

- name: HDFS_NN_SERVICE
value: my-hadoop-cluster-hadoop-hdfs-nn
- name: HDFS_NN_PORT
value: "9000"

- name: CLEAN_OUTPUT
value: "1"

- name: JAVA_HOME
value: /usr/lib/jvm/java-17-openjdk-amd64
- name: PATH
value: "$(JAVA_HOME)/bin:/usr/local/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


volumeMounts:
- name: hadoop-config
mountPath: /etc/hadoop
- name: scratch
mountPath: /opt/scratch
${VOLUME_MOUNTS_BLOCK}
- name: shared-mpi-data
mountPath: /mnt/mpi

command: ["/bin/bash"]
args:
- "-c"
- |
# 开启调试模式,如果任何命令失败则立即退出
# set -euxo pipefail # <- 修正了拼写

echo "[INFO] Waiting 10s for network/DNS to fully ready..."
sleep 10

# 1. 准备 HDFS 数据
# 这里的 graph.txt 将由 envsubst 替换
echo "[INFO] Preparing HDFS data for dataset: graph.txt"
DATASET_HDFS_PATH="/user/mpiuser/graph.txt"

# hdfs dfs -rm -r -f -skipTrash "${DATASET_HDFS_PATH}" || true

if hdfs dfs -test -e "${DATASET_HDFS_PATH}"; then
echo "[INFO] Dataset already exists on HDFS."
else

echo "[INFO] Dataset not found on HDFS, uploading..."
HADOOP_USER_NAME=root hdfs dfs -mkdir -p /user/mpiuser
HADOOP_USER_NAME=root hdfs dfs -chown mpiuser:supergroup /user/mpiuser
HADOOP_USER_NAME=root hdfs dfs -chmod 775 /user/mpiuser
hdfs dfs -put "/opt/data/graph.txt" "${DATASET_HDFS_PATH}"

fi
echo "[INFO] HDFS data is ready."

hdfs dfs -ls /user/mpiuser/

cat /etc/hadoop/core-site.xml

HADOOP_CP=$(cat /etc/hadoop_classpath)

CONVERTED_HOSTFILE="/mnt/mpi/hostfile"
sed 's/ slots=/:/' /etc/mpi/hostfile > "${CONVERTED_HOSTFILE}"

time mpiexec \
-np ${REPLICAS} \
--hostfile "${CONVERTED_HOSTFILE}" \
-verbose \
-env CLASSPATH "${HADOOP_CP}" \
-env LD_LIBRARY_PATH "/usr/lib/jvm/java-17-openjdk-amd64/lib/server:/usr/local/hadoop/lib/native:/usr/local/bin:/usr/local/lib:/usr/local/openmpi/bin:/usr/local/openmpi/lib" \
-env JAVA_HOME "/usr/lib/jvm/java-17-openjdk-amd64" \
-env HADOOP_CONF_DIR "/etc/hadoop" \
/opt/gthinker/${ALGORITHM}/run "${DATASET_HDFS_PATH}" ${SLOTS_PER_WORKER}

resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
requests:
cpu: ${CPU}
memory: ${MEMORY}

Worker:
replicas: ${REPLICAS}
template:
spec:
restartPolicy: OnFailure
volumes:
- name: hadoop-config
configMap:
name: my-hadoop-cluster-hadoop
- name: scratch
emptyDir: {}
${VOLUMES_BLOCK}
- name: shared-mpi-data
emptyDir: {}
containers:
- name: mpi-worker
image: graphanalysisbenchmarks/gthinker-mpi:v0.1
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 1000
env:
- name: JAVA_HOME
value: /usr/lib/jvm/java-17-openjdk-amd64
- name: PATH
value: "$(JAVA_HOME)/bin:/usr/local/hadoop/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- name: HADOOP_CONF_DIR
value: "/etc/hadoop"
- name: HDFS_NN_SERVICE
value: my-hadoop-cluster-hadoop-hdfs-nn
- name: HDFS_NN_PORT
value: "9000"


volumeMounts:
- name: hadoop-config
mountPath: /etc/hadoop
- name: scratch
mountPath: /opt/scratch
${VOLUME_MOUNTS_BLOCK}
- name: shared-mpi-data
mountPath: /mnt/mpi
command: ["/usr/sbin/sshd"]
args: ["-De","-f","/home/mpiuser/.sshd_config"]
resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
requests:
cpu: ${CPU}
memory: ${MEMORY}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
name: ligra-mpijob
spec:
slotsPerWorker: ${SLOTS_PER_WORKER}
runPolicy:
cleanPodPolicy: None
ttlSecondsAfterFinished: 60
sshAuthMountPath: /home/mpiuser/.ssh
mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
${VOLUMES_BLOCK}
containers:
- image: graphanalysisbenchmarks/ligra-mpi:v0.1
name: mpi-launcher
securityContext:
runAsUser: 1000
${VOLUME_MOUNTS_BLOCK}
command: ["/bin/bash", "-c"]
args:
- |
set -e
echo "[INFO] Waiting for DNS sync..."; sleep 5;
if [ "${ALGORITHM}" = "BellmanFord" ]; then
time ./${ALGORITHM}${MPIRUN_NP} -rounds 1 /opt/data/graph_sssp.txt
else
time ./${ALGORITHM}${MPIRUN_NP} -rounds 1 /opt/data/graph.txt
fi

resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
Worker:
replicas: ${REPLICAS}
template:
spec:
${VOLUMES_BLOCK}
containers:
- image: graphanalysisbenchmarks/ligra-mpi:v0.1
name: mpi-worker
securityContext:
runAsUser: 1000
${VOLUME_MOUNTS_BLOCK}
command:
- /usr/sbin/sshd
args:
- -De
- -f
- /home/mpiuser/.sshd_config
resources:
limits:
cpu: ${CPU}
memory: ${MEMORY}
Loading