0% found this document useful (0 votes)
7 views1 page

A2 - Instructions 2

Uploaded by

vivek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

A2 - Instructions 2

Uploaded by

vivek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT INSTRUCTIONS

1. Only one submission to be made per group


2. Please check for all edge cases and test cases
3. Viva will be conducted for the code and the relevant concepts.
4. Submit one zip file containing the the cuda program and a makefile and the input files . Submit
a separate zip with the output files .
5. Naming convention of the zip - B18XXXXCS_A2.zip and B18XXXXCS_A2.cu for the
memberwho is submitting the code
6. Please make sure make run command compiles and executes the code against all input

files.\

7. Sample Makefile code for the output file names convention.

# Makefile for CUDA program

# Compiler and flags


NVCC = nvcc
CFLAGS = -O3

# Program name (replace with your program


file)PROGRAM = program.cu
OUTPUT = program

# Input and output files


INPUTS = indata50.txt indata80.txt indata100.txt indata200.txt indata500.txt
OUTPUTS = output50.txt output80.txt output100.txt output200.txt output500.txt

# Default
targetall: build

# Build the program


build:
$(NVCC) $(CFLAGS) $(PROGRAM) -o $(OUTPUT)

# Run the program with each input and output file


run: build
@echo "Running program with indata50.txt..."
./$(OUTPUT) indata50.txt output50.txt
@echo "Running program with indata80.txt..."
./$(OUTPUT) indata80.txt output80.txt
@echo "Running program with indata100.txt..."
./$(OUTPUT) indata100.txt output100.txt
@echo "Running program with indata200.txt..."
./$(OUTPUT) indata200.txt output200.txt
@echo "Running program with indata500.txt..."
./$(OUTPUT) indata500.txt output500.txt

# Clean the generated


filesclean:
rm -f $(OUTPUT) $(OUTPUTS)

You might also like