决赛现场脚本
Some checks failed
Build wheels / build (ubuntu-latest, 3.11) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.12) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / check (push) Has been cancelled
Tests / build (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.13) (push) Has been cancelled

This commit is contained in:
jaunatisblue
2026-05-18 01:37:19 +08:00
parent 4c7a10d026
commit ef3d7e9ee6
26 changed files with 894 additions and 62 deletions

View File

@@ -1,30 +1,40 @@
# TN
```bash
# qibotn目录下
I_MPI_FABRICS=shm:ofi \
I_MPI_OFI_PROVIDER=tcp \
FI_PROVIDER=tcp \
# search + contractOpen MPI 多节点:每节点 2 rank每 rank 绑定 1 个 NUMA。
# MPI_HOSTS 里每个节点写 :2MPI_RANKS = 节点数 * 2。
# 每个 rank 使用 MPI_PE 个 core这台 2-NUMA AMD 节点用 MPI_PE=128。
NQUBITS=40 \
TN_DEBUG_TRIALS=1 \
SCHEDULER_HOST=10.20.1.100 \
DASK_ADDRESS=tcp://10.20.1.100:8786 \
WORKER_HOSTS="10.20.1.100 10.20.1.101 10.20.1.102 10.20.1.103" \
CASE=main1 \
OBSERVABLES=long_z_string \
NQUBITS=34 \
NLAYERS=20 \
TORCH_THREADS=48 \
SEARCH_REPEATS=2048 \
SEARCH_TIME=300 \
SCHEDULER_HOST=10.20.1.103 \
WORKER_HOSTS="10.20.1.103 10.20.6.101" \
DASK_ADDRESS="tcp://10.20.1.103:8786" \
NWORKERS=84 \
NTHREADS=1 \
MPIEXEC_FULL="mpirun -np 4 -hostfile /home/yx/qibotn/hostfile -perhost 2" \
TORCH_THREADS=80 \
MPI_PE=80 \
MPI_MAP_BY=ppr:1:numa:PE=80 \
MPI_BIND_TO=core \
OMP_NUM_THREADS=80 \
MKL_NUM_THREADS=80 \
BLIS_NUM_THREADS=80 \
MPI_HOSTS="node-0:2,node-1:2,node-2:2,node-3:2" \
MPI_RANKS=8 \
NWORKERS=96 \
TN_TARGET_SIZE=17179869184 \
tools/run_tn_dask_mpi_all.sh
# 单独缩并contract计算
I_MPI_FABRICS=shm:ofi \
I_MPI_OFI_PROVIDER=tcp \
FI_PROVIDER=tcp \
mpirun -np 4 -hostfile /home/yx/qibotn/hostfile -perhost 2 \
mpirun --map-by ppr:1:numa:PE=80 --bind-to core --report-bindings \
-x LD_PRELOAD=/home/aocc/aocl/5.2.0/aocc/lib_LP64/libblis-mt.so.5 \
-x BLIS_NUM_THREADS=80 \
-x OMP_NUM_THREADS=80 \
-x MKL_NUM_THREADS=80 \
-x OMP_PROC_BIND=close \
-x OMP_PLACES=cores \
-np 8 \
-host node-0:2,node-1:2,node-2:2,node-3:2 \
.venv/bin/python -u tools/tn_contest_runner.py contract \
--mpi \
--case main1 \
@@ -32,22 +42,47 @@ mpirun -np 4 -hostfile /home/yx/qibotn/hostfile -perhost 2 \
--nlayers 20 \
--observables long_z_string \
--tree-dir trees/contest_tn \
--torch-threads 48 \
--torch-threads 80 \
--dtype complex64
```
# MPS
```
cd /home/yx/qibotn
cd /home/qibo/qibotn
I_MPI_FABRICS=shm:ofi \
I_MPI_OFI_PROVIDER=tcp \
FI_PROVIDER=tcp \
MPIEXEC_FULL="mpirun -np 4 -hostfile /home/yx/qibotn/hostfile -perhost 2" \
MPIEXEC=mpirun \
MPI_HOSTS="node-2:4,node-3:4" \
MPI_RANKS=8 \
MPI_PE=48 \
MPI_MAP_BY=ppr:2:numa:PE=48 \
MPI_BIND_TO=core \
MPI_REPORT_BINDINGS=1 \
TORCH_THREADS=48 \
OMP_NUM_THREADS=48 \
MKL_NUM_THREADS=48 \
BLIS_NUM_THREADS=48 \
OBS_FILTER=ring_xz \
MAIN1_NQ=128 \
MAIN1_LAYERS=24 \
MAIN1_BOND=1024 \
tools/run_vidal_mpi_contest_cases.sh main1
```
MPIEXEC=mpirun \
MPI_HOSTS="node-2:4" \
MPI_RANKS=4 \
MPI_PE=48 \
MPI_MAP_BY=ppr:2:numa:PE=48 \
MPI_BIND_TO=core \
MPI_REPORT_BINDINGS=1 \
TORCH_THREADS=48 \
OMP_NUM_THREADS=48 \
MKL_NUM_THREADS=48 \
BLIS_NUM_THREADS=48 \
OBS_FILTER=ring_xz \
MAIN1_NQ=128 \
MAIN1_LAYERS=24 \
MAIN1_BOND=1024 \
tools/run_vidal_mpi_contest_cases.sh main1
```

42
docs/xianchang.md Normal file
View File

@@ -0,0 +1,42 @@
mpirun --map-by ppr:1:numa:PE=80 --bind-to core --report-bindings \
-x LD_PRELOAD=/home/aocc/aocl/5.2.0/aocc/lib_LP64/libblis-mt.so.5 \
-x BLIS_NUM_THREADS=80 \
-x OMP_NUM_THREADS=80 \
-x MKL_NUM_THREADS=80 \
-x OMP_PROC_BIND=close \
-x OMP_PLACES=cores \
-np 4 \
-host node-0:2,node-1:2,node-2:2,node-3:2 \
.venv/bin/python -u tools/tn_contest_runner.py contract \
--mpi \
--case main1 \
--nqubits 34 \
--nlayers 20 \
--observables long_z_string \
--tree-dir trees/contest_tn \
--torch-threads 80 \
--dtype complex64
SEARCH_TIME=300 NQUBITS=40 TN_DEBUG_TRIALS=1 SCHEDULER_HOST=10.20.1.102 DASK_ADDRESS=tcp://10.20.1.102:8786 WORKER_HOSTS="10.20.1.102 10.20.1.103" CASE=main1 OBSERVABLES=long_z_string TORCH_THREADS=80 MPI_PE=80 MPI_MAP_BY=ppr:1:numa:PE=80 MPI_BIND_TO=core OMP_NUM_THREADS=80 MKL_NUM_THREADS=80 BLIS_NUM_THREADS=80 MPI_HOSTS="node-2:2,node-3:2" MPI_RANKS=4 NWORKERS=128 TN_TARGET_SIZE=17179869184 tools/run_tn_dask_mpi_all.sh
NQUBITS=40 \
TN_DEBUG_TRIALS=1 \
SCHEDULER_HOST=10.20.1.102 \
DASK_ADDRESS=tcp://10.20.1.102:8786 \
WORKER_HOSTS="10.20.1.102 10.20.1.103" \
CASE=main1 \
OBSERVABLES=long_z_string \
TORCH_THREADS=80 \
MPI_PE=80 \
MPI_MAP_BY=ppr:1:numa:PE=80 \
MPI_BIND_TO=core \
OMP_NUM_THREADS=80 \
MKL_NUM_THREADS=80 \
BLIS_NUM_THREADS=80 \
MPI_HOSTS="node-2:2,node-3:2" \
MPI_RANKS=4 \
NWORKERS=96 \
TN_TARGET_SIZE=17179869184 \
tools/run_tn_dask_mpi_all.sh