Improvements to samples

This commit is contained in:
jpekkila
2020-04-07 17:58:47 +03:00
parent 427a3ac5d8
commit fb41741d74
5 changed files with 79 additions and 23 deletions

View File

@@ -5,5 +5,5 @@ find_package(OpenMP)
find_package(CUDAToolkit)
add_executable(bwtest main.c)
add_compile_options(-O3)
target_link_libraries(bwtest MPI::MPI_C OpenMP::OpenMP_C CUDA::cudart_static)
target_compile_options(bwtest PRIVATE -O3)

View File

@@ -303,6 +303,7 @@ main(void)
PRINT("Block size: %u MiB\n", BLOCK_SIZE / (1024 * 1024));
#if 0
{
uint8_t* src = allocHost(BLOCK_SIZE);
uint8_t* dst = allocHost(BLOCK_SIZE);
@@ -362,7 +363,7 @@ main(void)
freeDevice(dst);
}
PRINT("\n------------------------\n");
/*
#else
{ // Final run for easy identification with the profiler
uint8_t* src = allocDevice(BLOCK_SIZE);
uint8_t* dst = allocDevice(BLOCK_SIZE);
@@ -373,7 +374,7 @@ main(void)
freeDevice(src);
freeDevice(dst);
}
*/
#endif
MPI_Finalize();
return EXIT_SUCCESS;