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

Fluent UDF on parallel computing

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2013, 08:39
Default I think there is a varaible lock
  #21
New Member
 
Saâd Debbahi
Join Date: Oct 2010
Posts: 26
Rep Power: 15
QBeast is on a distinguished road
Send a message via Yahoo to QBeast
Hi,

I faced this problem when trying to run udf in parallel mode, pay attention to the code enclosed between the parallel directives (if RP_NODE......end if), within this code section "try to eliminate instructions that modify common variables values".

her is an illustrative example

Code:
real k_sqr,kx,ky,kz,amp;

#if RP_NODE
k_sqr=kx*kx+ky*ky+kz*kz;
amp=2;

#end if
when running such code, these operations

Code:
k_sqr=kx*kx+ky*ky+kz*kz;
amp=2;
are going to be performed by all the computing nodes, for example when "node 1" accesses the variable k_sqr to modify it according to the formula of k_sqr, the system locks this very same variable/resource so that the access to it is denied to all of the other nodes once one of them is using k_sqr, this is a lock on this resource, which can't be manipulated by more than one process "simultaneously". I think the error is due to the access denial for the nodes trying to perform the parallel tasks while variables are used/locked by a very specific node. your last post confirms it

Code:
999999 (../../src/mpsystem.c@1123): mpt_read: failed: errno = 104

999999: mpt_read: error: read failed trying to read 30 bytes: Connection reset by peer

The fluent process could not be started.
it sais failed to read 30 byte.
QBeast is offline   Reply With Quote

Old   December 20, 2013, 11:06
Default Convert a serial UDF to parallel
  #22
Senior Member
 
Tanjina Afrin
Join Date: May 2013
Location: South Carolina
Posts: 169
Rep Power: 12
Tanjina is on a distinguished road
Dear All,

This is my serial UDF. After reading the manual I am getting confused with int ex node and stuff. Could anyone please convert this UDF to parallel? It is working properly for serial system.

#include "udf.h"

DEFINE_PROFILE(pressure_profile,t,i)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y=x[1];
F_PROFILE(f,t,i)=(0.4898-y)*998.2*9.81;
}
end_f_loop(f,t)
}

And I will use Cluster which is in Linux system. How can I make the UDF visible to every node??

Thanks a ton in advance.

Tanjina
Tanjina is offline   Reply With Quote

Old   August 12, 2015, 07:44
Exclamation parallel
  #23
New Member
 
frety
Join Date: Jul 2015
Posts: 9
Rep Power: 10
jose_zola is on a distinguished road
hey
can anyone could help me to make my udf parallel?

DEFINE_PROFILE(porosity_function,t,j){
real x[ND_ND];
cell_t c;
begin_c_loop(c,t){
C_CENTROID(x,c,t);
if(pow((x[1]-yo[0])/R,2)+pow((x[0]-xo[0])/R1[0],2)<=1 )
F_PROFILE(c,t,j)=0.9;
else
F_PROFILE(c,t,j)=0.1;
}
end_c_loop(c,t)
}
jose_zola is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel computing in Fluent 6.3 Poovanna FLUENT 2 February 18, 2011 09:17
Transient pressure UDF for parallel fluent droberts Fluent UDF and Scheme Programming 5 October 11, 2010 04:13
udf on parallel fluent stud Main CFD Forum 0 December 12, 2008 07:45
problem!! FLUENT 6.2 -SUSE parallel computing khanjaved FLUENT 1 August 15, 2005 22:00
UDF in parallel version. yobee FLUENT 0 August 17, 2004 04:12


All times are GMT -4. The time now is 08:49.