CFD Online Discussion Forums

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

manu January 28, 2008 09:32

parallelized UDF
 
I've written a UDF that works well on a serial solve. Now I want to parallelize it. I have some doubts about what part (host or nodes) must performe which part of my UDF. Could you give me some advice on that topic please? My UDF is structured as follow:

DEFINE_PROFILE(pressure_realiment,t,i){ 1. Define the variables: - fp (for writing txt. file) - "target" variables (thread, ...) - accessing variables (such as F_P(f,t)) - variables used for initialization of loops and for computations (averaged values, output pressure value)

2. Loop for computing a mass averaging: begin_f_loop(f,t){}

3. Writing my results in a txt file : fp = fopen("outputfile.txt","a"); fprintf(fp, ...)

4. Implement the profile: begin_f_loop(f,t) { F_PROFILE(f,t,i) = ... }end_f_loop(f,t)

Can someone tell me which part must be included in which if-loop (I mean: if HOST, if !HOST, if !NODE, ...) Tank you very much


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