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/)
-   -   problem with compiling boundary condition udf in parallel mode (https://www.cfd-online.com/Forums/fluent-udf/154963-problem-compiling-boundary-condition-udf-parallel-mode.html)

chem engineer June 23, 2015 06:36

problem with compiling boundary condition udf in parallel mode
 
hi everyone
I wrote a UDF for the time dependent velocity inlet in a 3D pipe. I can compile it in series mode and there is no problem but when I compile it in parallel mode I face the following error:

Deleted old libudf\ntx86\3ddp_host\libudf.dll
libudf\ntx86\3ddp_node\libudf.dll
The system cannot find the file specified.
(system "copy c:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\3ddp_host\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\3ddp_host")()
(system "copy c:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\3ddp_node\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\3ddp_node")()

Done.
"c:\Fluent.Inc\ntbin\ntx86"
cells....
Warning: The current working directory d:\lida\t e z\cfd\run\par-udf is not shared!
This may cause file open issues accross network!


Error: open_udf_library: The system cannot find the path specified.

Error Object: #f


asI perceived from other threads I should modify my UDF for parallel mode but I don't know how to do it. I will be thankful if anyone could help me with this problem. my velocity inlet is a step function of time.that is a flow entering a 3D pipe as a fully developed flow before time 10 second and the flow will stop(velocity is zero) after time 10 second. my UDF is as follows:

#include "udf.h"
#include "math.h"
DEFINE_PROFILE(unsteady_velocity_profile, t, i)
{
real current_time;
real x[ND_ND];
real y;
real z;
real a;
real n;
real Umax;
real Umean;
real R;
face_t f;
current_time = CURRENT_TIME;
begin_f_loop(f, t)
{
F_CENTROID(x,f,t);
y=x[1];
z=x[2];
n=7;
R=0.254; /* m */
Umean=10; /* m/s */
Umax=Umean*(((n+1)*(2*n+1))/(2*pow(n,2)));
a=pow((pow(y,2)+pow(z,2)),0.5);
if (current_time < 10)
{
F_PROFILE(f,t,i)=Umax*pow((1-sqrt(pow(z,2)+pow(y,2))/R),(1/n));
}
else
{
F_PROFILE(f,t,i)=0;
}
}
end_f_loop(f, t)
}

pakk June 23, 2015 07:39

Is your working folder really "d:\lida\t e z\cfd\run\par-udf", including the spaces in the folder name?
Spaces in folder names/file names give problems, so you should rename it to (for example) "d:\lida\t_e_z\cfd\run\par-udf".

chem engineer June 23, 2015 08:16

yes.it was the name of my working folder, but I renamed it and deleted the space but the error didn't changed. I think the this error and problem is not because of the working folder name.

pakk June 23, 2015 08:19

Which warning do you currently see then?

chem engineer June 23, 2015 08:22

This is the new warning:

eleted old libudf\ntx86\3ddp_host\libudf.dll
libudf\ntx86\3ddp_node\libudf.dll
The system cannot find the file specified.
(system "copy c:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\3ddp_host\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\3ddp_host")()
(system "copy c:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\3ddp_node\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\3ddp_node")()

Done.
"c:\Fluent.Inc\ntbin\ntx86"
cells.....,
Warning: The current working directory d:\lida\tez\cfd\run\par-udf is not shared!
This may cause file open issues accross network!

Opening library "libudf"...
Primitive Error at Node 3: open_udf_library: The system cannot find the path specified.


Primitive Error at Node 2: open_udf_library: The system cannot find the path specified.


Primitive Error at Node 4: open_udf_library: The system cannot find the path specified.


Primitive Error at Node 1: open_udf_library: The system cannot find the path specified.


Primitive Error at Node 0: open_udf_library: The system cannot find the path specified.


Error: open_udf_library: The system cannot find the path specified.

Error Object: #f

pakk June 23, 2015 08:28

Hmm, I don't know this... Were you able to compile other UDFs in parallel mode on this computer?

chem engineer June 23, 2015 08:32

no I can compile neither this UDF and nor others in parallel mode on my computer even another computer while I can easily compile it in series mode.:confused:

pakk June 23, 2015 08:43

Then the problem is in the installation, I know very little about that so I can't help, sorry.

chem engineer June 23, 2015 08:51

thank you for your attention; but my friends also have this problem in parallel mode and i observed other member of this site faced this problem; but the only thing i learned was that i should modify my udf to compile in parallel mode.but i don't know how.
I am waiting for other users who can help me with this problem.
thanks in advance

pakk June 23, 2015 08:58

It is true that you have to modify your code for parallel mode. But that is related to a completely different type of error message then you are getting.

You are getting the warning that the folder is not shared, that has nothing to do with the UDF itself, but with the settings of the system/installation.

chem engineer June 28, 2015 04:17

sorry for my delay in replying. I think the problem is in modifying the UDF and because I tried compiling it in several computers and the result is the same.as I studied I should modify my UDF for parallel processind. but I can't do these modifications. so I really need some one to help me modify my UDF.
I will appreciate if anyone can help me do it.

pakk June 29, 2015 06:23

Practically all functions that compile in serial mode will also compile in parallel mode. And the ones that don't, give a very different error message than the one you got.
But they may give wrong results if you don't modify them for parallel use.

If you want to solve this problem, solve your installation, because that is the cause of the problem. The UDF code is not the problem.

"Warning: The current working directory d:\lida\tez\cfd\run\par-udf is not shared!"

See, this is the problem! Not the code, but the settings of the system.


All times are GMT -4. The time now is 07:20.