Thrread in Matlab
Thrread in Matlab
(OP)
Hello,
I wonder if Matlab has threading. I am doing sum processing for data and save the result in an array. I am wonder if I can write the array (partial result) to a file and continue processing without interruption. It seem that I should have 2 thread one responsible about processing the data and save them to the array while the second thread write the array into a file. Any suggestion how to handle this issue.
Thanks,
I wonder if Matlab has threading. I am doing sum processing for data and save the result in an array. I am wonder if I can write the array (partial result) to a file and continue processing without interruption. It seem that I should have 2 thread one responsible about processing the data and save them to the array while the second thread write the array into a file. Any suggestion how to handle this issue.
Thanks,
RE: Thrread in Matlab
Yes, matlab can do parallel processing
from the help
Implicit Multiprocessing
Characteristics of implicit multiprocessing:
*
Runs multiple threads on a single machine, most often using one thread per processing unit.
*
Requires a multiple CPU (multiprocessor or multicore) system.
*
Speeds up elementwise computations such as those done by the sin and log functions, and computations that use the Basic Linear Algebra Subroutines (BLAS) library, such as matrix multiply.
*
Does not require any changes to your MATLAB code.
*
Works behind the scenes to take advantage of the processing units available to you. It does this by multithreading the computationally-intensive math library functions that you use in the course of your MATLAB session.
MATLAB enables multithreaded computation by default. You can disable it by specifying the singleCompThread option when starting MATLAB.
Explicit Multiprocessing
Characteristics of explicit multiprocessing:
*
Runs separate processes on one or many machines.
*
Requires installation of Parallel Computing Toolbox.
*
Speeds up execution of large MATLAB jobs. Enables you to run jobs simultaneously on a cluster of computers, or as several processes on a single machine.
*
Requires that you modify your MATLAB code.
*
The Parallel Computing Toolbox supports programming constructs for distributed arrays and parallel for (parfor) loops. It also supports both interactive and batch execution.
Enable explicit multiprocessing by installing Parallel Computing Toolbox.
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: Thrread in Matlab
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers