Info
此问题已关闭。 请重新打开它进行编辑或回答。
Does the following .sh script qualify to be processed parallely?
1 次查看(过去 30 天)
显示 更早的评论
Hi there,
So I generated the compiled executable of a matlab script using -mcc command to be able to run the executable using unix environment so as to not query the matlab license server. I believe the executable doesn't require license requirements.
To see if what I am trying to do is along the right lines, I tried doing what I want to for a toy matlab script(Called sineplot). In the image attached, the script calls the mcc generated sineplot.sh thousand times. I am also passing two input arguments to the script which are as follows:-
1. Loop Count: Basically the matlab script loads a .mat file which contains a 1*1000 array. Depending on the loop count, a distinct value from the array is picked for different amplitude sine wave. That is why the loop count information is being passed.
2. File Name: To save the output of each count distinctly, I am passing a different file name.
Being fairly new to this, I have a question: If I submit this script to be run parallelly in different machines(using the LSF), will the different runs be all executed parallelly? Is the script potent enough to do that? Or something else needs to be done too.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/346482/image.jpeg)
0 个评论
回答(1 个)
Raymond Norris
2020-8-16
Hi,
Correct, an executable generated by MATLAB Compiler or MATLAB Coder will not require a license at runtime. You can simplify things a bit with a for loop
#!/bin/bash
echo "This scripts is about to call another"
for lc in {1..1000}
do
$HOME/run_sinplot.sh /apps/mathworks/matlab/R2018a $lc out${lc}.mat
done
echo "Another Script called"
Raymond
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!