Skip to content

Repository files navigation

repo759-final-project

Team Members

  1. Arjun Anil
  2. Aditi Chintawar

Proposed project brief

A study of how Otsu's method for Image Binarization can be sped up using CUDA and OpenMP multi-threading techniques.


Getting Started

Important

All SLURM scripts in this repository target the euler04 node on the instruction partition. You must have access to the instruction partition to submit jobs as-is. If you are running on a different cluster or partition, see Running on a different node or partition.

1. Generate the dataset

From the repo root:

cd dataset
make generate-dataset
cd ..

This compiles and runs the dataset generator, placing binary image files under dataset/out/.

2. Run the implementations

Each implementation has its own SLURM script. cd into the respective directories and queue using sbatch

# p1 -- single-threaded baseline
cd p1-baseline && sbatch slurm-p1.sh && cd ..

# p3 -- OpenMP parallel (scales 1, 2, 4, 8 threads)
cd p3-openmp && sbatch slurm-p3.sh && cd ..

# p4 -- cuBLAS
cd p4-cublas && sbatch slurm-p4.sh && cd ..

# p5 -- CUDA Thrust
cd p5-thrust && sbatch slurm-p5.sh && cd ..

# p6 -- CUDA CUB
cd p6-cub && sbatch slurm-p6.sh && cd ..

The slurm scripts will compile the required binary internally so no need to run an extra compilation/make command.
Output and error logs are written to <pN>.out / <pN>.err inside the respective implementation directory.


Running on a different node or partition

Each SLURM script contains two directives that tie it to a specific node and partition:

#SBATCH --partition=instruction
#SBATCH --nodelist=euler04

To run on a different setup, open the relevant script and:

  • Change the partition -- replace instruction with your target partition name, or remove the --partition line entirely to use your cluster's default.
  • Change or remove the node constraint -- replace euler04 with your target node name, or remove the --nodelist line entirely to let the scheduler choose any available node.

Alternatively, SLURM allows command-line flags to override script directives:

sbatch --partition=<your-partition> --nodelist=<your-node> p1-baseline/slurm-p1.sh

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages