Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Exception: ErrorCompilation: Compilation error.
  2. Test(1): catastrophic error: cannot open source file "curand.h"
  3.  
  4. 1 catastrophic error detected in the compilation of "Test".
  5. Compilation terminated.
  6.  
  7. Exception: ErrorCompilation: Compilation error.
  8. C:Program FilesNVIDIA GPU Computing ToolkitCUDAv10.0includecurand.h(59): catastrophic error: cannot open source file "cuda_runtime.h"
  9.  
  10. static void Main(string[] args)
  11. {
  12. var rtc = new CudaRuntimeCompiler(GetKernel(), "Test");
  13.  
  14. string[] compileArgs = new string[0];
  15.  
  16. try
  17. {
  18. rtc.Compile(compileArgs);
  19. }
  20. catch (Exception e)
  21. {
  22. string log = rtc.GetLogAsString();
  23. Console.WriteLine($"Exception: {e.Message}");
  24. Console.WriteLine(log);
  25. Console.ReadKey();
  26. }
  27.  
  28. rtc.Dispose();
  29. }
  30.  
  31. static string GetKernel()
  32. {
  33. return File.ReadAllText("Kernel.c");
  34. }
  35.  
  36. #include <curand.h>
  37.  
  38. extern "C"
  39. {
  40. __global__ void DoNothing()
  41. {
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement