From 53d6eeb98b51348fb07f77d0666d2287f507e5b6 Mon Sep 17 00:00:00 2001 From: Nikolai Tasev Date: Fri, 2 Jun 2017 14:56:05 +0300 Subject: [PATCH 1/5] The explicit selection of clang compiler should be only on UNIX. When compiling on Windows with MSVC this option breaks the compilation. Maybe this selection should be removed altogether and let the user select its compiler when needed. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 996cb1c3..0ad5f1e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,6 @@ if(CUDA_FOUND) # to make sure more people can easily run class code without knowing # about this compiler argument set(CUDA_NVCC_FLAGS " - -ccbin /usr/bin/clang; -gencode;arch=compute_30,code=sm_30; -gencode;arch=compute_35,code=sm_35; -gencode;arch=compute_35,code=compute_35; @@ -32,6 +31,7 @@ if(CUDA_FOUND) # add -Wextra compiler flag for gcc compilations if (UNIX) + set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-ccbin /usr/bin/clang") set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler -Wextra") set(CMAKE_CXX_FLAGS "-stdlib=libstdc++") endif (UNIX) From 619c7f969418dca998807593096ad8eeded5c34b Mon Sep 17 00:00:00 2001 From: Nikolai Tasev Date: Fri, 2 Jun 2017 14:57:48 +0300 Subject: [PATCH 2/5] Update the paths to the Problem Sets --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ad5f1e3..068f440a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,12 +39,12 @@ if(CUDA_FOUND) # add debugging to CUDA NVCC flags. For NVidia's NSight tools. set(CUDA_NVCC_FLAGS_DEBUG ${CUDA_NVCC_FLAGS_DEBUG} "-G") - add_subdirectory (HW1) - add_subdirectory (HW2) - add_subdirectory (HW3) - add_subdirectory (HW4) - add_subdirectory (HW5) - add_subdirectory (HW6) + add_subdirectory ("Problem Sets/Problem Set 1") + add_subdirectory ("Problem Sets/Problem Set 2") + add_subdirectory ("Problem Sets/Problem Set 3") + add_subdirectory ("Problem Sets/Problem Set 4") + add_subdirectory ("Problem Sets/Problem Set 5") + add_subdirectory ("Problem Sets/Problem Set 6") else(CUDA_FOUND) message("CUDA is not installed on this system.") endif() From 82e384222d3a1fcdba061c855b9201c94995976b Mon Sep 17 00:00:00 2001 From: Nikolai Tasev Date: Mon, 5 Jun 2017 17:47:29 +0300 Subject: [PATCH 3/5] Add missing header includes --- Problem Sets/Problem Set 1/utils.h | 1 + Problem Sets/Problem Set 3/utils.h | 1 + Problem Sets/Problem Set 4/utils.h | 1 + Problem Sets/Problem Set 5/main.cu | 1 + Problem Sets/Problem Set 5/utils.h | 1 + Problem Sets/Problem Set 6/utils.h | 1 + 6 files changed, 6 insertions(+) diff --git a/Problem Sets/Problem Set 1/utils.h b/Problem Sets/Problem Set 1/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 1/utils.h +++ b/Problem Sets/Problem Set 1/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 3/utils.h b/Problem Sets/Problem Set 3/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 3/utils.h +++ b/Problem Sets/Problem Set 3/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 4/utils.h b/Problem Sets/Problem Set 4/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 4/utils.h +++ b/Problem Sets/Problem Set 4/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 5/main.cu b/Problem Sets/Problem Set 5/main.cu index 15071cd4..c5dcd15a 100755 --- a/Problem Sets/Problem Set 5/main.cu +++ b/Problem Sets/Problem Set 5/main.cu @@ -5,6 +5,7 @@ #include "utils.h" #include "timer.h" #include +#include #if defined(_WIN16) || defined(_WIN32) || defined(_WIN64) #include #else diff --git a/Problem Sets/Problem Set 5/utils.h b/Problem Sets/Problem Set 5/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 5/utils.h +++ b/Problem Sets/Problem Set 5/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) diff --git a/Problem Sets/Problem Set 6/utils.h b/Problem Sets/Problem Set 6/utils.h index 35f954cb..7485a3da 100755 --- a/Problem Sets/Problem Set 6/utils.h +++ b/Problem Sets/Problem Set 6/utils.h @@ -8,6 +8,7 @@ #include #include #include +#include #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) From 7c57e76fe9fe6abc62df24ad91d8628ada089a2e Mon Sep 17 00:00:00 2001 From: Nikolai Tasev Date: Mon, 5 Jun 2017 17:53:13 +0300 Subject: [PATCH 4/5] Removed discarded compute versions --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 068f440a..5cf10216 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,10 +24,7 @@ if(CUDA_FOUND) -gencode;arch=compute_30,code=sm_30; -gencode;arch=compute_35,code=sm_35; -gencode;arch=compute_35,code=compute_35; - -gencode;arch=compute_20,code=sm_20; - -gencode;arch=compute_11,code=sm_11; - -gencode;arch=compute_12,code=sm_12; - -gencode;arch=compute_13,code=sm_13;") + -gencode;arch=compute_20,code=sm_20;") # add -Wextra compiler flag for gcc compilations if (UNIX) From 1e57dee38f56afa4a3893b66bf52044f7af24015 Mon Sep 17 00:00:00 2001 From: Nikolai Tasev Date: Mon, 5 Jun 2017 17:55:01 +0300 Subject: [PATCH 5/5] normal_distribution is in a new namespace --- Problem Sets/Problem Set 5/main.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Problem Sets/Problem Set 5/main.cu b/Problem Sets/Problem Set 5/main.cu index c5dcd15a..18451f36 100755 --- a/Problem Sets/Problem Set 5/main.cu +++ b/Problem Sets/Problem Set 5/main.cu @@ -52,7 +52,7 @@ int main(void) thrust::minstd_rand rng; - thrust::random::experimental::normal_distribution normalDist((float)mean, stddev); + thrust::random::normal_distribution normalDist((float)mean, stddev); // Generate the random values for (size_t i = 0; i < numElems; ++i) {