If Radeon and Nvidia GPUs exist at the same time
This is somewhat hypothetical since I’ve not seen a system which was configured to have both installed. We’ve tried here in the past, but the drivers couldn’t be co-installed.
But the ordering should be per device type and why the “acc_set_device_num” needs both the number and the device type. So there could be two device 0’s, but one of each type.
Do you have a system with such a configuration? If so, can you post the output from “pgaccelinfo”? This will list all the available devices as well as the device numbers.
Note if you don’t call “acc_set_device_num”, then the default device will be used. The default in this case would be the NVIDIA device 0.