Skip to content

lec07 data access

gzq edited this page Mar 19, 2024 · 3 revisions

lec07 课件实验说明

注意事项

该文档下所有结果均在并行超算云北京超级云计算中心T分区计算节点上产生

CPU型号:Intel(R) Xeon(R) Platinum 9242 CPU @ 2.30GHz

编译

假设位于目录 PE下,

cd src/code/lec07_data_access

ln -sf ./make.inc.example/make.inc.gcc make.inc

./build.sh

实验 1

结果:

latency_local

运行代码

cd src/code/lec07_data_access
# 提交任务到计算节点
sbatch ./run/run_local.sh
# 运行时间大概在8分钟左右
# 控制台输出信息会写入slurm-$JOBID.out文件中
# 测试结果会写入./data/mem_local.dat文件中
# 查看任务状态
squeue
# 取消任务
scancel [JOBID]

# 以上任务完成之后
# 画图
module load gnuplot
gnuplot ./plot/plot_latency_local.plt
# 图片生成在 ./png/latency_local.png

实验2

结果:

image-20240319144226247

运行代码

cd src/code/lec07_data_access
sbatch ./run/run_remote.sh
gnuplot ./plot/plot_latency_local_remote.plt

实验3

结果:

image-20240319144821909

运行代码:

cd src/code/lec07_data_access
gnuplot ./plot/plot_bandwidth_local_remote.plt

实验4

结果:

image-20240319145001234

运行代码:

cd src/code/lec07_data_access
gnuplot ./plot/plot_memory_bandwidth_local_remote.plt

实验5

结果:

image-20240319145305143

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_chain2.sh
sbatch ./run/run_chain4.sh
sbatch ./run/run_chain6.sh
sbatch ./run/run_chain8.sh
sbatch ./run/run_chain10.sh
sbatch ./run/run_chain12.sh

gnuplot ./plot/plot_bandwidth_multichain.plt

实验6

结果:

image-20240319145633054

运行代码:

cd src/code/lec07_data_access

gnuplot ./plot/plot_memory_bandwidth_multichain.plt

实验7

结果:

image-20240319145909088

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_chain2_remote.sh
sbatch ./run/run_chain4_remote.sh
sbatch ./run/run_chain6_remote.sh
sbatch ./run/run_chain8_remote.sh
sbatch ./run/run_chain10_remote.sh
sbatch ./run/run_chain12_remote.sh

gnuplot ./plot/plot_memory_bandwidth_multichain_remote.plt

实验8

结果:

image-20240319150918243

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_address_ordered_traveral.sh

gnuplot ./plot/plot_bandwidth_address_ordered.plt

实验9

结果:

image-20240319151650294

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_sequential_without_ptrchase.sh
sbatch ./run/run_random_without_ptrchase.sh

gnuplot ./plot/plot_bandwidth_ptrchase_random_sequential.plt

实验10

结果:

image-20240319152024839

运行代码:

cd src/code/lec07_data_access

gnuplot ./plot/plot_memory_bandwidth_ptrchase_random_sequential.plt

实验11

结果:

image-20240319152410348

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_prefetch_0.sh
sbatch ./run/run_prefetch_10.sh
sbatch ./run/run_prefetch_20.sh
sbatch ./run/run_prefetch_40.sh
sbatch ./run/run_prefetch_80.sh
sbatch ./run/run_prefetch_120.sh

gnuplot ./plot/plot_memory_bandwidth_prefetch.plt

实验12

结果:

image-20240319152859719

运行代码:

cd src/code/lec07_data_access

gnuplot ./plot/plot_memory_bandwidth_various.plt

实验13

结果:

image-20240319153034330

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_thread1_chain1.sh
sbatch ./run/run_thread1_chain10.sh
sbatch ./run/run_thread4_chain1.sh
sbatch ./run/run_thread4_chain10.sh
sbatch ./run/run_thread8_chain1.sh
sbatch ./run/run_thread8_chain10.sh
sbatch ./run/run_thread16_chain1.sh
sbatch ./run/run_thread16_chain10.sh

gnuplot ./plot/plot_memory_bandwidth_multithreads.plt

实验14

结果:

image-20240319153711888

运行代码:

cd src/code/lec07_data_access

sbatch ./run/run_sequential_without_ptrchase_thread1.sh
sbatch ./run/run_sequential_without_ptrchase_thread2.sh
sbatch ./run/run_sequential_without_ptrchase_thread4.sh
sbatch ./run/run_sequential_without_ptrchase_thread8.sh
sbatch ./run/run_sequential_without_ptrchase_thread12.sh

sbatch ./run/run_random_without_ptrchase_thread1.sh
sbatch ./run/run_random_without_ptrchase_thread2.sh
sbatch ./run/run_random_without_ptrchase_thread4.sh
sbatch ./run/run_random_without_ptrchase_thread8.sh
sbatch ./run/run_random_without_ptrchase_thread12.sh

gnuplot ./plot/plot_memory_bandwidth_multithreads.plt