I have a workflow where I call
cuCtxCreate(&ctx, CU_CTX_BLOCKING_SYNC, device)
cuCtxPushCurrent(ctx2); // <== fails
The last push operation on the context received from cuCtxAttach returns an invalid context error. If I remove the context attach call, everything is ok, so that is the culprit. This is with CUDA 3.2 and driver version 275.33 and a GeForce gts450 card under Windows 7. With a different machine (laptop) running CUDA 4.0 with a Quadro nvs 140m and same driver version 275.33 everything works fine. My guess is that it is the difference in CUDA version.
Any idea what I’m doing wrong (I’m guessing that I’m missing something in the specification of cuCtxAttach).