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'
|
2011-04-18 09:37:34 +00:00
|
|
|
(seq 1 4 | stdout parallel --use-cpus-instead-of-cores -j100% sleep) && echo CPUs done &
|
|
|
|
(seq 1 4 | stdout 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
|
|
|
|
|
2011-09-24 00:16:06 +00:00
|
|
|
echo '### Test --tag ::: a ::: b'
|
|
|
|
stdout parallel -k --tag -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a ::: b
|
2010-05-30 22:30:01 +00:00
|
|
|
|
2011-09-24 00:16:06 +00:00
|
|
|
echo '### Test --tag ::: a b'
|
|
|
|
stdout parallel -k --tag -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a b
|
|
|
|
|
|
|
|
echo '### Test --tag -X ::: a b'
|
|
|
|
stdout parallel -k --tag -X -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a b
|
2011-09-24 00:35:16 +00:00
|
|
|
|
|
|
|
echo '### Test bash redirection <()'
|
|
|
|
parallel 'cat <(echo {}); echo b' ::: a
|