diff options
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 9 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 12d3aac..bc7ad38 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -464,6 +464,10 @@ static int get_app_cuda_version() { " | grep libcudart.so | sed 's/.*libcudart.so.\\(.*\\) =>.*/\\1/' > " + fname; int res = system(app_cuda_version_command.c_str()); + if(res == -1){ + printf("Error - Cannot detect the app's CUDA version.\n"); + exit(1); + } FILE *cmd = fopen(fname, "r"); char buf[256]; while (fgets(buf, sizeof(buf), cmd) != 0) { @@ -3235,6 +3239,11 @@ char *readfile(const std::string filename) { // allocate and copy the entire ptx char *ret = (char *)malloc((filesize + 1) * sizeof(char)); int num = fread(ret, 1, filesize, fp); + if(num == 0){ + std::cout << "ERROR: Could not read data from file %s\n" + << filename << std::endl; + assert(0); + } ret[filesize] = '\0'; fclose(fp); return ret; diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index f756aec..79be857 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -481,7 +481,7 @@ shader_core_ctx::shader_core_ctx(class gpgpu_sim *gpu, m_config = config; m_memory_config = mem_config; m_stats = stats; - unsigned warp_size = config->warp_size; + // unsigned warp_size = config->warp_size; Issue_Prio = 0; m_sid = shader_id; |
