I work with MATLAB R2020a, windows 10, P2000 Nvidia card. This code work properly launched from the command window :
function [envCfg, results, results1] = gpuDeviceInWorker()
envCfg = coder.gpuEnvConfig('host');
envCfg.BasicCodegen = 1;
envCfg.BasicCodeexec = 1;
envCfg.DeepCodegen = 0;
envCfg.DeepCodeexec = 0;
envCfg.Quiet = 1;
license checkout GPU_Coder
test = ans;
license checkout Matlab_Coder
test = test + ans;
try
results1 = test;
results = coder.checkGpuInstall(envCfg);
catch ME
results = ME;
end
end
This results :
[envCfg, results, results1] = gpuDeviceInWorker
ans =
1
ans =
1
envCfg =
gpuEnvConfig with properties:
Hardware: 'host'
GpuId: 0
BasicCodegen: 1
BasicCodeexec: 1
DeepCodegen: 0
DeepCodeexec: 0
DeepLibTarget: ''
DataType: ''
GenReport: 0
Quiet: 1
CudaPath: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2'
CudnnPath: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\cuda'
Profiling: 0
NvtxPath: 'C:\Program Files\NVIDIA Corporation\NvToolsExt\'
TensorrtPath: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\TensorRT-5.1.5.0'
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 0
tensorrt: 0
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
deepcodeexec: 0
tensorrtdatatype: 0
profiling: 0
results1 =
2
But when i try to do :
c = parcluster('GPUclusterTest')
c =
Local Cluster
Properties:
Profile: GPUclusterTest
Modified: false
Host: B496915E0F22
NumWorkers: 24
NumThreads: 1
JobStorageLocation: C:\Users\adm.mle_grand\AppData\Roaming\MathWorks\MATLAB\local_cluster_jobs\R2020a
RequiresOnlineLicensing: false
Associated Jobs:
Number Pending: 0
Number Queued: 0
Number Running: 0
Number Finished: 0
then :
job = batch(c,@gpuDeviceInWorker,3)
job =
Job
Properties:
ID: 67
Type: independent
Username: adm.mle_grand
State: running
SubmitDateTime: 14-Oct-2020 14:27:16
StartDateTime:
Running Duration: 0 days 0h 0m 0s
NumThreads: 1
AutoAttachFiles: true
Auto Attached Files: List files
AttachedFiles: D:\Matlab\GPU\Benchmark_Mandelbrot
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\cuda
AutoAddClientPath: true
AdditionalPaths: 18 paths
Associated Tasks:
Number Pending: 1
Number Running: 0
Number Finished: 0
Task ID of Errors: []
Task ID of Warnings: []
wait(job)
results = fetchOutputs(job)
results =
1×3 cell array
{1×1 coder.gpuEnvConfig} {1×1 MException} {[0]}
results{2}
ans =
MException with properties:
identifier: 'gpucoder:system:gpu_sys_check'
message: 'One or more of the system checks did not pass, with the following errors ...↵Basic Code Generation: (Test GPU code generation failed with the error 'emlc:compilationError'. View report for further information: View report)'
cause: {}
stack: [10×1 struct]
Correction: []
When i click on "view report", i have this answer :
There is no access to GPU Coder and MATLAB Coder licences from the job in the worker.
Did someone have an idea to solve this problem ?
Thanks