Dear Mark, On 8 Oct 2013, at 20:57, Mark Flanagan <mark.evan.flana...@gmail.com> wrote:
> Hello everyone, > > Hopefully issues with ParGap are on-topic for the GAP forum. > > Running ParGap with open mpi. ParList works with a simple function > loaded into ParGap with ParRead, eg ParList([1..10],testfunc) when > > testfunc:= function(x) return x+x; end;; > > is used, but in more complicated use cases, > ParList(producehoms(3),loopofhom) does not work: > > gap> ParList(producehoms(3),loopofhom); > Error, Variable: 'f1' must have a value > Error, List Assignment: <rhss> must be a list with the same length as > <positions> (14\ > ) in > result{range} := tmp; called from > <function "ParList">( <arguments> ) > called from read-eval loop at line 3 of *stdin* > you can replace <rhss> via 'return <rhss>;' > brk> Error, Variable: 'f1' must have a value > > producehoms(3) makes a list of homomorphisms and loopofhom is a > function, and f1 is a generator of a group loaded in with ParRead. > List(producehoms(3),loopofhom) works as expected on master, and it > seems like ParRead worked because > > SendRecvMsg("List(producehoms(3),loopofhom)",1); > > produces the expected output. > > Any thoughts on why ParList isn't working right? Would it just be > easier to parallelize my code manually, rather than relying on > ParList? Any advice is appreciated. > > Mark I think this is not a problem in ParGap: one can easily reproduce an instance of the same problem without ParGap: gap> F:=FreeGroup("f1","f2"); <free group on the generators [ f1, f2 ]> gap> f1; Error, Variable: 'f1' must have a value not in any function at line 2 of *stdin* This happens because there is no variable in GAP named 'f1'. Instead, you can access generators of the group like here: gap> F.1; f1 Alternatively, you may call 'AssignGeneratorVariables': gap> AssignGeneratorVariables(F); #I Assigned the global variables [ f1, f2 ] gap> f1; f1 but then remember to call it each time you define a new group with the same letter denoting generators, otherwise f1 may still point to a generator of the former group. Hope this helps, Alexander _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum