Host Thread Affinity using OpenMP Bind GPUs to particular thread

Hello all,

I want to bind host threads using OpenMP, in other words I want to bind GPUs to particular cores in a SMP machine with two multicore processors each having 2 cores.

export GOMP_CPU_AFFINITY=“0-4”

I want to bind first 2 threads on the first multicore processor and rest of 2 to the other, will the above command do what I want.