run matlab on hpc

48 次查看(过去 30 天)
Yan WANG
Yan WANG 2022-2-28
I am using the hpc in to run the matlab code, I used two versions to submit the sbatch scripts but failed. Can somebody tell me where I am wrong? Thanks a lot!!

回答(2 个)

prabhat kumar sharma
Hi Yan,
I understand you are facing issue with running a matlab job on your HPC Cluster.
I've noticed a couple of potential issues in the script you've provided. After reviewing several blogs about sbatch and mpirun, it seems that the MATLAB module isn't being loaded in your script. When you want to run a MATLAB script in batch mode, it's essential to use the -r flag to instruct MATLAB to run the specified script. Additionally, the -nodisplay and -nosplash flags are crucial to prevent MATLAB from attempting to use a graphical user interface.
Here are some resources that might be helpful in addressing your issue:
Typically, MATLAB manages its own parallel computing environment, which usually doesn't require the use of mpirun, unless you're specifically leveraging MPI-based features in MATLAB.
I hope this information proves to be useful for you!
  2 个评论
Bassem
Bassem 2024-8-2
This sounds like a ChatGPT answer..
prabhat kumar sharma
Hi Bassem,
I understand why you might think this is an AI-generated prompt, but I assure you these are standard steps that I personally thought would help Yan in debugging the issue. My sole intention was to assist him in navigating the problem effectively, hence the detailed response.

请先登录,再进行评论。


Seung-Goo Kim
Seung-Goo Kim 2024-11-25
编辑:Seung-Goo Kim 2024-11-25
Dear Yan,
I know this posted 2 years ago, but I hope you have removed the space in
MATLAB= /cm/...
In Bash, white space is also functional (in a different way from Python). It needs to be like:
MATLAB=/cm/...
No space before and after the equal sign ("=").
And also, call MATLAB like this:
$MATLAB -r "your_script.m; exit"
Best,
Seung-Goo

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by