Dependencies: Bayes Beagle OpenMPI OpenCl SDK CUDA

I recently obtained a computer with a Kepler K40 GPU that I want to use for parallelizing Bayesian chains. I cannot get it to work since I get lost in the chain of dependencies. MrBayes will depend on Beagle for the parallelization of the likelihood calculation. Beagle depends on Open MPI. Then it is recommended to install OpenCL. In the readme of OpenCL they claim I need to de- and reinstall SDK. Googling for SDK I end up at CUDA. Nevertheless I get the idea it is still an in between. I think the order is


and parallel to that


Is that correct? Than is there any specific way to install all this? Certain packages automatically install other (even downstream) programs. Is there any specificity in the packages in terms of OS?