PhysiX를 사용하여 유체 시뮬레이터를 구현 중입니다. 불행히도 sth는 cuda 컨텍스트 관리자에게 잘못되어 있으며 무엇인지 인식하는 데 문제가 있습니다. 나는 mCudaContextManger이 제대로 생성되지 않습니다 것을 occures 내 응용 프로그램을 실행하려고하면create cuda context manager failed
void InitializePhysX() {
bool recordMemoryAllocations = true;
const bool useCustomTrackingAllocator = true;
PxAllocatorCallback* allocator = &gDefaultAllocatorCallback;
PxErrorCallback* error = &gDefaultErrorCallback;
PxFoundation* mFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, *allocator, *error);
if(!mFoundation)
printf("PxCreateFoundation failed!\n");
PxProfileZoneManager* mProfileZoneManager = &PxProfileZoneManager::createProfileZoneManager(mFoundation);
if(!mProfileZoneManager)
printf("PxProfileZoneManager::createProfileZoneManager failed!\n");
#ifdef PX_WINDOWS
pxtask::CudaContextManagerDesc cudaContextManagerDesc;
pxtask::CudaContextManager* mCudaContextManager = pxtask::createCudaContextManager(*mFoundation, cudaContextManagerDesc, mProfileZoneManager);
if(mCudaContextManager){
if(!mCudaContextManager->contextIsValid()){
mCudaContextManager->release();
mCudaContextManager = NULL;
printf("invalid context\n");
}
} else {
printf("create cuda context manager failed\n");
}
#endif
mPhysX = PxCreatePhysics(PX_PHYSICS_VERSION, *mFoundation, PxTolerancesScale(), recordMemoryAllocations, mProfileZoneManager);
if(!mPhysX)
printf("PxCreatePhysics failed!\n");
...
}
:이처럼 보이는 init 메소드가 있습니다. "cuda 컨텍스트 관리자를 만들지 못했습니다."가 콘솔에 쓰여지고 :
".... \ LowLevel \ software \ src \ PxsContext.cpp (1122) : 경고 : GPU 작동이 중단됨 px :: CudaContextManager를 사용할 수 없음 . .... \ SimulationController \ src \ particles \ ScParticleSystemSim.cpp (73) : 경고 : GPU 입자 시스템 생성에 실패했습니다. CPU 구현으로 폴백합니다. "
최신 드라이버가있는 GeForce560Ti가 있습니다 (오류는 내 친구의 노트북에서 GeForce460에도 나타납니다). Physix는 NVidia Control Panel에서 GPU를 사용하도록 설정되어 있습니다.
우리가 잘못한 점과 GPU를 만드는 방법을 아는 사람이 있습니까? 미리 감사드립니다!