CHROMA delivers elastic graph coloring across single-GPU, multi-GPU, and CPU backends. The project couples CUDA kernels with robust graph partitioning (RGP) and CPU heuristics to explore state-of-the-art MIS and SGR strategies on large graphs stored under Datasets/.
CHROMA/– CUDA single-GPU implementation (CHROMA.cu,Makefile, optionalmodel/model.cpp).CHROMA_RGP/– Multi-GPU extension with robust graph partitioning; depends on METIS (and optionally KaHIP).JP-Series/– Additional CUDA heuristics (JP-SL, JP-ADG, JP-SLL) with dedicatedMakefile.CPU/Sequential,CPU/Parallel– CPU algorithms built via local Makefiles; orchestrated byCPU/run.py.Datasets/– Input graphs in.egr,.txt, or.binformats; test sets live underDatasets/test/.scripts/– Batch and grid evaluators (batch_test.py,grid_elastic.py).lib/io/– Shared I/O helpers (graph.cpp,mmio.cpp).model/– Optional prediction artifacts (model.cpp, generators) used when enablingPRE_MODEL=1.External/– Vendored third-party libraries (METIS, KaHIP, GKlib).
- Linux host with CUDA 12.x toolchain (
nvcc) and an Ada-class GPU (ARCH=sm_89orsm_90). - OpenMP for CHROMA_RGP build; METIS installed under
$HOME/localor updateINCLUDES_METIS/LIBS_METIS. - Optional: KaHIP (multi-cut partitioning) and Kokkos if building
CPU/ParallelKokkos targets.
- Build
cd CHROMA make ARCH=<GPU_ARCH> [PRE_MODEL=1]
- Use
PRE_MODEL=1whenmodel/model.cpp(generated viam2cgen) is present for θ prediction. - Please use your own GPU architecture to replace
<GPU_ARCH>.
- Use
- Run
Running from inside
CHROMA/CHROMA -f Datasets/facebook.egr -a P_SL_ELS -e 10
CHROMA/works with./CHROMA -f ../Datasets/.... Expectresult verification passed,colors used:, andruntime:in the output.- Flags
-f, --file <path>: Input graph (required); supports.egr,.txt,.bin.-a, --algorithm <id>: Choose0/P_SL_ELS(default) or1/P_SL_ELS_SDC.-e, --elastic <θ>: Manually set elastic parameter (default0).-p, --predict: Enable prediction model to auto-select θ (PRE_MODEL=1).-h, --help: Print usage summary and exit.
- Flags
- Pre-requisite: Install METIS; adjust
CHROMA_RGP/Makefileif headers/libraries reside outside$HOME/local. - Build
Use
cd CHROMA_RGP make ARCH=sm_89 [PRE_MODEL=1] [USE_METIS=1 or 0] [USE_KAHIP=1 or 0] [USE_MTKAHIP=1 or 0]
PRE_MODEL=1whenmodel/model.cppis present for θ prediction. UseUSE_METIS=1to enable METIS partitioner;USE_KAHIP=1to enable KaHIP partitioner;USE_MTKAHIP=1to enable mt-KaHIP partitioner. - Run
CHROMA_RGP/CHROMA_RGP -f Datasets/facebook.egr -p 2 -e 10
-pselects partition count; θ defaults to 10 when omitted.- Flags
-f, --file <path>: Input graph (required).-e, --elastic <θ>: Target elastic number (default10).-p, --parts <count>: Number of partitions for RGP (default2).--predict: Enable prediction model to auto-select θ (PRE_MODEL=1).--partitioner <name>: Partitioning strategymetis(default),round_robinm,random,ldg, orkahip.-h, --help: Print usage summary and exit.
- Flags
- Build
cd JP-Series make ARCH=sm_89 - Run
Switch algorithms with
JP-Series/JP-Series -f Datasets/facebook.egr -a JP-SL
-a JP-ADGor-a JP-SLLas needed.- Flags
-f, --file <path>: Input graph (required).-a, --algorithm <id>:0/JP-SL(default),1/JP-ADG,2/JP-SLL.-e, --elastic <θ>: Optional elastic number (default0).-h, --help: Print usage summary and exit.
- Flags
- Sequential
cd CPU/Sequential make # builds cpu_Dstura, cpu_greedy, cpu_SDL ./cpu_greedy ../Datasets/test/facebook.egr
- Arguments
<graph.egr>: Path to dataset (required). Executables read the graph and print colors/runtime.
- Arguments
- Parallel (OpenMP/Kokkos)
cd CPU/Parallel make # builds OpenMP targets (cpu_ADG, cpu_SL, cpu_SLL, cpu_ecl) # make kokkos # builds cpu_greedy_kokkos when Kokkos is configured ./cpu_SL ../Datasets/test/facebook.egr 32
- Arguments
<graph.egr>: Path to dataset (required).<threads>: Positive integer specifying OpenMP thread count (required for OpenMP/Kokkos binaries).
- Arguments
- Batch runner
The runner executes compiled
cd CPU python3 run.pycpu_*binaries five times per dataset and stores results inCPU/CPU_result.json.
python3 Scripts/batch_test.py --dataset-dir Datasets --binary CHROMA/CHROMA --runs 5 --out results.jsonpython3 Scripts/grid_elastic.py --dataset-dir Datasets --elastic-start 5 --elastic-end 12Capture sample output (colors, runtime) alongside the dataset for reproducibility.- batch_test.py Flags
--dataset-dir/-d: Dataset directory (defaultDatasets).--pattern: Glob for dataset filenames (default*.egr).--recursive: Recurse into subdirectories.--binary: Path to CHROMA binary (defaultCHROMA/CHROMA).--algorithm/-a: Algorithm for-aflag (defaultP_SL_ELS).--elastic: θ passed via-e(default10).--predict: Enable prediction model (in /model/model.cpp)to auto-select θ (PRE_MODEL=1).--runs: Repetitions per dataset (default5).--timeout: Seconds before aborting a single run (optional).--extra -- <args>: Additional CHROMA arguments appended after--sentinel.--out: Output JSON path (default timestamped file).
- grid_elastic.py Flags
--dataset-dir/-d: Dataset directory (defaultDatasets).--pattern: Glob for dataset filenames (default*.egr).--recursive: Recurse into subdirectories.--binary: Path to CHROMA binary (defaultCHROMA/CHROMA).--algorithm/-a: Algorithm string passed to CHROMA (defaultP_SL_ELS).--elastic-start: Starting θ (inclusive, required).--elastic-end: Ending θ (inclusive, required).--timeout: Seconds before aborting a single run (optional).--extra -- <args>: Additional CHROMA arguments appended after--sentinel.--out: Output JSON path (defaultresults_elastic_grid_<timestamp>.json).
- batch_test.py Flags
Download additional graphs from the ECL collection. Algorithmic baselines include JP-SL/JP-SLL/JP-ADG (MIS) and CSRColor/Kokkos VB-BIT (SGR) for comparative studies.