I've written a multitprocess application in VC++ and tried to execute it with command line arguments with the system
command from MATLAB. It runs, but only on one core --- any suggestions?
Update:In fact, it doesn't even see the second core. I used OpenMP and used omp_get_max_threads()
and omp_get_thread_num()
to check and omp_get_max_threads()
seems to be 1
when I execute the application from MATLAB but it's 2
(as is expected) if I run it from the command window.
Question:My task manager reports that CPU usage is close to 100% --- could this mean that the aforementioned API is malfunctioning it's still running as a multiprocess application?
Confirmation:
I used Process Explorer to check if there were any differences in the number of threads.
When I call the application from the command window, 1
thread goes to cmd.exe
and 2
go to my application.
When I call it from MATLAB, 26
threads are for MATLAB.exe
, 1
for cmd.exe
and 1
for my application.
Any ideas?