Optimizing 2 gpu use with PTB

Similar to another unresolved issue on here; I’m experiencing trouble with some of the PTB demos which doesn’t bode well for the experiments we have lined up at the lab.

After running demos such as TotallyMinimalDemo;
I’m left with an all-black screen I cannot escape from.

I have a setup with 2-GPUS on one monitor (using Linux). The graphics cards are both the same, but we hope to have individual use for both.

I was wondering why this issue was arising- and how I can optimally go through the tutorials without facing a graphics issue.

If it’s any help, here’s the output regarding my gpuDevice info:

Lab 1:

ans =

CUDADevice with properties:

                    Name: 'Quadro P620'
                   Index: 1
       ComputeCapability: '6.1'
          SupportsDouble: 1
           DriverVersion: 10.1000
          ToolkitVersion: 10.1000
      MaxThreadsPerBlock: 1024
        MaxShmemPerBlock: 49152
      MaxThreadBlockSize: [1024 1024 64]
             MaxGridSize: [2.1475e+09 65535 65535]
               SIMDWidth: 32
             TotalMemory: 2.0886e+09
         AvailableMemory: 1.6874e+09
     MultiprocessorCount: 4
            ClockRateKHz: 1354000
             ComputeMode: 'Default'
    GPUOverlapsTransfers: 1
  KernelExecutionTimeout: 1
        CanMapHostMemory: 1
         DeviceSupported: 1
          DeviceSelected: 1

Lab 2:

ans =

CUDADevice with properties:

                    Name: 'Quadro P620'
                   Index: 2
       ComputeCapability: '6.1'
          SupportsDouble: 1
           DriverVersion: 10.1000
          ToolkitVersion: 10.1000
      MaxThreadsPerBlock: 1024
        MaxShmemPerBlock: 49152
      MaxThreadBlockSize: [1024 1024 64]
             MaxGridSize: [2.1475e+09 65535 65535]
               SIMDWidth: 32
             TotalMemory: 2.0975e+09
         AvailableMemory: 1.8144e+09
     MultiprocessorCount: 4
            ClockRateKHz: 1354000
             ComputeMode: 'Default'
    GPUOverlapsTransfers: 1
  KernelExecutionTimeout: 0
        CanMapHostMemory: 1
         DeviceSupported: 1
          DeviceSelected: 1

Ok, please rephrase your message and give more details about your setup. I don’t understand, e.g., the description “Two gpu’s on one monitor”.

In general NVidia gpu’s are not recommended for optimal plug & play use on Linux, so if something doesn’t work, i can’t help you much. AMD and Intel provide gpu’s with high quality open-source drivers.

I have 2 separate nvidia gpu’s installed on the same computer, hooked up to one monitor.

They both are p620 quadro series gpu’s with nvidia-410 drivers installed.

My issue is that I’ve been having trouble running many of the PTB demos; often being left with an inescapable black screen after commands such as:

% Clear the workspace and the screen
sca;
close all;
clearvars;
% Here we call some default settings for setting up Psychtoolbox
PsychDefaultSetup(2);
% Get the screen numbers
screens = Screen(‘Screens’);
% Draw to the external screen if avaliable
screenNumber = max(screens);
% Define black and white
white = WhiteIndex(screenNumber);
black = BlackIndex(screenNumber);
grey = white / 2;
inc = white - grey;
% Open an on screen window
[window, windowRect] = PsychImaging(‘OpenWindow’, screenNumber, grey);

This command line is usually where I receive the most trouble.
I’m running Linux of an i7 Dell.

Would restoring a Windows OS be the best option to continue with PTB?

Asham A.

Why do you need 2 gpu’s connected to one monitor?

NVidia gpu’s are generally not recommended for optimal use with PTB. There’s little i could do to help in case of trouble, like here. You could switch to the nouveau open-source driver, but then performance would tank with this modern NVidia gpu.

Is it set up in some SLI configuration? If so, that might be some cause for the problem. I never got to test it, but my assumption was that that would rather hurt than help with PTB. Also PTB is not prepared to deal with multi-gpu setups, unless they are certain types of dual-gpu hybrid graphics laptops. Maybe full log output of PTB at Screen verbosity 10 would help, e.g., using the “diary on” command to capture it into a diary.txt file. Or using PsychDebugWindowConfiguration to see something apart from black. Also maybe the XOrg.0.log file and any custom xorg.conf file if any.