Skip to content
Open
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
times.csv
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SOURCE_FILES :=
ifeq ($(OS), Windows_NT)
SOURCE_FILES = $(shell find $(SOURCE_DIR) -name *.cpp -o -name *.cu)
else
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S), Linux)
SOURCE_FILES = $(shell find $(SOURCE_DIR) -name '*.cpp' -o -name '*.cu')
else
Expand All @@ -20,7 +21,7 @@ list_sources:

build:
mkdir -p ${BUILD_DIR}
nvcc -x cu ${SOURCE_FILES} --std=c++11 -lineinfo -o ${BUILD_DIR}/${EXEC_FILE} -Xcompiler -openmp
nvcc -x cu ${SOURCE_FILES} --std=c++11 -lineinfo -o ${BUILD_DIR}/${EXEC_FILE} -Xcompiler -fopenmp
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-fopenmp flag is throwing alot of warnings when building on Windows. Looks like compiler differences. -fopenmp is connected with gcc, windows nvcc command supports only cl.exe. It will be good to differentiate this flag based upon OS (like in SOURCE_FILE initialization).


run:
./${BUILD_DIR}/${EXEC_FILE} $(file) $(threads) $(blocks) -d $(device_id)
Expand Down