# How can I prevent these warnings while using ParallelTable

I have this code to find all the permutations of a set of letters that form legal words.

<<Combinatorica
Module[{str = "abc", chars, len, r, check},
chars = Characters[str];
len = StringLength[str];
r = Range[len];
check[n_Integer] :=
DictionaryLookup[{"BritishEnglish",
StringJoin[chars[[UnrankPermutation[n, r]]]]}, 1];
DistributeDefinitions[check, chars, r];
ParallelTable[check[i], {i, 1, len!}]]


I've verified that, if I replace ParallelTable with Table, I get this:

{{}, {}, {}, {"cab"}, {}, {}}


With ParallelTable, however, in addition to that result, I also get warnings like these:

Part::pspec: Part specification CombinatoricaUnrankPermutation[1,{1,2,3}] is neither a machine-sized integer nor a list of machine-sized integers.

Part::pspec: Part specification CombinatoricaUnrankPermutation[2,{1,2,3}] is neither a machine-sized integer nor a list of machine-sized integers.

StringJoin::string: String expected at position 1 in StringJoin[{a,b,c}[[CombinatoricaUnrankPermutation[1,{1,2,3}]]]].

StringJoin::string: String expected at position 1 in StringJoin[{a,b,c}[[CombinatoricaUnrankPermutation[2,{1,2,3}]]]].


These warnings seem to come from kernel 7 and higher. My guess is that the computation reaches those kernels and there isn't any data left, since there are only 6 permutations, and causes them to spit out those warnings.

Is my understanding correct? How do I prevent these warnings?

-
I think >> should be <<. –  Michael E2 Mar 14 '13 at 14:28
Thanks, changed >> to <<. –  Ashley Mar 14 '13 at 15:40
Add UnrankPermutation to DistributeDefinitions:
DistributeDefinitions[check, chars, r, UnrankPermutation];

Yes. Using Get (<<) loads the definitions in the Combinatorica package. Any you want to use in parallel should have their definitions distributed. –  Michael E2 Mar 14 '13 at 15:53
Better use ParallelNeeds["Combinatorica"]. –  Oleksandr R. Mar 14 '13 at 20:37