After I successfully called “cudaSetDevice( 0 )”, I called “cuLinkCreate( 6, options, values, &linkState )”.
Then I got the error string " context is destroyed ".
I’m not very clear about the management of contexts by cud runtime. When I call cudaSetDevice, a context will be created. But when will the context be destroyed? Are the runtime API and the driver API using the same context stack?
As the fallowing call order:
cudaSetDevice( 0 );
cudaSetDevice( 1 );
cudaSetDevice( 0 );
The first will create a context. When the second is called, will the first context will be destroyed? And when the third is called, will another context bind to device 0 be created?