2010-12-06 08:23:21 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SERVER1=parallel-server3
|
2013-03-23 20:36:17 +00:00
|
|
|
SERVER2=parallel-server1
|
2010-12-06 08:23:21 +00:00
|
|
|
|
2011-07-20 23:58:23 +00:00
|
|
|
# -L1 will join lines ending in ' '
|
2015-01-03 17:57:37 +00:00
|
|
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
2013-03-23 20:36:17 +00:00
|
|
|
echo "### BUG: The length for -X is not close to max (131072)";
|
|
|
|
seq 1 60000 | nice parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
|
|
|
seq 1 60000 | nice parallel -X echo a{}b{}c |head -n 1 |wc
|
|
|
|
seq 1 60000 | nice parallel -X echo |head -n 1 |wc
|
|
|
|
seq 1 60000 | nice parallel -X echo a{}b{}c {} |head -n 1 |wc
|
|
|
|
seq 1 60000 | nice parallel -X echo {}aa{} |head -n 1 |wc
|
|
|
|
seq 1 60000 | nice parallel -X echo {} aa {} |head -n 1 |wc
|
|
|
|
|
|
|
|
echo '### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin'
|
2013-06-15 14:12:02 +00:00
|
|
|
seq 1 150 | stdout nice parallel -j9 --retries 2 -S localhost,: "/bin/non-existant 2>/dev/null"
|
2013-03-23 20:36:17 +00:00
|
|
|
|
|
|
|
echo '### Test --load locally - should take >10s'
|
|
|
|
echo '# This will run 10 processes in parallel for 10s';
|
2015-02-22 14:09:26 +00:00
|
|
|
seq 10 | parallel --nice 19 --timeout 13 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
|
|
|
sleep 2; stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
2010-12-06 08:23:21 +00:00
|
|
|
|
2013-03-23 20:36:17 +00:00
|
|
|
echo '### Test --load remote'
|
2013-04-11 19:55:33 +00:00
|
|
|
ssh parallel@$SERVER2 'seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null"' &
|
2011-07-20 23:58:23 +00:00
|
|
|
stdout /usr/bin/time -f %e parallel -S parallel@$SERVER2 --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
2011-07-28 19:09:27 +00:00
|
|
|
|
2013-03-23 20:36:17 +00:00
|
|
|
echo '### Test --load read from a file - more than 3s'
|
|
|
|
echo '# This will run 10 processes in parallel for 10s';
|
2013-04-11 19:55:33 +00:00
|
|
|
seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
2013-06-15 14:12:02 +00:00
|
|
|
( echo 8 > /tmp/parallel_load_file; sleep 10; echo 1000 > /tmp/parallel_load_file ) &
|
2015-02-01 13:38:26 +00:00
|
|
|
sleep 1;
|
|
|
|
stdout /usr/bin/time -f %e parallel --load /tmp/parallel_load_file sleep ::: 1 |
|
|
|
|
perl -ne '$_ > 9 and print "OK\n"';
|
|
|
|
rm /tmp/parallel_load_file
|
2011-07-28 19:09:27 +00:00
|
|
|
|
|
|
|
echo '### Test --load read from a file - less than 10s';
|
2013-03-23 20:36:17 +00:00
|
|
|
echo '# This will run 10 processes in parallel for 10s';
|
|
|
|
seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
2013-06-15 14:12:02 +00:00
|
|
|
( echo 8 > /tmp/parallel_load_file2; sleep 10; echo 1000 > /tmp/parallel_load_file2 ) &
|
2015-02-01 13:38:26 +00:00
|
|
|
sleep 1;
|
|
|
|
stdout /usr/bin/time -f %e parallel --load /tmp/parallel_load_file2 sleep ::: 1 |
|
|
|
|
perl -ne '$_ < 20 and print "OK\n"';
|
|
|
|
rm /tmp/parallel_load_file2
|
2011-07-28 19:09:27 +00:00
|
|
|
|
2011-07-20 23:58:23 +00:00
|
|
|
EOF
|