Use the parameter ${__P(InstanceID)}. Each JMeterEngine uses a distinct parameter ${__P(InstanceID)}. Please note that the "InstanceID" values start from 1 for the JMeterEngines. The value of "InstanceID" for the JMeter console is 0.
See this FAQ for more information.
