2010-05-30 22:30:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo '### Test --number-of-cpus'
|
2010-09-21 20:00:30 +00:00
|
|
|
parallel --number-of-cpus
|
2010-05-30 22:30:01 +00:00
|
|
|
|
|
|
|
echo '### Test --number-of-cores'
|
2010-09-21 20:00:30 +00:00
|
|
|
parallel --number-of-cores
|
2010-05-30 22:30:01 +00:00
|
|
|
|
|
|
|
echo '### Test --use-cpus-instead-of-cores'
|
2010-09-21 20:00:30 +00:00
|
|
|
(seq 1 4 | parallel --use-cpus-instead-of-cores -j100% sleep) && echo CPUs done &
|
|
|
|
(seq 1 4 | parallel -j100% sleep) && echo cores done &
|
2010-05-30 22:30:01 +00:00
|
|
|
echo 'Cores should complete first on machines with less than 4 physical CPUs'
|
|
|
|
wait
|
|
|
|
|
|
|
|
|