Matlab Distributed Computing Server(MDCS)クラスター上でのmexコンパイルは可能でしょうか?
Show older comments
[環境]
- クラスターノードのOS: CentOS7.5
- クラスターノードのMDCSバージョン: R2018a
- クラスターノードのgccのバージョン: 4.8.5 20150623
- クラスターノードのnvccのバージョン: 9.0.176
上記クラスターで、Parallel Command Windowを開き、mexおよびmexcudaコマンドを実行すると、次の様な出力が表示されます。
mex実行時
>> mex -compatibleArrayDims test.c
Error using mex
No supported compiler was found. For options, visit
https://www.mathworks.com/support/compilers.
mexcuda実行時
>> mexcuda -largeArrayDims mexMPmuFEAT.cu
Warning: Version 9.0 of the CUDA toolkit could not be found. If installed, set
MW_NVCC_PATH environment variable to location of nvcc compiler.
> In mexcuda (line 157)
Error using mex
No supported compiler was found. For options, visit
https://www.mathworks.com/support/compilers.
Error in mexcuda (line 157)
[varargout{1:nargout}] = mex(mexArguments{:});
getenv('MW_NVCC_PATH')実行時
>> getenv('MW_NVCC_PATH')
ans =
'/usr/local/cuda/bin'
一方、ローカルのデスクトップ(iMac, macOS)でParallel Command Windowを開き、ワーカー上でmexコマンドを実行した場合は、コンパイルを実行することができました。(mexcudaについては、iMacにNvidia製GPUが搭載されていないため、調査できてません)
上記のことから、MATLABワーカー上でmexコンパイルを実行すること自体は可能である様に見えますので、問題は原因は次の3つのいずれかではないかと考えています。
- MDCSワーカー上では、そもそもmexコンパイルを実行できない
- MDCSワーカー上でmexコンパイルを行うためには、特殊な設定が必要(主にパス周り)
- MDCSのノードとなっているLinuxサーバーのコンパイラーのバージョンがMATLAB2018aに合っていない(nexcudaのエラー出力を見る限り、コンパイラーのバージョンは合っていそうですが...)
上記の様なMDCSクラスター上でのmexコンパイルは可能でしょうか?
1 Comment
Accepted Answer
More Answers (1)
Gowtham Uma Maheswari Jaganathan
on 18 May 2018
Please be aware that CentOS is not one of the officially supported versions of OS for MATLAB to run.
Error using mex
No supported compiler was found. For options, visit
https://www.mathworks.com/support/compilers.
The above error message indicates that you do not have any compiler that is supported by MATLAB installed on your machine or it is not on path. For more information refer the pages below:
https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html https://www.mathworks.com/matlabcentral/answers/125753-installing-c-compiler-for-matlab
>> mexcuda -largeArrayDims mexMPmuFEAT.cu
Warning: Version 9.0 of the CUDA toolkit could not be found. If installed, set
MW_NVCC_PATH environment variable to location of nvcc compiler.
> In mexcuda (line 157)
Error using mex
No supported compiler was found. For options, visit
https://www.mathworks.com/support/compilers.
Error in mexcuda (line 157)
[varargout{1:nargout}] = mex(mexArguments{:});
This indicates that NVCC path is not pointing to 9.0 CUDA SDK. From the looks of the output doesn't look like the path is set correctly.
Categories
Find more on GPU 計算 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!