diff --git a/Intro_Tutorial/lessons/02/README.md b/Intro_Tutorial/lessons/02/README.md index bbd7559..75420af 100644 --- a/Intro_Tutorial/lessons/02/README.md +++ b/Intro_Tutorial/lessons/02/README.md @@ -21,7 +21,8 @@ blt_add_executable( DEPENDS_ON ) ``` -Once you have added the dependencies, you can build and run the lesson as +Once you have added the dependencies, uncomment out the RAJA and Umpire header +includes in the source code. Then, you can build and run the lesson as before. As a reminder, open the VSCode terminal (Shift + ^ + `), and then move to the build directory: diff --git a/Intro_Tutorial/lessons/02/two.cpp b/Intro_Tutorial/lessons/02/two.cpp index 572679e..df13a78 100644 --- a/Intro_Tutorial/lessons/02/two.cpp +++ b/Intro_Tutorial/lessons/02/two.cpp @@ -1,7 +1,7 @@ #include -#include "RAJA/RAJA.hpp" -#include "umpire/Umpire.hpp" +//#include "RAJA/RAJA.hpp" +//#include "umpire/Umpire.hpp" int main() { diff --git a/Intro_Tutorial/lessons/05/five.cpp b/Intro_Tutorial/lessons/05/five.cpp index c3cab3c..eabb2e7 100644 --- a/Intro_Tutorial/lessons/05/five.cpp +++ b/Intro_Tutorial/lessons/05/five.cpp @@ -5,7 +5,7 @@ int main() { - constexpr int N{10000}; + constexpr int N{1000}; double* a{nullptr}; double* b{nullptr}; diff --git a/Intro_Tutorial/lessons/06/six.cpp b/Intro_Tutorial/lessons/06/six.cpp index 3e5ecb8..7c51ea6 100644 --- a/Intro_Tutorial/lessons/06/six.cpp +++ b/Intro_Tutorial/lessons/06/six.cpp @@ -3,11 +3,14 @@ #include "RAJA/RAJA.hpp" #include "umpire/Umpire.hpp" -#if defined(COMPILE) +//TODO: uncomment this out in order to build! +//#define COMPILE int main() { - constexpr int N{10000}; +#if defined(COMPILE) + + constexpr int N{1000}; //TODO: Set up a block size value constexpr std::size_t CUDA_BLOCK_SIZE{????}; double* a{nullptr}; diff --git a/Intro_Tutorial/lessons/07/seven.cpp b/Intro_Tutorial/lessons/07/seven.cpp index d18fe77..feba0ae 100644 --- a/Intro_Tutorial/lessons/07/seven.cpp +++ b/Intro_Tutorial/lessons/07/seven.cpp @@ -5,7 +5,7 @@ int main() { - constexpr int N{10000}; + constexpr int N{1000}; constexpr std::size_t CUDA_BLOCK_SIZE{256}; double* a{nullptr}; double* b{nullptr}; diff --git a/Intro_Tutorial/lessons/08/README.md b/Intro_Tutorial/lessons/08/README.md index 6138e15..e0d45be 100644 --- a/Intro_Tutorial/lessons/08/README.md +++ b/Intro_Tutorial/lessons/08/README.md @@ -21,7 +21,7 @@ To create a new memory pool allocator using the `QuickPool` strategy, we can use This newly created `pool` is an `umpire::Allocator` using the `QuickPool` strategy. As you can see above, we can use the `ResourceManager::makeAllocator` function to create the pool allocator. We just need to pass in: (1) the name we would like the pool to have, and (2) the allocator we previously created with the `ResourceManager` (see line 17 in the -file `eight.cpp`). +file `eight.cpp`). Remember that you will also need to include the `umpire/strategy/QuickPool.hpp` header file. There are other arguments that could be passed to the pool constructor if needed. These additional option arguments are a bit advanced and are beyond the scope of this tutorial. However, you can visit the documentation page for more: https://umpire.readthedocs.io/en/develop/doxygen/html/index.html diff --git a/Intro_Tutorial/lessons/08/eight.cpp b/Intro_Tutorial/lessons/08/eight.cpp index 5870b95..8e05c41 100644 --- a/Intro_Tutorial/lessons/08/eight.cpp +++ b/Intro_Tutorial/lessons/08/eight.cpp @@ -10,7 +10,7 @@ int main() { #if defined(COMPILE) - constexpr int N{10000}; + constexpr int N{1000}; constexpr std::size_t CUDA_BLOCK_SIZE{256}; double* a{nullptr}; double* b{nullptr}; diff --git a/Intro_Tutorial/lessons/09/nine.cpp b/Intro_Tutorial/lessons/09/nine.cpp index 7daf45b..eb23bc9 100644 --- a/Intro_Tutorial/lessons/09/nine.cpp +++ b/Intro_Tutorial/lessons/09/nine.cpp @@ -10,7 +10,7 @@ int main() { #if defined(COMPILE) - constexpr int N{10000}; + constexpr int N{1000}; double* a{nullptr}; double* b{nullptr}; double* c{nullptr}; diff --git a/Intro_Tutorial/lessons/10/ten.cpp b/Intro_Tutorial/lessons/10/ten.cpp index 4acc279..1dca49b 100644 --- a/Intro_Tutorial/lessons/10/ten.cpp +++ b/Intro_Tutorial/lessons/10/ten.cpp @@ -11,7 +11,7 @@ int main() #if defined(COMPILE) - constexpr int N{10000}; + constexpr int N{1000}; constexpr std::size_t CUDA_BLOCK_SIZE{256}; constexpr std::size_t DIM{2}; diff --git a/Intro_Tutorial/lessons/11/eleven.cpp b/Intro_Tutorial/lessons/11/eleven.cpp index bb2fa03..b9d3142 100644 --- a/Intro_Tutorial/lessons/11/eleven.cpp +++ b/Intro_Tutorial/lessons/11/eleven.cpp @@ -11,7 +11,7 @@ int main() { #if defined(COMPILE) - constexpr int N{10000}; + constexpr int N{1000}; double* a{nullptr}; double* b{nullptr}; double* c{nullptr}; diff --git a/Intro_Tutorial/lessons/12/twelve.cpp b/Intro_Tutorial/lessons/12/twelve.cpp index 629979b..decd10a 100644 --- a/Intro_Tutorial/lessons/12/twelve.cpp +++ b/Intro_Tutorial/lessons/12/twelve.cpp @@ -6,7 +6,7 @@ int main() { - constexpr int N{10000}; + constexpr int N{1000}; double* a{nullptr}; double* b{nullptr}; double* c{nullptr}; diff --git a/README.md b/README.md index 231c788..d894911 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ cmake -DENABLE_CUDA=On -DENABLE_OPENMP=Off -DCMAKE_CUDA_ARCHITECTURES=70 -DCMAKE ``` (Note: you need a cmake version greater than 3.19 and you need a more -recent gcc version which can handle c++14.) +recent gcc version which can handle c++14. For example, on the Lassen LC machine a cmake command like `cmake -DBLT_CXX_STD=c++14 -DCMAKE_CUDA_ARCHITECTURES=70 -DENABLE_CUDA=On -DCMAKE_CUDA_FLAGS="--expt-extended-lambda" ../` after loading appropriate cmake and gcc modules will work well.) # License