CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   libudf error: undefined symbol: (https://www.cfd-online.com/Forums/fluent/50603-libudf-error-undefined-symbol.html)

Prashanth February 18, 2009 20:16

libudf error: undefined symbol:
 
I am compiling an UDF for a particle deposition study. I am getting the following error though my UDF gets compiled with just a few warnings and no error.

Opening library "libudf"...Error: libudf/lnamd64/3d_host/libudf.so: undefined symbol: dpm_scalupError: libudf/lnamd64/3d_node/libudf.so: undefined symbol: dpm_scalupError:

Primitive Error at Node 0: open_udf_library: no error /nfs/14/osu5206/.bashrc: line 1: module: command not found

I am posting my UDF below. Please let me know if Im missing something. The same UDF was compiling perfectly and the library was also loading yesterday. I just changed some parts of my code to comments and now Im having this problem.

#include "udf.h" #include "dpm.h" #define nu_s 0.27 #define nu_p 0.27 #define YMIN 0.0 #define YMAX 0.4 #define UMEAN 1.0 #define B 1./7. #define DELOVRH 0.5 #define VISC 1.7894e-05 #define RGAS (UNIVERSAL_GAS_CONSTANT/MW) #define Tdatum 288.15

/*Domain *domain; /*Get domain pointer and assign later to domain*/ /*int UDM_checked = 0; /*availability of UDMLs checked*/ /*void reset_UDM_s(void);

DEFINE_DPM_BC(deposition_bc, p, thread, f, f_normal, dim) { real crit_vel,alpha,Tavg,Ep,vcr; real norm_coeff=1.; real tang_coeff=1.; real vn=0.; real R=287.; Thread *t; real normal[3]; int i,idim=dim; real Cu,cbar,lamda,kn; real Wa = 0.039; real x[ND_ND];

for (i=0.; i<idim; i++)

normal[i] = f_normal[i];

if(p->type==DPM_TYPE_INERT)

{

alpha = M_PI/2. - acos(MAX(-1.,MIN(1.,NV_DOT(normal,p->state.V)/ MAX(NV_MAG(p->state.V),DPM_SMALL))));

if ((NNULLP(t)) && (THREAD_TYPE(t) == THREAD_F_WALL))

F_CENTROID(x,f,t);

/*computing normal velocity*/

for(i=0.;i<idim;i++)

vn += p->state.V[i]*normal[i];

/*computing critical velocity*/

Tavg = (F_T(f,t)+P_T(p))/2.;

Ep = (3.*(pow(10.,20.)))*exp(-0.02365*Tavg);

vcr = pow(((2.*Ep)/P_DIAM(p)),(10./7.));

int cntr=0.;

/*particle continues its path - no sticking*/

if (vn > vcr)

return PATH_ACTIVE;

else

{

F_UDMI(f,t,0) += P_MASS(p); /*mass of particles deposited*/

F_UDMI(f,t,1) += 1.; /* No. of particles deposited*/

return PATH_ABORT;

}

/* DEFINE_ON_DEMAND(reset_UDM) { domain = Get_Domain(1); reset_UDM_s(); }

*/


mange February 20, 2009 08:50

Re: libudf error: undefined symbol:
 
it seems you do not have matching /* */ . try to remove that first comment line.

/m

Prashanth February 20, 2009 10:59

Re: libudf error solved - SEGMENTATION ERROR now
 
Hi

Thanks for the reply. I did take out all my comments and try the code as it is. It compiled perfectly without any error but when I run the case with my UDF as my wall boundary condition, I get a new error as follows:

Stack backtrace generated at node 1. Report bug to administrator. Process violation at node 1: Segmentation error

How do I get around this error?


mange February 20, 2009 11:08

Re: libudf error solved - SEGMENTATION ERROR now
 
if you run in parallel you need to put

#if !RP_HOST #endif

around your code. because the host process does not have access to the data.

/M

Prashanth February 24, 2009 20:04

Re: libudf error solved - SEGMENTATION ERROR now
 
Hi

I included the above mentioned commands in my code. Now I'm getting the same SEGMENTATION ERROR with additional message before it as below:

Stack Backtrace Generated at node ... of process id.. Please include this information about the bug when you contact administrator.

What does this mean? I'm really at a dead end right now as I have checked and re-checked my UDF and it seems to be right. Please let me know your thoughts. I can send you my UDF if that would help.

almostafa67 July 28, 2010 07:03

a way out of this problem
 
if u have some errors in ur udf,FLUENT will show this error,I used FLUENT 6.3 to compile my udf but i faced this error,And i could not get rid of this error till i used ansys 12.0 and ansys showed me that i had some syntax error in my udf, i corrected them then compiled udf,and eventually thank GOD it compiled without any error.:)


All times are GMT -4. The time now is 18:51.