Sharing an OpenCL device between two MPI ranks fails. The launch below will result in a crash:
gmx mdrun -ntmpi 2 -gpu_id 00
The main change required for this configuration to work is moving context and program fields outside of gmx_device_info_t. They could be stored instead in gmx_nbnxn_ocl_t.