i want to display the real time graph and also i need to record at the same time, i have two different programs for these, is it possible to display real time and also to record?
MATLAB: Is it possible to run two programs at the same time
real timetwo programs
Related Solutions
Simple Approach: 'gpuDevice(IDX)'
To use a different Graphics Processiong Unit (GPU) in each concurrent MATLAB session, use the 'gpuDevice(IDX)' form of the 'gpuDevice' function to explicitly select a different GPUDevice in each session. For example:
MATLAB Session A: >> g = gpuDevice(1);
>> x = rand(100, 'gpuArray');
MATLAB Session B:
>> g = gpuDevice(2);
>> x = ones(100, 'gpuArray');
It is important to keep in mind that 'gpuDevice', called without an index, chooses the _default_ GPU, and does not automatically select the GPU with the most available memory or the lowest computation load. For more information about 'gpuDevice', refer to the following link:
https://www.mathworks.com/help/distcomp/gpudevice.html
Alternative Approach: 'parpool'
Another alternative is to use a parallel pool of workers and an 'spmd' block to execute the different MATLAB programs on separate MATLAB workers. When workers share a single machine with multiple GPUs, MATLAB automatically assigns each worker in a parallel pool to use a different GPU by default.
Refer to the following link for more information:
Out-of-memory Errors
Out-of-memory errors can occur when multiple MATLAB programs are using the same GPU to perform calculations, unaware that they do not have exclusive access to the GPU's total amount of memory. The error might look like this:
Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists, reset the GPU by calling 'gpuDevice(2)'.
It is not possible to run multiple simulations on multiple cores without Parallel Computing Toolbox. In case you open different MATLAB sessions, the operating system will take care of the resources during the execution of the program, which means that it is not assured it will be on different cores. In case of complex simulations, it is more likely that the operating system will send different simulations to different cores, but it is not possible to control this from MATLAB.
Please find more information regarding running multiple simulations at the following link:
Best Answer