why the command coder.checkGpuInstall(envCfg) failed in a CPU worker
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mikaël LE GRAND
el 14 de Oct. de 2020
Respondida: Mikaël LE GRAND
el 15 de Oct. de 2020
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
0 comentarios
Respuesta aceptada
Más respuestas (3)
Raymond Norris
el 15 de Oct. de 2020
Hi Mikaël,
MATLAB Coder and GPU Coder can be used by workers in interactive sessions (i.e. parpool). See more about what other products require interactive parpool sessions
as well as products not eligible to run in workers
Thanks,
Raymond
0 comentarios
Mikaël LE GRAND
el 15 de Oct. de 2020
Editada: Mikaël LE GRAND
el 15 de Oct. de 2020
1 comentario
Raymond Norris
el 15 de Oct. de 2020
Hi Mikaël,
There's a slight confusion. You either run an interactive parallel job (parpool) or a non-interactive parallel job (batch). Now that you have a parallel pool running, you can run your code in a spmd block. For instance
parpool('GPUclusterTest', 1);
spmd
[envCfg, results, results1] = gpuDeviceInWorker()
end
This will run gpuDeviceInWorker on the single worker running in the pool on your cluster.
Raymond
Ver también
Categorías
Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!