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

Parallelizing UDF problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2019, 05:36
Default Parallelizing UDF problem
  #1
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 7
pianaCFD is on a distinguished road
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
pianaCFD is offline   Reply With Quote

Old   May 15, 2019, 22:25
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   May 20, 2019, 04:18
Default
  #3
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 7
pianaCFD is on a distinguished road
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
pianaCFD is offline   Reply With Quote

Old   May 20, 2019, 05:03
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Quote:
Message0 will send messages from compute
node-0 only and is ignored on the other compute nodes, without having to use a compiler directive.
use Message to get output from all nodes

use begin_c_loop to loop over all cell/threads

best regards
AlexanderZ is offline   Reply With Quote

Old   May 21, 2019, 05:17
Default
  #5
New Member
 
Join Date: Nov 2018
Posts: 14
Rep Power: 7
pianaCFD is on a distinguished road
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
pianaCFD is offline   Reply With Quote

Old   September 15, 2021, 10:03
Default
  #6
New Member
 
Wang Changjun
Join Date: Mar 2018
Posts: 5
Rep Power: 8
Wang Changjun is on a distinguished road
Quote:
Originally Posted by pianaCFD View Post
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

Hi,

Did you solve your problem?
Wang Changjun is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


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 06:05
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
Vaporization pressure UDF property problem? lehoanganh07 Fluent UDF and Scheme Programming 1 September 13, 2014 10:59
Help, parallelizing UDF problem. blivurmind Fluent UDF and Scheme Programming 2 July 24, 2009 11:40
Help, parallelizing UDF problem blivurmind FLUENT 0 July 9, 2009 21:39


All times are GMT -4. The time now is 17:36.