CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

size=THREAD_N_ELEMENTS_INT(thread);

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 11, 2013, 08:20
Default size=THREAD_N_ELEMENTS_INT(thread);
  #1
New Member
 
HAN HAN
Join Date: Jun 2013
Posts: 1
Rep Power: 0
John Han is on a distinguished road
Hello,everyone!
I am an Aisan student learning the UDF on parallel compute.Honestly,it is hard for me knowing C language liitle and the problem confusing me over days.They are :
1.How to use the "compute_node_loop_not_zero*(pe);"and "size=THREAD_N_ELEMENTS_INT(thread);".I read them from the manual help.
2.These are the codes that I write. There may be some problems.Please help me modify them. Thanks a lot!

#if PARALLEL
float *array;
int pe;
int size;/*data passing variables*/
#endif/*PARALLEL*/
#if RP_NODE
float f[16];
array=(float*)malloc(16*sizeof(float));
array=f;
pe=(I_AM_NODE_ZERO_P)?node_host:node_zero;
PRF_CSEND_FLOAT(pe,array,16,myid);
free(array);
if(I_AM_NODE_ZERO_P)
compute_node_loop_not_zero(pe)
{
array=(float*)malloc(16*sizeof(float));
PRF_CRECV_FLOAT(pe,array,16,pe);
PRF_CSEND_FLOAT(node_host,array,16,myid);
free((char*)array);
}
#endif/*RP_NODE*/
John Han is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:28.