[问题] 新手CUDA与Optix建置问题

楼主: micrometer (微米)   2015-12-23 15:49:03
开发平台(Platform): (Ex: VC++, GCC, Linux, ...)
VS2012
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
CUDA6.5、Optix3.9.0
问题(Question):
我的最终目的要使用Optix做ray tracing并透过cuda加速,
目前打算先使用Optix里的SDK sample1做测试,但不知道是不是cuda、optix版本相容问题
用Cmake建好的专案,run的时候会告诉我invalid context(程式码会附在下面),
google有人发生类似的问题,他们是把cuda更新到6.0版本就没问题(但我的是最新版本囧)
想请问有没有人对cuda、optix熟,可以帮我解这个超新手问题><
喂入的资料(Input):
command line: (在exe所在资料夹下) sample1.exe -f a.jpg
预期的正确结果(Expected Output):
看教学应该是会输出一张jpg档
错误结果(Wrong Output):
error讯息: OptiX Error: Invalid context
程式码(Code):(请善用置底文网页, 记得排版)
sample1.c
#include <optix.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sutil.h>
void printUsageAndExit( const char* argv0 );
int main(int argc, char* argv[])
{
/* Primary RTAPI objects */
RTcontext context;
RTprogram ray_gen_program;
RTbuffer buffer;
/* Parameters */
RTvariable result_buffer;
RTvariable draw_color;
char path_to_ptx[512];
char outfile[512];
unsigned int width = 512u;
unsigned int height = 384u;
int i;
int use_glut = 1;
outfile[0] = '\0';
/* If "
楼主: micrometer (微米)   2015-12-23 16:54:00
自己的问题自己回XD 应该是Optix3.9版本太新改装3.7版本就成功了,可能刚出一周bug还没修掉(吧?

Links booklink

Contact Us: admin [ a t ] ucptt.com