CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Help with Define on Demand UDF in Parallel (http://www.cfd-online.com/Forums/fluent/45621-help-define-demand-udf-parallel.html)

Mahesh August 6, 2007 09:20

Help with Define on Demand UDF in Parallel
 
Hello!

I am trying to compile a simple UDF (mentioned below) on a 64 bit 4 processors Linux Machine.

The default interconnect is ethernet.

The UDF runs well on series. In parallel, I am able to build and load the library successfully. I checked it created a 3ddp_node and 3ddp_host directory in the lnamd64 (architecture) folder. But when I try to hook the library in the with the case file it give this error

Primitive Error at Node 0: received Segmentation Violation

connect to address 10.1.1.249: Connection refused

connect to address 10.1.1.249: Connection refused

trying normal rsh (/usr/bin/rsh)

connect to address 10.1.1.249: Connection refused

connect to address 10.1.1.249: Connection refused

trying normal rsh (/usr/bin/rsh)

The UDF is:

#include "udf.h"

DEFINE_ON_DEMAND(myfunction)

{

Domain *d;

Thread *t;

d=Get_Domain(1);

t=Lookup_Thread(d,4);

F_T(2,t)=100;

F_T(98,t)=5000;

}

I couldnot sort out the error. Please guide. Any help is highly appreciable

Thanks and Regards

Mahesh

Joe August 6, 2007 12:21

Re: Help with Define on Demand UDF in Parallel
 
Your networking is not set up correctly.

Check you can ping and rsh to each node. Test each node to all the other nodes.

Mahesh August 7, 2007 05:34

Re: Help with Define on Demand UDF in Parallel
 
Hello Joe

Thanks for your input, I will contact our system administrator to check about the same. But before I was able to run fluent in parallel(without a UDF) on these same nodes. Does inclusion of UDF needs further modification in network settings.

Some further queries, when we run fluent in parallel the grid gets divided on different nodes then if we want to access a particular face, knowing its local face index(face_t f) before running in parallel, is it possible to access that face with the same index or after grid division each node has its own thread and consequent face id.

Basically I am facing problem when I try to communicate between nodes like sending no of face elements to node0. An eg UDF is mentioned below.

#include "udf.h"

DEFINE_ON_DEMAND(myfunction)

{

Domain *d;

Thread *t;

face_t f;

int n_faces;

d=Get_Domain(1);

t=Lookup_Thread(d,4);

n_faces=THREAD_N_ELEMENT_INT(t)

#if RP_NODE

if (! I_AM_NODE_ZERO_P)

{

PRF_CSEND_INT(node_zero, n_faces, 1, myid);

}

Message0("\nTotal no. of faces at top boundary are %d \n",n_faces);

#endif

#endif

}


All times are GMT -4. The time now is 19:00.