call python from matlab using the system function on a GPU cluster - getting error "NVIDIA: no NVIDIA devices found" even though a job was requested in linux terminal and it works fines when executed in linux terminal...

10 ビュー (過去 30 日間)
I'm running everything on a Unix based HPC cluster. I basically submit to start a job for GPU access. Launch matlab and run my program.
My program calls python using the matlab system function. Within the python program, my code is setup to use the GPU system. However, the return from the MATLAB system function is that there are no NVIDIA devices found. When I run the piece of code calling for the GPU in the linux terminal, outside of MATLAB, it runs fine...
to summarize: Start Unix shell add modules from HPC cluster Submit/start job for GPU access start matlab and run matlab program that contains the code: command = [python ../test.py] [status,return] = system(command,'-echo')
% within the python program test.py is more code calling for GPU access. return = no NVIDIA devices found.
Then return to unix shell. I type in:
python ../test.py
and it runs fine. Why would it not run from MATLAB?
Any suggestions??

回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by