Compute cellset file dfx with parallel processing and return a sequence composed of result sets of the multiple subtasks.




When parameter h and s are absent, the function executes script dfx using multiple threads on the local machine; split parameter to distribute to the multiple threads if it is a sequence; and copy it to the multiple threads if it is a single value; the length of the parameter sequence is the number of subtasks. Perform multiprocess computing if there are multiple processes on the machine. The actual number of parallel tasks is the preferred task number for the current machine; the extra tasks will wait in queue for any available process.

When parameter h is present, the function distributes the computational task among the node process list h and executes script dfx to inherit the task space.

When the number of subtasks is equivalent to the length of node list h, the function allocates subtasks evenly among the nodes while ignoring parameter x, the reduce action; when the number of subtasks is greater than the length of node list h, the function sorts h according to the computing ability of each node, gives the appropriate number of subtasks to the top node, and then reassests the computing ability of the rest of the nodes for distribution; the process continues until the number of subtasks is less than a certan threshold value and nodes will be started to compute. A node will ask for more jobs only after it finishes its current ones; the computation loops like this until it is completed.

Parameter s is a sequence of integer sequences. Each integer sequence is a sequence of task numbers the corresponding node will perform. The task distribution needs to check whether or not a node can perform certain tasks; won’t perform the check if s is absent.

Parameter x is the reduce action. The function returns a sequence consitting of the result sets of the subtasks if x is absent. When x is present, the function calculates reduce using ~, the result of each subtask, and ~~, the current reduce result and puts the result of x into ~~ to go on calculating reduce and returns the final result of ~~ as the result sequence of all node subtasks.



The cellset file, for which an absolute or a relative path can be set. The relative path is the Search Path under the Tool->Option-> [Environment] menu.


Reduce action; can be omitted

The parameter for passing value to dfx. It is usually in the form of a sequence. The number of parameters to be passed to dfx is the number of the sequences. The parallel algorithm will divide a computational task into multiple subtasks according to the length of the parameter sequence and pass each member of the sequence to the corresponding subtask as the parameter value of dfx. If a parameter is single-value, then it will be copied to every subtask.


The server sequence in which each server is represented by a string in the form of "address:port number", like "192. 168. 0. 86: 4001". By default, the servers will not be specified, and the computation will be distributed to multiple threads in the current process.


A sequence made up of integer sequences


  @a  Distribute subtasks among nodes randomly without considering equal loads. If a node happens to be invalid or returns an error, replace it with another.


test.dfx is the deployment file for the remote node server. The node machines are respectively the [””,””,””], and the port number is 8081. The file contents are shown below:

1)  Single Parameter





=connect("demo").query("select * from SCORES where SUBJECT=?",arg1)


return A1

return A1.(SCORE)









Allocate three subtasks to servers on the two machines running in parallel.



Tasks will be allocated strictly in order as there are same number of servers 



Run parallelly and locally. The file is stored under the search path in Tools->Options->[Environment] menu.



Distribute subtasks to specified nodes: Node gets the subtask 1 and Node gets subtasks 2 and 3



Perform parallel processing on the local machine to calculate the aggregate expression is ~~|~ and return the sequence of node results


2)  Multiple Parameters









=A1.query("select * from EMPLOYEE where EID in (?)and GENDER=?",arg1,arg2)








return A2









Pass two parameters, which are string type and sequence type respectively, to one node machine.



Send multiple parameters to multiple node machines. For a parameter that has the same value, it can be passed in the form of single value.



When multiple node machines receive the same parameter with different values, the parmeter should be passed in the form of a sequence.