简体   繁体   中英

Parallel tasks don't work on Ubuntu 12.04 in VM Workstation

Something weird is happening in my Virtual Machine which runs Ubuntu 12.04. The following script, that I successfully used before to run 7 tasks on 7 cores together, doesn't work properly anymore!

Prog out file1.bin fids 72000 > logs/fitlog1.log &
Prog out file2.bin fids 72000 > logs/fitlog2.log &
Prog out file3.bin fids 72000 > logs/fitlog3.log &
Prog out file4.bin fids 72000 > logs/fitlog4.log &
Prog out file5.bin fids 72000 > logs/fitlog5.log &
Prog out file6.bin fids 72000 > logs/fitlog6.log &
Prog out file7.bin fids 72000 > logs/fitlog7.log &

Prog is the executable name.

Previously (2 days ago), when I ran this script, each app executed on a single core and logging was OK. Now, the apps don't start concurrently anymore. 2 or 3 cores start and then stop and only 1 continues running.

Could anyone please explain this behaviour?

System is an Ubuntu 12.04 on VM Workstation on Windows 7. No errors at all are shown in the log files.

Thanks for any efforts.

Too vague description btw. There should be many possibilities of weird behavior, but in general, when you want to bind processes on Linux to specific CPU cores, start with following:

man cpuset

Otherwise kernel tries to do round-robin distribution of load and processes will 'travel' between cores during its run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM