|
[Sponsors] |
June 20, 2007, 20:56 |
Parallel UDF Problem
|
#1 |
Guest
Posts: n/a
|
Hi everybody
I made a udf to calculate on a specific face the average value of scalar quantity, and it runs fine in serial mode. I tried to use it in parallel mode in a dual core machine but I failed. I used some complier's directives in order to overcome it but I didn't manage it. The serial listing is attached. /************************************************** **********************/ DEFINE_EXECUTE_AT_END(Scalar_average) { int curr_ts = N_TIME; real tfa = 0.0; real tfi = 0.0; real mfi = 0.0; real time = CURRENT_TIME; int id = 10; real A[ND_ND]; FILE *fp = fopen("usds_story.txt","a+"); face_t f; Domain *d = Get_Domain(1); Thread *t=Lookup_Thread(d,id); { begin_f_loop(f, t) { F_AREA(A,f,t); tfa += NV_MAG(A); tfi += F_UDSI(f,t,0)*NV_MAG(A); } end_f_loop(f, t) } mfi = tfi / tfa; Message ("Time Step:%5d Time:%7.4e Average Value:%12.4e\n", curr_ts, time, mfi); fprintf(fp,"%5d %7.4e %12.4e\n", curr_ts, time, mfi); fclose(fp); } Thanks in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem loading UDF library in parallel cluster | Veera Gutti | FLUENT | 8 | July 26, 2016 07:24 |
Parallel UDF problem | Lindsay | FLUENT | 4 | June 20, 2016 09:37 |
UDF parallel | Lucy | Fluent UDF and Scheme Programming | 3 | May 28, 2013 13:14 |
UDF in parallel version. | yobee | FLUENT | 0 | August 17, 2004 04:12 |
parallel mode - small problem? | co2 | FLUENT | 2 | June 1, 2004 23:47 |