Problem with Installing Tesla K40C on HP Proliant DL580 G7 with Debian 7 (AMD64)

Hello,

I have an HP Proliant DL580 G7 server running Debian 7 (kernel 3.2.0-4-amd64). This machine has an embedded card, namely ATI ES1000. I installed a Tesla K40C and a Quadro K5000 and on it. Next, I downloaded the Tesla K40C driver from NVIDIA website (NVIDIA-Linux-x86_64-319.82.run) and installed it. I added two cards in /etc/X11/xorg.conf with proper BusIDs which were found through lspci -nn|grep -i nvidia:

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro Tesla K40C"
    BusID          "PCI:11:0:0"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro K5000"
    BusID          "PCI:135:0:0"
EndSection

Running nvidia-smi -a returns the following error:

NVIDIA: could not open the device file /dev/nvidia0 (Input/output error).
Unable to determine the device handle for GPU 0000:0B:00.0: Unknown Error

I checked Xorg.0.log. It seems that Quadro K5000 is detected properly, whereas Tesla K40C has not been identified. Here is the result of grep EE Xorg.0.log:

(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  9528.994] (II) Loading extension MIT-SCREEN-SAVER
[  9531.693] (EE) NVIDIA(GPU-1): Failed to initialize the NVIDIA GPU at PCI:11:0:0.  Please
[  9531.693] (EE) NVIDIA(GPU-1):     check your system's kernel log for additional error
[  9531.693] (EE) NVIDIA(GPU-1):     messages and refer to Chapter 8: Common Problems in the
[  9531.693] (EE) NVIDIA(GPU-1):     README for additional information.
[  9531.693] (EE) NVIDIA(GPU-1): Failed to initialize the NVIDIA graphics device!
[  9532.040] (II) XINPUT: Adding extended input device "HP  Virtual Keyboard " (type: TOUCHSCREEN, id 8)

I checked /var/log/kern.log and found the following errors there:

Feb 14 19:04:59 sahand kernel: [10782.893918] NVRM: RmInitAdapter failed! (0x26:0xffffffff:1170)
Feb 14 19:04:59 sahand kernel: [10782.893941] NVRM: rm_init_adapter(0) failed

The log file of nvidia-bug-report.sh is attached.

Any help is appreciated.
nvidia-bug-report.log.gz (53.5 KB)

I swapped the K40 and K5000 and the problem vanished! Pretty strange…