title: Ptx assembly aborted due to errors
body: <p>I have tried to write programm for multiply CSR matrix and vector on C/CUDA 5.5 in MS Visual Studio 2012, but faced with ptx error.
  Listing of my code:</p>
  
  <pre><code>__global__ void multKernelSymm(double* s, double* u, double* val, int* rowPtr, int* colInd)
      {
          int l = 0, jl, i;
          int idx = blockDim.x*blockIdx.x;
  
          l = rowPtr[idx] - 1;
          for ( i = 0; i &lt; (rowPtr[idx + 1] - rowPtr[idx]); i++){
              jl = colInd[l] - 1;
              s[idx] = s[idx] + val[l] * u[jl];
              l+=1;
          }
  
          l = 0;
          l = rowPtr[idx] - 1;
          for (int i = 0; i &lt; (rowPtr[idx + 1] - rowPtr[idx]); i++){
              jl = colInd[l] - 1;
              if(jl &gt; idx)
                  atomicAdd(&amp;s[jl], val[l] * u[idx]);
                  //s[jl] = s[jl] + val[l] * u[idx];
              l+=1;
          }
  
  
      }
  
      __device__ double atomicAdd(double* address, double val)
      {
           unsigned long long int* address_as_ull =
           (unsigned long long int*)address;
           unsigned long long int old = *address_as_ull, assumed;
           do {
              assumed = old;
              old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val + __longlong_as_double(assumed)));
           } while (assumed != old);
           return __longlong_as_double(old);
      }
  </code></pre>
  
  <p>This I get in VS:</p>
  
  <pre><code> C:\Users\Дмитрий\Documents\Visual Studio 2012\Projects\matrix mult simple\matrix mult simple&gt;"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2012 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64"  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\include"  -G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static  -g   -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd  " -o x64\Debug\kernel.cu.obj "C:\Users\Дмитрий\Documents\Visual Studio 2012\Projects\matrix mult simple\matrix mult simple\kernel.cu" 
  1&gt;  ptxas C:/Users/AACE~1/AppData/Local/Temp/tmpxft_00001b88_00000000-4_kernel.ptx, line 479; : fatal error : Parsing error near '-': syntax error
  1&gt;ptxas : fatal error : Ptx assembly aborted due to errors
  1&gt;  kernel.cu
  1&gt;C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 6.0.targets(597,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2012 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64"  -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\include"  -G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile -cudart static  -g   -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd  " -o x64\Debug\kernel.cu.obj "C:\Users\Дмитрий\Documents\Visual Studio 2012\Projects\matrix mult simple\matrix mult simple\kernel.cu"" exited with code -1.
  1&gt;
   &gt;     ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Ho I can fix it?</p>