Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Boost)
find_package(MPI)
find_package(GDAL CONFIG)
find_package(GSL)
find_package(Eigen3)
find_package(BZip2)

# Build options - which programming models to enable
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Z. Jin and J. S. Vetter, "A Benchmark Suite for Improving Performance Portabilit
[NVIDIA HPC SDK](https://developer.nvidia.com/hpc-sdk)

# Dependencies
Certain benchmarks require [Boost](https://www.boost.org/releases/latest/), [GSL](https://www.gnu.org/software/gsl), [GDAL](https://github.com/OSGeo/gdal), GPU-aware Message Passing Interface(MPI) or vendors' collective communication libraries (e.g. NCCL).<br>
Certain benchmarks require [Boost](https://www.boost.org/releases/latest/), [Eigen](https://eigen.tuxfamily.org), [GDAL](https://github.com/OSGeo/gdal), GPU-aware Message Passing Interface(MPI) or vendors' collective communication libraries (e.g. NCCL).<br>
Boost: hbc, ge-spmm, mmcsf, warpsort, gerbil<br>
MPI: miniDGS, miniWeather, pingpong, sparkler, allreduce, ccl, halo-finder<br>
CCL: ccl<br>
GSL: sss, xlqc<br>
Eigen: xlqc<br>
GDAL: stsg<br>
BZip2: gerbil

Expand Down
11 changes: 6 additions & 5 deletions cmake/modules/BenchmarkMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(DEPEND_ON_BOOST "hbc" "ge-spmm" "mmcsf" "warpsort" "gerbil")
# Global list for benchmarks that require MPI
set(DEPEND_ON_MPI "miniDGS" "miniWeather" "pingpong" "sparkler" "allreduce" "ccl" "halo-finder")

# Global list for benchmarks that require GSL
set(DEPEND_ON_GSL "sss" "xlqc")
# Global list for benchmarks that require Eigen
set(DEPEND_ON_EIGEN "xlqc")

# Global list for benchmarks that require GDAL
set(DEPEND_ON_GDAL "stsg")
Expand Down Expand Up @@ -116,9 +116,10 @@ function(add_hecbench_benchmark)
endif()
endif()

if(${BENCH_NAME} IN_LIST DEPEND_ON_GSL)
if(NOT GSL_FOUND)
message(STATUS "Skipping ${BENCH_NAME}-${BENCH_MODEL_LOWER} (GSL not found)")
if(${BENCH_NAME} IN_LIST DEPEND_ON_EIGEN)
# Eigen is header-only; the imported target carries the include path
if(NOT TARGET Eigen3::Eigen)
message(STATUS "Skipping ${BENCH_NAME}-${BENCH_MODEL_LOWER} (Eigen not found)")
return()
endif()
endif()
Expand Down
2 changes: 0 additions & 2 deletions src/sss-cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ add_hecbench_benchmark(
NAME sss
MODEL cuda
SOURCES main.cu
INCLUDE_DIRS ${GSL_INCLUDE_DIRS}
CATEGORIES algorithms
LINK_LIBRARIES gsl
)
1 change: 1 addition & 0 deletions src/sss-cuda/DPmixGGM.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cmath>
#define DPMIXGGM_CPP
#ifndef GRAPH_CPP
#include "graph.cpp"
Expand Down
10 changes: 4 additions & 6 deletions src/sss-cuda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ CC = nvcc
OPTIMIZE = yes
DEBUG = no
ARCH = sm_60
GSL = /path/to/GSL
LAUNCHER =

#===============================================================================
Expand All @@ -25,11 +24,10 @@ obj = $(source:.cu=.o)
#===============================================================================

# Standard Flags
CFLAGS := $(EXTRA_CFLAGS) -std=c++17 -Xcompiler -Wall -arch=$(ARCH) \
-I$(GSL)/include
CFLAGS := $(EXTRA_CFLAGS) -std=c++17 -Xcompiler -Wall -arch=$(ARCH)

# Linker Flags
LDFLAGS = -L$(GSL)/lib -lgsl
LDFLAGS =

# Debug Flags
ifeq ($(DEBUG),yes)
Expand All @@ -49,11 +47,11 @@ $(program): $(obj) Makefile
$(CC) $(CFLAGS) $(obj) -o $@ $(LDFLAGS)

%.o: %.cu DPmixGGM.cpp DPmixGGM_Lists.cpp DPmixGGM_SSSmoves.cpp \
kernels.cu graph.cpp gwish.cpp utilities.cpp Makefile
kernels.cu graph.cpp gwish.cpp utilities.cpp gsl_compat.h Makefile
$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -rf $(program) $(obj) RES/f9_n150_p50_modes_GPU.txt

run: $(program)
$(LAUNCHER) GSL_RNG_SEED=123 ./$(program) f9_n150_p50
$(LAUNCHER) ./$(program) f9_n150_p50
36 changes: 21 additions & 15 deletions src/sss-cuda/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
DPmixGGM
========

This folder contains source codes for the "GPU-powered Stochastic Shotgun Search for Dirichlet proces mixtures of Gaussian Graphical Models"
This folder contains source codes for the "GPU-powered Stochastic Shotgun Search for Dirichlet proces mixtures of Gaussian Graphical Models"
by Chiranjit Mukherjee and Abel Rodriguez.
The "DPmixGGM_SSS_main.cpp" file contains tuning parameters for the algorithm, as elaborated below:

The "DPmixGGM_SSS_main.cpp" file contains tuning parameters for the algorithm, as elaborated below:
1. Run the SSS
2. Run GPU/CPU versions of the SSS by enabling / disabling the macro CUDA.
3. Specify maximum number of mixture components that the model should accommodate (for pre-allocation of memory).
4. Set SSS runtime parameters C, D, R, S, M, g, h, f, t.
5. Set SSS number of chain parameters. User needs to provide at least one initial point.
7. Set hyperparameters of for the prior on (mu, K | G) with N0, DELTA0.
2. Run GPU/CPU versions of the SSS by enabling / disabling the macro CUDA.
3. Specify maximum number of mixture components that the model should accommodate (for pre-allocation of memory).
4. Set SSS runtime parameters C, D, R, S, M, g, h, f, t.
5. Set SSS number of chain parameters. User needs to provide at least one initial point.
7. Set hyperparameters of for the prior on (mu, K | G) with N0, DELTA0.

Complie source codes using the "make" command and run with "./main f9_n150_p50" command.
The program expects an input-data file (e.g. f9_n150_p50) in the DATA/ folder and at least one initialization point (e.g. f9_n150_p50_init1).
The input-data file should specify n and p in the first row and then provide n rows of length p. The initial point data-file should specify n, p
and L of the initial model configuration in the first row and xi-indices of the initial point in the second row. Subsequent L rows specify
G_l (l=1:L).

The program expects an input-data file (e.g. f9_n150_p50) in the DATA/ folder and at least one initialization point (e.g. f9_n150_p50_init1).
The input-data file should specify n and p in the first row and then provide n rows of length p. The initial point data-file should specify n, p
and L of the initial model configuration in the first row and xi-indices of the initial point in the second row. Subsequent L rows specify
G_l (l=1:L).

A list of highest-score models is stored in folder RES/.

Dependencies
------------
None beyond a C++17 compiler. The uniform random number generator (MT19937) and
the adaptive Gauss-Kronrod quadrature the sampler needs are implemented in
`gsl_compat.h` in this folder.
Loading