From 07b1e93f19bef20a9e35fcfc48b091fa36d56d1b Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Fri, 5 Jun 2015 14:49:14 -0700 Subject: Fixing bug with max cycle/instruction/cta + bug with C++ name de-mangling with spaces (e.g., using templates) --- src/gpgpusim_entrypoint.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/gpgpusim_entrypoint.cc') diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc index 28f909b..6ba38eb 100644 --- a/src/gpgpusim_entrypoint.cc +++ b/src/gpgpusim_entrypoint.cc @@ -96,10 +96,10 @@ void *gpgpu_sim_thread_concurrent(void*) { // concurrent kernel execution simulation thread do { - if(g_debug_execution >= 3) { - printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n"); - fflush(stdout); - } + if(g_debug_execution >= 3) { + printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n"); + fflush(stdout); + } while( g_stream_manager->empty_protected() && !g_sim_done ) ; if(g_debug_execution >= 3) { @@ -131,7 +131,13 @@ void *gpgpu_sim_thread_concurrent(void*) g_the_gpu->cycle(); sim_cycles = true; g_the_gpu->deadlock_check(); + }else { + if(g_the_gpu->cycle_insn_cta_max_hit()){ + g_stream_manager->stop_all_running_kernels(); + g_sim_done = true; + } } + active=g_the_gpu->active() || !g_stream_manager->empty_protected(); } while( active ); if(g_debug_execution >= 3) { -- cgit v1.3