Error: "The value cannot be empty. Parameter name: pSrcNativeVariant" in VS2010

when I want to debug a program using nsight, this message shows: "The value cannot be empty. Parameter name: pSrcNativeVariant". when I rebuild the project, this error is not shown. but I have to repeat this action for the debug program. previously this action is not required.

error message

this is my code:

#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <iostream> using namespace std; #define COLUMNS 3 #define ROWS 2 __global__ void add(int *a, int *b, int *c) { *a=345678; int x = blockIdx.x; int y = blockIdx.y; int i = (COLUMNS*y) + x; c[i] = a[i] + b[i]; } int main() { int a[ROWS][COLUMNS], b[ROWS][COLUMNS], c[ROWS][COLUMNS]; int *dev_a, *dev_b, *dev_c; int *x; int r; x=&r; cudaMalloc((void **) &dev_a, ROWS*COLUMNS*sizeof(int)); cudaMalloc((void **) &dev_b, ROWS*COLUMNS*sizeof(int)); cudaMalloc((void **) &dev_c, ROWS*COLUMNS*sizeof(int)); for (int y = 0; y < ROWS; y++) // Fill Arrays for (int x = 0; x < COLUMNS; x++) { a[y][x] = x; b[y][x] = y; } cudaMemcpy(dev_a, a, ROWS*COLUMNS*sizeof(int), cudaMemcpyHostToDevice); cudaMemcpy(dev_b, b, ROWS*COLUMNS*sizeof(int), cudaMemcpyHostToDevice); dim3 grid(COLUMNS,ROWS); add<<<grid,1>>>(dev_a, dev_b, dev_c); cudaMemcpy(c, dev_c, ROWS*COLUMNS*sizeof(int), cudaMemcpyDeviceToHost); for (int y = 0; y < ROWS; y++) // Output Arrays { for (int x = 0; x < COLUMNS; x++) { printf("[%d][%d]=%d ",y,x,c[y][x]); } printf("\n"); } return 0; } 
+4
source share
2 answers

I ran into the same problem. After trying a lot of things, I found that this problem can simply be solved by simply running the visual studio in administration mode once. In admin mode, run the nsight debugger, then the problem will be resolved. Admin mode is not required later. At least it works for me, good luck.

Added May 12, 2014: This problem recurs today. This time I solved it by switching the platform from Win32 to X64 and go back

Added May 22, 2014: This happens again, and everything I tried didn't work before. Finally, it is solved in this way:

I fixed this by deleting the visual studio custom solution options file (.suo).

Error repairing the NuGet package for the project. Other files: the value cannot be empty or empty. Parameter Name: root. 0 0

+2
source

This is a problem with the NuGet package. Decision:

  • Update it if it is outdated (reboot).
  • Uninstall and reinstall (restart).
  • Open the "Package Manager Console", which is located in the section "Package Manager / Package Manager / NuGet", enter any command to make sure that it works.

The problem must be resolved.

0
source

All Articles