Question: Confused about Grid, why can't it take list arguments?

I've been trying to learn how to do Grid-based parallelization in Maple, but I've been running into a weird error.

Suppose I run the following simple Grid code, which just runs on a single node:

X := [1, 2, 3, 4]; babyGrid := proc (X) [Grid:-MyNode(), X] end proc; Grid:-Launch(babyGrid, X);

 I get this error:

Error, (in Grid:-Launch) invalid input: Launch expects its 7th argument, exports, to be of type ({list, set})({name, string}), but received [1, 2, 3, 4]

So for some reason it assumes that X is the exports variable. This error goes away if I instead make X an array X:=Array([1,2,3,4])

In this case the code runs fine and produces the expected output.

What's the difference here? Is there a reason that Grid can't take list arguments? Is there a reason this is so obvious that it isn't documented?

 

Please Wait...