CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Parallel UDF (https://www.cfd-online.com/Forums/fluent/48025-parallel-udf.html)

Karo April 23, 2008 14:16

Parallel UDF
 
I am getting the following errors with regards to my SEND AND RECV functions: ..\..\src\steady11.c(115) : error C2440: 'function' : cannot convert from 'real' to 'float *' ..\..\src\steady11.c(115) : warning C4024: 'MPT_csend_float' : different types for formal and actual parameter 2 ..\..\src\steady11.c(124) : error C2440: 'function' : cannot convert from 'real' to 'float *' ..\..\src\steady11.c(124) : warning C4024: 'MPT_crecv_float' : different types for formal and actual parameter 2

Any help would be appreciated.

#include "udf.h"

real inmfr;

DEFINE_PROFILE(uvelocity, thread, position) { #if !RP_HOST

face_t f;

int i,j;

real uvel = 0.20; /* meters/sec */

real A[ND_ND];

inmfr = 0.0;

begin_f_loop(f, thread)

{

F_AREA(A, f, thread);

inmfr = inmfr + NV_MAG(A);

}

end_f_loop(f, thread) #endif

#if RP_NODE

if(! I_AM_NODE_ZERO_P)

{

PRF_CSEND_REAL(node_zero, inmfr, 1, myid);

} #endif

#if RP_NODE

if(I_AM_NODE_ZERO_P)

{

compute_node_loop_not_zero(i)

{

PRF_CRECV_REAL(i, inmfr, 1, i);

}

} #endif

node_to_host_real_1(inmfr); host_to_node_real_1(inmfr);

}


Paul April 24, 2008 08:38

Re: Parallel UDF
 
Try this:

PRF_CSEND_REAL(node_zero, &inmfr, 1, myid);

------

slyan0913 April 25, 2017 01:36

What do you mean, can you tell me more about it? Thank you very much!


All times are GMT -4. The time now is 16:25.