CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Messagge Passing Macros (https://www.cfd-online.com/Forums/fluent/68252-messagge-passing-macros.html)

Arianna September 11, 2009 10:47

Messagge Passing Macros
 
Hi there,

I'm trying to parallelize a new function and I need to pass the 1D array V (with n elements)from the current node (with ID=myid) to the next one, so I wrote something like this:

#if RP_NODE
if(!I_AM_NODE_LAST_P)
{
PRF_CSEND_DOUBLE(myid+1,V,n,myid);
}
else
{
PRF_CSEND_DOUBLE(node_zero,V,n,myid);/*if myid=node_last it send V to node_zero node*/
}
#endif

and this part seems to work fine, while I couldn't fix the second part:

#if RP_NODE
if(!I_AM_NODE_ZERO_P)
{
PRF_CRECV_DOUBLE(myid,V,n,myid);
}
else
{
PRF_CRECV_DOUBLE(node_last,V,n,node_last);
}
#endif

since I can't select the receiving node IDs (instead of the current node ID).

Thanks in advance for any suggestions!!!

Arianna


All times are GMT -4. The time now is 04:32.