|
[Sponsors] |
May 15, 2019, 06:36 |
Parallelizing UDF problem
|
#1 |
New Member
Join Date: Nov 2018
Posts: 14
Rep Power: 8 |
Hello UDF experts,
I'm trying to parallelize my code. In my code there are loop over cells. In the UDF manual there is written hat the loop over cells have to be inside the #IF !RP_HOST and if I want to have a loop all over the cells I have to use the begin_c_loop_int_ext. The software is running in this way but if I print the IDs of the cells in the loop it is showing less values (1/5 if I'm using 5 cores). I've red the manual, but I can't really figure out how to do it properly. Any suggestion? Any advice would be appreciated. Thanks |
|
May 15, 2019, 23:25 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
there is no begin_c_loop_int_ext macro but begin_c_loop_int or begin_c_loop_ext
how do you print ID's of cells? is it possible that fluent divide domain on 5 parts and count cells separately? best regards |
|
May 20, 2019, 05:18 |
|
#3 |
New Member
Join Date: Nov 2018
Posts: 14
Rep Power: 8 |
Thank you for your answer,
in the UDF guide it is written that begin_c_loop_int_ext can be used. It is also compiling, so I think it exists. This is exactly the problem. I have 5 processors, fluent is dividing the domain in 5 parts and it is taking the variables only from the first part. I'm printing with Messege0("%f", variable). Is there a way to connect all the parts or is there a way according to you to loop all over the cells? The begin_c_loop_int_ext, if exists, is not not working in this way. Thank you |
|
May 20, 2019, 06:03 |
|
#4 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
use begin_c_loop to loop over all cell/threads best regards |
||
May 21, 2019, 06:17 |
|
#5 |
New Member
Join Date: Nov 2018
Posts: 14
Rep Power: 8 |
Okay, the begin_c_loop seems working properly, but Message is giving back a mess... it is printing something that has no sense, but after the begin_c_loop also Message0 seems better.
Thank you |
|
September 15, 2021, 11:03 |
|
#6 | |
New Member
Wang Changjun
Join Date: Mar 2018
Posts: 5
Rep Power: 8 |
Quote:
Hi, Did you solve your problem? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
Vaporization pressure UDF property problem? | lehoanganh07 | Fluent UDF and Scheme Programming | 1 | September 13, 2014 11:59 |
Help, parallelizing UDF problem. | blivurmind | Fluent UDF and Scheme Programming | 2 | July 24, 2009 12:40 |
Help, parallelizing UDF problem | blivurmind | FLUENT | 0 | July 9, 2009 22:39 |