Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radix_sort: failed to get memory buffer in get_good_channels line 51 #28

Closed
NoahDolev opened this issue Mar 13, 2019 · 14 comments · Fixed by #595
Closed

radix_sort: failed to get memory buffer in get_good_channels line 51 #28

NoahDolev opened this issue Mar 13, 2019 · 14 comments · Fixed by #595

Comments

@NoahDolev
Copy link

Hi,

For some reason, PreProccessSub fails (without error message) when calling get_good_channels. If I run the problematic lines of code from get_good_channels in the command window I can get to the final output:

found 4921 threshold crossings in 52.44 seconds of data 
found 0 bad channels 

but when I try to execute the function, I get the radix_sort error in the title.

Any ideas?

Thanks,
Noah

@marius10p
Copy link
Contributor

Hi,

That's the first time the GPU is called by a Matlab built-in function, so it probably has nothing to do with "get_good_channels". Can you run "gpuDevice" and what is the output? You need the parallel computing toolbox, and the CUDA version matched to your Matlab version. And probably relatively recent GPU drivers.

Thanks,
Marius

@NoahDolev
Copy link
Author

Hi Marius,

Thanks for getting back to me.

  CUDADevice with properties:

                      Name: 'GeForce GTX 1060 6GB'
                     Index: 1
         ComputeCapability: '6.1'
            SupportsDouble: 1
             DriverVersion: 10.1000
            ToolkitVersion: 9
        MaxThreadsPerBlock: 1024
          MaxShmemPerBlock: 49152
        MaxThreadBlockSize: [1024 1024 64]
               MaxGridSize: [2.1475e+09 65535 65535]
                 SIMDWidth: 32
               TotalMemory: 6.4425e+09
           AvailableMemory: 5.2236e+09
       MultiprocessorCount: 10
              ClockRateKHz: 1771500
               ComputeMode: 'Default'
      GPUOverlapsTransfers: 1
    KernelExecutionTimeout: 1
          CanMapHostMemory: 1
           DeviceSupported: 1
            DeviceSelected: 1

Here is the output.

Best,
Noah

@marius10p
Copy link
Contributor

Your driver version seems fine. What CUDA did you install?

What OS and Matlab version are you on?

@marius10p
Copy link
Contributor

Also, have you tried restarting Matlab and/or your computer? The GPU might be in a weird error state.

@NoahDolev
Copy link
Author

Windows 10. VS 2013. Cuda 9.0 .

@marius10p
Copy link
Contributor

And matlab version? Also see my other question above.

@NoahDolev
Copy link
Author

Hi Marius,

Thanks so much for your quick replies. Matlab 2018a. I have tried rebooting - the error is consistent. I'll try recompiling and see if that helps.

If all else fails, I'll just move to Linux.

Cheers,
Noah

@marius10p
Copy link
Contributor

Is this VS community 2013? The standard version is no longer supported by Matlab. Wouldn't hurt to check mex -setup c++.

@NoahDolev
Copy link
Author

It's Visual Studio Community.

I chose 2013 based on your documentation. Should I try another CUDA/VS combination?

@marius10p
Copy link
Contributor

Community 2013 should have worked, that's the setup we use, on Windows. What is the output of mex -setup c++ ?

@NoahDolev
Copy link
Author

MEX configured to use 'Microsoft Visual C++ 2013' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
	 variables with more than 2^32-1 elements. You will be required
	 to update your code to utilize the new API.
	 You can find more information about this at:
	 https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.

@marius10p
Copy link
Contributor

Mine is the same. Have you run it in the GUI to check that the data loading configuration is ok?

Also, if you set ops.minfr_goodchannels = 0 so it doesn't run that script, do you get the same error later on?

@NoahDolev
Copy link
Author

Hi Marius,

I am able now to get past this point. I next get stuck because I get an "undefined function" when I try to call the compiled Mex function mexThSpkPC.mexw64 . From what I can find online, this seems to be due to a change introduced in Matlab (at some point). See https://www.mathworks.com/matlabcentral/answers/76958-error-message-mex-file-matlab

WDYT?

Best,
Noah

@NoahDolev
Copy link
Author

Hi,

Recompiling solved this. Thanks!

Best,
Noah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants