Assign a code to a specific core on Linux server
Show older comments
I have several independent MATLAB codes, say A1.m, A2.m, ...,A7.m and I want to use a 32 core Linux server to run them. Each code individually takes 1 day to be completed; however, when I run all of them simultaneously (using "nohup" command), it will take 7 days to be finished. I monitored the CPU information using "top" command, and it shows that 7 CPU cores are at ~100% capacity. My first question is, does CPU (by default) assign each code to a separate core? and if so, why they are not finished in one day (since they are independent from each other and are running on different cores)? My second question is, how can I specify on which core I want to run A1.m? Note that I have tried writing the codes as a single A.m file so that I can use MATLAB Parallel toolbox and "parfor" command (with 12 workers). However, it still takes 7 days to be finished. Also, the MATLAB version on the server is R2012b.
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!