CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   DEFINE_INIT parallel udf error during solution initialization (https://www.cfd-online.com/Forums/fluent-udf/115083-define_init-parallel-udf-error-during-solution-initialization.html)

nadesan March 23, 2013 09:37

DEFINE_INIT parallel udf error during solution initialization
 
hi,

I wrote a parallel udf to initialize the x, y and z velocity, for a 3D open channel flow case, using "DEFINE_INIT". Following is my code

#include "udf.h"
#include "metric.h"
#include "mem.h"
#define ymax 0.001
DEFINE_INIT(flow_field,d)
{
#if !RP_HOST
face_t f;
Thread *tf;
real x[ND_ND];
real y;
/**loop over all face threads in the domain**/
thread_loop_f(tf,d)
{
/**loop over all faces in the face thread**/
begin_f_loop(f,tf)
if PRINCIPAL_FACE_P(f,tf)
{
F_CENTROID(x,f,tf);
y=x[1];
F_U(f,tf)=(ymax+y)*(ymax-y)*48.6/(ymax*ymax);
F_V(f,tf)=0.0;
F_W(f,tf)=0.0;
}
end_f_loop(f,tf)
}
#endif
}

The code is in tact while compiling and loading. But while i am initializing the solution i am getting an error which reads
"stack backtrace generated for node id=0 (pid=17332) on signal 11"
.
.
.
.
.
.
.
.
.
.

999999: mpt_read:error:read failed trying to read 4 bytes: Resource temporarily unavailable.
The fluent process could not be started
....

Could someone please throw some light on this issue. Your help is much appreciated

Thanks a lot
Rgds
nadesan

Kanarya May 28, 2013 13:06

Hi nadesan,

Did you solve the problem?

thanks!
Quote:

Originally Posted by nadesan (Post 415868)
hi,

I wrote a parallel udf to initialize the x, y and z velocity, for a 3D open channel flow case, using "DEFINE_INIT". Following is my code

#include "udf.h"
#include "metric.h"
#include "mem.h"
#define ymax 0.001
DEFINE_INIT(flow_field,d)
{
#if !RP_HOST
face_t f;
Thread *tf;
real x[ND_ND];
real y;
/**loop over all face threads in the domain**/
thread_loop_f(tf,d)
{
/**loop over all faces in the face thread**/
begin_f_loop(f,tf)
if PRINCIPAL_FACE_P(f,tf)
{
F_CENTROID(x,f,tf);
y=x[1];
F_U(f,tf)=(ymax+y)*(ymax-y)*48.6/(ymax*ymax);
F_V(f,tf)=0.0;
F_W(f,tf)=0.0;
}
end_f_loop(f,tf)
}
#endif
}

The code is in tact while compiling and loading. But while i am initializing the solution i am getting an error which reads
"stack backtrace generated for node id=0 (pid=17332) on signal 11"
.
.
.
.
.
.
.
.
.
.

999999: mpt_read:error:read failed trying to read 4 bytes: Resource temporarily unavailable.
The fluent process could not be started
....

Could someone please throw some light on this issue. Your help is much appreciated

Thanks a lot
Rgds
nadesan


blackmask May 28, 2013 21:12

I am not sure whether the error is caused by but not all the face threads store U/V/W. BTW, I do not understand why nadesan did nothing about the cell values.

foolstone June 4, 2013 21:55

yep.

I have this error when I was running a very simple parallel case without any UDF.
the case can run successfully in serial, but failed parallel.



Quote:

Originally Posted by blackmask (Post 430628)
I am not sure whether the error is caused by but not all the face threads store U/V/W. BTW, I do not understand why nadesan did nothing about the cell values.



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