I got a code file, which solves a large sparse matrix, about 40000×40000, by calling function 'eigs'.
When I first run the code by simply typing its file name, like 'myfile.m', in the command window and pressing Enter, the code is running as it should be. I checked that matlab client is running with multiple threads. This indicates that the inner function EIGS itself can run parallelly. The computing time that the code cosumes is acceptable.
Now, I have to change the input varibles of myfile to run as many as tens of times manually. So I choose using function BATCH to submit jobs in sequency.
When I batch myfile, I found the client is running with only one worker. It does not run parallelly automatically as function EIGS indicate. I check in the tutorials and know BATCH will transfer myfile to a worker of the cluster. Since myfile has no any parfor loops, that's why the parallel pool does not start, even if function EIGS is in the code? And it costs a lot time to compute. So is there any way that can make the batched jobs myfile still run in a parallel mode, with no parfor but eigs? The time cost is appreciable with no parallel computing.
Thanks in advance!
Best Answer