CC: | "Doug Roberts" <doug [...] parrot-farm.net>, "Roberts, Douglas" <droberts [...] rti.org> |
Subject: | Problem with Sort::External 0.16 |
Date: | Fri, 11 Jul 2008 12:13:20 -0600 |
To: | bug-Sort-External [...] rt.cpan.org |
From: | "Douglas Roberts" <doug [...] parrot-farm.net> |
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.
Hi,
I've downloaded from cpan and installed creamyg's Sort::External module, but
it does not seem to be working. Here is the behavior:
1. I created a small unsorted list of data to be sorted.
2. I created my own sort subroutine.
3. Ran the sort with the following settings:
my $sortex = Sort::External->new( -mem_threshold => 2**26, -sortsub =>
$sortscheme, -working_dir => $temp_directory,);
and it properly sorted my data.
4. Reran the sort with -mem-threshold set to 2**8, forcing the use of temp
files, and the routine went into an endless loop.
It seems that as soon as the disk temporary files are used, the sort gets
stuck in a loop.
FYI, the full test.pl code is attached, as is a small unsorted data file.
To run: ./test.pl ./small-events-unsorted test.out
Thanks,
--Doug Roberts
--
Doug Roberts, RTI International
droberts@rti.org
doug@parrot-farm.net
505-455-7333 - Office
505-670-8195 - Cell