We developed a new connected components graph algorithm, Contour. Compared with the existing FastSV algorithm implemented in Chapel, the Contour algorithm can achieve about 2-8 times speedup. We also implemented the Contour algorithm in the GBBS graph package. The speedup is about 2x speedup. However, the execution time in C++ is much shorter. We hope to find the reason why Chapel has a big overhead.
The Chapel comparison in Arkouda is as follows.
1 building the Chapel environment, version >=1.29.0
2 downloading the latest arkouda package
3 downlowing arkouda-njit package (git@github.com:Bears-R-Us/arkouda-njit.git) under ther arkouda directory; renaming arkouda-njit as arkouda_njit
4 compiling arkouda-njit
enter arkouda/arkouda_njit directory
python module_configuration.py --ak_loc=/complete/path/to/arkouda/ --pkg_path=/complete/path/to/arkouda_njit/arachne_development/ | bash
5 under the arkouda directory, start arkouda server
./arkouda -nl 1 --ServerConfig.ServerPort=5050 2>&1|tee -a output.text
6 executing the comparison program under the directory arkouda_njit/arachne_development/test/client/benchmarks
./runclient.sh batch_cc.py machinename 5050
in batch_cc.py, we can just keep the delaunay_n20.mtx graph and remove all other graphs. we need to download the graph file and change the directory to its location.
here is the output of FastSV (fast sv cc) and our Contour (fs dist cc) results in output.text.
2023-06-08:09:39:09 [CCMsg] segCCMsg Line 2404 DEBUG [Chapel] Time elapsed for fast sv cc: 0.144295
2023-06-08:09:39:09 [CCMsg] segCCMsg Line 2418 DEBUG [Chapel] Time elapsed for fs dist cc: 0.017734
The C++ gbbs package based comparison is as follows.
1 downloading gbbs
git clone git@github.com:zhihuidu/gbbs.git
2 building gbbs
cd gbbs
git submodule update --init
bazel build //...
3 generating the conver tool
cd gbs/utils
make
./snap_converter -i edglistfile -o adjfile
given edge list file as input , output the adjacency list file for gbbs.
4 run the test
numactl -i all ./bazel-bin/benchmarks/Connectivity/ConnectIt/mains/shiloach_vishkin -rounds 3 -s -m -r 10 ./inputs/delaunay_n20.adj
it will use the input file delaunay_n20.adj as input graph, run the algorithm shiloach_vishkin
the average execution time is
{
"test_type": "static_connectivity_result",
"test_name" : "shiloach_vishkin; no_sampling",
"graph" : "./inputs/delaunay_n20.adj",
"rounds" : 10,
"medt" : 0.02108,
"mint" : 0.020909,
"maxt" : 0.021629
}
the following command will run our contour algorithm.
numactl -i all ./bazel-bin/benchmarks/Connectivity/ConnectIt/mains/contour -rounds 3 -s -m -r 10 ./inputs/delaunay_n20.adj
The no_sampling results are as follows.
{
"test_type": "static_connectivity_result",
"test_name" : "contour; no_sampling",
"graph" : "./inputs/delaunay_n20.adj",
"rounds" : 10,
"medt" : 0.013881,
"mint" : 0.013434,
"maxt" : 0.014609
}
The system information is as follows.
uname -a
Linux alex 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
cat /proc/cpuinfo the last processor informaiton is as follows.
processor : 23
vendor_id : GenuineIntel
cpu family : 6
model : 151
model name : 12th Gen Intel(R) Core(TM) i9-12900KS
stepping : 2
microcode : 0x2c
cpu MHz : 3400.000
cache size : 30720 KB
physical id : 0
siblings : 24
core id : 39
cpu cores : 16
apicid : 78
initial apicid : 78
fpu : yes
fpu_exception : yes
cpuid level : 32
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
vmx flags : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad ept_1gb flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs eibrs_pbrsb
bogomips : 6835.20
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
cat /proc/meminfo as follows.
cat /proc/meminfo
MemTotal: 32606972 kB
MemFree: 29801908 kB
MemAvailable: 31092068 kB
Buffers: 101636 kB
Cached: 1503568 kB
SwapCached: 0 kB
Active: 812976 kB
Inactive: 1249784 kB
Active(anon): 2596 kB
Inactive(anon): 454284 kB
Active(file): 810380 kB
Inactive(file): 795500 kB
Unevictable: 32 kB
Mlocked: 32 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Zswap: 0 kB
Zswapped: 0 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 457856 kB
Mapped: 326920 kB
Shmem: 11356 kB
KReclaimable: 105424 kB
Slab: 405600 kB
SReclaimable: 105424 kB
SUnreclaim: 300176 kB
KernelStack: 13104 kB
PageTables: 16904 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 18400632 kB
Committed_AS: 3935208 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 181992 kB
VmallocChunk: 0 kB
Percpu: 26208 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 366260 kB
DirectMap2M: 6709248 kB
DirectMap1G: 26214400 kB