Question: How can I correctly use Grid:-Send and Grid:-Recieve?

 

Dear everyone,

I want to execute a simple example by using Grid:-Send and Grid:-Receive commands. I have two questions:
1) Why does the Grid:-GetLastResult(0) command not return anything?

2) I tried to send the value of a, namely 2, from node 0 to node 1. It seems the execution is not stopped by Grid:-Send(1,a) and a_1:=Grid:-Receive(0) while CPU is not working.
Would anyone guide me?

The answer to the second question is more important to me.

Best wishes

 

 

restart;

Grid:-Run(0,"a:=2;");

Grid:-GetLastResult(0);

Grid:-Get(0,a);

Grid:-Send(1,a);

a_1:=Grid:-Receive(0);

Please Wait...