GPU_DEVICE_ORDINAL environmental parameter can be used to mask the visiblity of the GPUs seen by the OpenCL application in a multi-GPU setup.
AMD OpenCL Programming User Guide says:
Masking Visible Devices:
By default, OpenCL applications are exposed to all GPUs installed in the system; this allows applications to use multiple GPUs to run the compute task.
In some cases, the user might want to mask the visibility of the GPUs seen by the OpenCL application. One example is to dedicate one GPU for regular graphics operations and the other three (in a four-GPU system) for Compute. To do that, set the GPU_DEVICE_ORDINAL environment parameter, which is a comma-separated list variable:
• Under Windows: set GPU_DEVICE_ORDINAL=1,2,3
• Under Linux: export GPU_DEVICE_ORDINAL=1,2,3
Another example is a system with eight GPUs, where two distinct OpenCL applications are running at the same time. The administrator might want to set GPU_DEVICE_ORDINAL to 0,1,2,3 for the first application, and 4,5,6,7 for the second application; thus, partitioning the available GPUs so that both applications can run at the same time.
This works fine when all GPUs are healthy. OpenCL / clinfo see only the enumerated GPUs.
In my case with a failing GPU, the display still hangs just as X starts. The last line in Xorg.0.log shows fglrx enumerating the faulty GPU (no. 5) but the computer runs fine and I can log in from another machine. Case 2. If I tell the kernel to 'remove' (ignore) GPU5's fglrx PCI device (PCI:0b:00.0), fglrx still enumerates GPU5 but X runs fine! However in this case, clinfo seg faults.
It may work if fglrx / xorg.conf also had a way to completely skip a PCI display device without killing it in Linux. I tried a few options including Option "Ignore" = "true" in the device section without success.
Since GPU_DEVICE_ORDINAL answers the original question, I marked this as the correct answer. If I find a work around for the bad GPU I'll come back and post it here.
Many thanks for the answer, its a useful option to know about.