Mercurial > hg > Members > Moririn
changeset 318:054c47e6ca20
add sleep to wait CUDA task (wrong)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 15 Feb 2017 16:45:10 +0900 |
parents | 51aa65676e37 |
children | a15511b1a6e0 |
files | src/parallel_execution/CUDAtwice.cbc src/parallel_execution/main.cbc |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/CUDAtwice.cbc Wed Feb 15 16:28:25 2017 +0900 +++ b/src/parallel_execution/CUDAtwice.cbc Wed Feb 15 16:45:10 2017 +0900 @@ -18,9 +18,11 @@ checkCudaErrors(cuMemAlloc(&devLoopCounter, sizeof(LoopCounter))); //twiceカーネルが定義されてなければそれをロードする +printf("CUdA Exe 2\n"); checkCudaErrors(cuModuleLoad(&context->module, "c/CUDAtwice.ptx")); +printf("CUdA Exe 3\n"); checkCudaErrors(cuModuleGetFunction(&context->function, context->module, "twice")); -printf("CUdA Exe 2\n"); +printf("CUdA Exe 4\n"); //入力のDataGearをGPUにbuffer経由で送る // Synchronous data transfer(host to device)
--- a/src/parallel_execution/main.cbc Wed Feb 15 16:28:25 2017 +0900 +++ b/src/parallel_execution/main.cbc Wed Feb 15 16:45:10 2017 +0900 @@ -1,6 +1,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <unistd.h> #include "../context.h" @@ -113,6 +114,9 @@ loopCounter->i = 0; taskManager->next = C_code1; +#ifdef USE_CUDAWorker +sleep(5); +#endif goto meta(context, taskManager->taskManager->TaskManager.shutdown); }