HI Solomon K,
Thanks a lot for your reply. Yes I do see that my two GPUs have the same physical ID, and this is exactly where I am confused about. Why are they assigned the same ID?
The output from your code is following:


Screenshot from 2017-08-21 17-44-48.png1334×222 49.4 KB

Sorry the part of your code that run commandline commands does not work and I have not figure our how to make it work, so I just run them separately. You can see, it seems nvidia labels them differently, but lshw labels them as having the same ID. What could be wrong in this case?
Thanks,
Shuokai