parallel/testsuite/tests-to-run/parallel-local-mem.sh
Ole Tange 4ef66ec7f6 testsuite for 2GB issues on some Perl versions.
Memory heavy jobs (>2 GB) moved to parallel-local-mem.sh.
Passes testsuite.
2015-03-07 17:49:16 +01:00

40 lines
1.7 KiB
Bash

#!/bin/bash
# Jobs that eat more than 2 GB RAM
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj1 -k --joblog /tmp/jl-`basename $0` -L1
echo '### Trouble reading a record > 2 GB for certain versions of Perl (substr($a,0,2G+1)="fails")'
echo '### perl -e $buf=("x"x(2**31))."x"; substr($buf,0,2**31+1)=""; print length $buf'
'
echo 'Eats 2.5 GB'
(yes "`echo {1..100}`" | head -c 2300M; echo ged) |
PERL5LIB=input-files/perl-v5.14.2/lib input-files/perl-v5.14.2/perl `which parallel` -k --block 2G --pipe --recend ged md5sum
echo 'Eats 2.5 GB'
(yes "`echo {1..100}`" | head -c 2300M; echo ged) |
PERL5LIB=input-files/perl-v5.14.2/lib input-files/perl-v5.14.2/perl `which parallel` -k --block 2G --pipe --recend ged cat | wc -c
echo '**'
echo '### bug #44358: 2 GB records cause problems for -N'
echo '5 GB version: Eats 12.5 GB'
(yes "`echo {1..100}`" | head -c 5000000000; echo FOO;
yes "`echo {1..100}`" | head -c 3000000000; echo FOO;
yes "`echo {1..100}`" | head -c 1000000000;) |
PERL5LIB=input-files/perl-v5.14.2/lib input-files/perl-v5.14.2/perl
`which parallel` --pipe --recend FOO -N2 --block 1g -k LANG=c wc -c
echo '2 GB version: eats 10 GB'
(yes "`echo {1..100}`" | head -c 2300M; echo FOO;
yes "`echo {1..100}`" | head -c 2300M; echo FOO;
yes "`echo {1..100}`" | head -c 1000M;) |
PERL5LIB=input-files/perl-v5.14.2/lib input-files/perl-v5.14.2/perl
`which parallel` --pipe --recend FOO -N2 --block 1g -k LANG=c wc -c
echo '### -L >4GB'
(head -c 5000000000 /dev/zero; echo FOO;
head -c 3000000000 /dev/zero; echo FOO;
head -c 1000000000 /dev/zero;) |
parallel --pipe -L2 --block 1g -k LANG=c wc -c
EOF