CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 Display Modes
Old   December 14, 2013, 09:39
Default I think there is a varaible lock
  #21
New Member
 
Sad Debbahi
Join Date: Oct 2010
Posts: 21
Rep Power: 6
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, 12:06
Default Convert a serial UDF to parallel
  #22
Senior Member
 
Tanjina Afrin
Join Date: May 2013
Location: South Carolina
Posts: 138
Rep Power: 3
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

Reply

Thread Tools
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 On
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 10:17
Transient pressure UDF for parallel fluent droberts Fluent UDF and Scheme Programming 5 October 11, 2010 05:13
udf on parallel fluent stud Main CFD Forum 0 December 12, 2008 08:45
problem!! FLUENT 6.2 -SUSE parallel computing khanjaved FLUENT 1 August 15, 2005 23:00
UDF in parallel version. yobee FLUENT 0 August 17, 2004 05:12


All times are GMT -4. The time now is 09:31.