*/
if (ngpu > 0)
{
+ if (hw_opt.nthreads_omp > 0)
+ {
+ /* In this case it is unclear if we should use 1 rank per GPU
+ * or more or less, so we require also setting the number of ranks.
+ */
+ gmx_fatal(FARGS, "When using GPUs, setting the number of OpenMP threads without specifying the number of ranks can lead to conflicting demands. Please specify the number of thread-MPI ranks as well (option -ntmpi).");
+ }
+
nrank = ngpu;
/* When the user sets nthreads_omp, we can end up oversubscribing CPU cores