Unrecognized Function with GPU Computing
25 次查看(过去 30 天)
显示 更早的评论
Hello,
I have NVIDIA GeForce RTX 3060 Ti but, I cannnot select it use with my Matlab code. How can I troubleshoot this error?
1 个评论
Walter Roberson
2023-9-16
You probably need to reinstall the Parallel Computing Toolbox
If this is Windows, then check whether your anti-virus is blocking part of the installation.
回答(1 个)
Harsha Vardhan
2023-10-9
编辑:Harsha Vardhan
2023-10-10
Hi,
I understand that you are encountering an error while trying to use the 'gpuDevice' function in MATLAB to select the GPU available on your computer. The error message states that there is an 'Unrecognized function or variable parallel.internal.gpu.isLibraryLoaded'.
Generally, ‘Unrecognised function or variable’ error occurs when trying to use a function for which you are not licensed or that belongs to a MathWorks toolbox that isn’t installed, or the function is not available on the MATLAB search path.
For more details about this error, please check the following link - https://www.mathworks.com/help/matlab/matlab_prog/resolve-error-undefined-function-or-variable.html
To troubleshoot this issue, let's go through the following steps:
- Check Toolbox Installation: Please ensure that the Parallel Computing Toolbox is installed. You can verify this by executing the 'ver' function, which displays a list of all installed MathWorks products. If the toolbox is not listed, you may need to install it. Please refer to the following link to learn more about Installing License Manager -https://www.mathworks.com/help/install/ug/install-license-manager-on-license-server.html
- Confirm Toolbox License Activation: Open the 'Add-Ons' explorer in MATLAB and navigate to 'My Products' under the 'For You' section. This contains your licensed toolboxes. Kindly check if the Parallel Computing Toolbox is listed and labelled as "Installed" on the lower left side of the description. If it is not listed or labelled differently, it might indicate a licensing issue. Please make sure you have an active license for the toolbox.
This contains your licensed toolboxes. Kindly check if the Parallel Computing Toolbox is listed and labelled as "Installed" on the lower left side of the description. If it is not listed or labelled differently, it might indicate a licensing issue. Please make sure you have an active license for the toolbox.
3. Restore MATLAB Search Path: If you have confirmed that the toolbox is installed and licensed, the issue might be related to the MATLAB search path. To determine whether a file is on the search path, run ‘which filename’. If the file is on the search path, MATLAB returns the full path to the file. Execute the below command to check if the function is on the path.
which parallel.internal.gpu.isLibraryLoaded
If the above command does not return the path, please run the following commands in MATLAB to restore the default search path:
restoredefaultpath % This will remove any custom paths
rehash toolboxcache
savepath
After executing these commands, kindly restart MATLAB and try using the 'gpuDevice' function again. If the error persists, it is possible that the toolbox was not installed correctly. In that case, please consider reinstalling it.
4.Check for Conflicts: If the error appears even after the reinstallation of the toolbox, conflicts between MATLAB and other software or hardware on your system may have caused the issue. To rule out this possibility, you can try booting your computer in safe mode and then run MATLAB to see if the error still occurs.
Hope it helps in resolving your query!
Edit: As Walter suggested below, steps 1 and 2 may not be required since you could already execute 'gpuDeviceTable' function which is a part of the 'Parallel Computing Toolbox'.
1 个评论
Walter Roberson
2023-10-9
the gpu device list function would not have run if Parallel Computing Toolbox was not installed and licensed. If that command is on the path but the other one is not even though it is somehow installed, then Yes sometimes restoredefaultpath will work but more often this kind of situation requires reinstalling the toolbox
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!