CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Problem About Running Fluent In Linux

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By Dimo
  • 1 Post By DoHander

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2010, 02:37
Default Problem About Running Fluent In Linux
  #1
New Member
 
Mitra Karami
Join Date: Feb 2010
Posts: 4
Rep Power: 16
mitra is on a distinguished road
Hi,

I ran into a problem which I can't seem to find a resolution for. I've been running FLUENT on the windows console for a while but began running it on the LINUX environment recently. Now the problem that I am getting is that I can't get my UDF running.

It ran on the windows box smoothly but the moment I switched to the LINUX box, it gives me the following error.

Error: (The directory is long so I won't copy it)/s1.cpp: line 2: syntax error
The udf I coded is extremely short and is the following:

#include "udf.h"
DEFINE_PROFILE(velocity_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];

if (y<=(0.1*0.035))
F_PROFILE(f,t,i)=1435.750179*y;
else
F_PROFILE(f,t,i)=(0.01758793970)/y;
}
end_f_loop(f,t)
}

I ran it for all my other UDFs that worked in the windows environment and still get the same error that I have a syntax error at the beginning of my code while interpreting in linux.

Has anyone experienced it?
mitra is offline   Reply With Quote

Old   March 24, 2010, 12:59
Default
  #2
New Member
 
Dimitrios Mylonas
Join Date: Apr 2009
Location: Glasgow, Scotland
Posts: 16
Rep Power: 16
Dimo is on a distinguished road
Hello,

Do you have a Compiler in Linux? If you use the same UDF from Windows to Linux, it will not be compatible.

I experienced a similar problem but I copied my UDF, opened it in the Linux Compiler/text editor (in my case it was Emacs) then saved the UDF under the same name as a .c file. After this, I set up the simulation, then when it came to interpreting ther UDF, I had no problems.

Also make sure there's no extra character appearing in the UDF when you paste it into the Linux compiler. If you see text appearing in the top, delete it and make your UDF start with # include udf.h etc...

Hope it helps!

Dimo
anieland likes this.
Dimo is offline   Reply With Quote

Old   March 26, 2010, 04:51
Default
  #3
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Hello,


So far I have succesfully worked in WINDOWS and now I am begining to work in LINUX. I want to interpret this simple code:




#include "udf.h"


DEFINE_PROPERTY(conductivity,c,t)
{
real k;
if (C_T(c,t) > 848.)
k = 90;
else
k = 180;
return k;
}



I opened this UDF with the text editor “Geany” and I saved it under the same name as a .c file, but when I try to interpret it in Fluent, I have the following error in the first line:


cpp -I”/home/isabel/Fluent.Inc/fluent6.3.26/src' -I”home/isabel/Fluent.Inc/fluent6.3.26/cortex/src” -I”home/isabel/Fluent.Inc/fluent6.3.26/client/src” -I”
Error: /home/isabel/Escritorio/conveccion6082linux.c: line 1: syntax error.


Do you think I need to instale other compiler. Which do you recommend me?
isabel is offline   Reply With Quote

Old   March 26, 2010, 06:49
Default
  #4
New Member
 
Dimitrios Mylonas
Join Date: Apr 2009
Location: Glasgow, Scotland
Posts: 16
Rep Power: 16
Dimo is on a distinguished road
Using another compiler might not necessary solve the problem. It could be that you have a space or some symbol somewhere in line 1 which gives you this error (in my case it was a square that was appearing when I copied the UDF from Windows to Linux, and I did not notice it until spending a few times the UDF!).

Clear all you don't need from the UDF, start with #include 'udf.h' and make sure there's no space or sign or symbol anywhere that should not be there.

It worked for me. I then opened Fluent and immediately interpreted the UDF before setting up the simulation and it worked. I hope it'll be the same for you. Let me know how it goes.

Dimo
Dimo is offline   Reply With Quote

Old   March 26, 2010, 09:45
Default
  #5
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
I have cleared all I don't need from the UDF. Now my UDF is this:

#include "udf.h"
DEFINE_PROPERTY(conductivity,c,t)
{
real k;
if (C_T(c,t) > 848.)
k = 90;
else
k = 180;
return k;
}



and now OpenFOAM gives error in line 2

cpp -I”/home/isabel/Fluent.Inc/fluent6.3.26/src' -I”home/isabel/Fluent.Inc/fluent6.3.26/cortex/src” -I”home/isabel/Fluent.Inc/fluent6.3.26/client/src” -I”
Error: /home/isabel/Escritorio/conveccion6082linux.c: line 2: syntax error.
isabel is offline   Reply With Quote

Old   March 26, 2010, 14:12
Default
  #6
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
This is a problem with end of line Windows versus Linux. A simple remedy is to use dos2unix command to transform your text, or use some advanced text editor as Editra. Example:

dos2unix your_program.c

Explanation:

On Windows any end of line is made by characters CR CL, on Unix, Linux and new Macs the end of line is composed only by CL.

Hope this will help,

Do
DoHander is offline   Reply With Quote

Old   March 31, 2010, 14:26
Default
  #7
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Thank you very much, DoHander. Now I can succesfully interpret my UDF using dos2unix.


Only one more question. Does anybody know what I have to do to compile my UDFs? In Windows I need a Visual C++ compiler, but in LINUX I do not know what compiler to install.

At this moment, If I try to compile a udf, I have the following error:


for d in lnx86/[23]*; do \
( \
cd $d; \
for f in ../../src/*.[ch] ../../src/makefile; do \
if [ ! -f `basename $f` ]; then \
echo "# linking to" $f "in" $d; \
ln -s $f .; \
fi; \
done; \
echo ""; \
echo "# building library in" $d; \
if [ "" = "1" ]; then \
echo "# using gcc64"; \
make ARCHC=gcc64 -k>makelog 2>&1; \
else \
if [ "" = "1" ]; then \
echo "# using gcc"; \
make ARCHC=gcc -k>makelog 2>&1; \
else \
make -k>makelog 2>&1; \
fi; \
fi;\
cat makelog; \
) \
done
# linking to ../../src/conveccion6082propiedadesvariables.c in lnx86/3d
# linking to ../../src/makefile in lnx86/3d

# building library in lnx86/3d
make[1]: se ingresa al directorio `/home/isabel/Escritorio/z/libudf/lnx86/3d'
# Generating udf_names.c because of makefile conveccion6082propiedadesvariables.c
make[2]: se ingresa al directorio `/home/isabel/Escritorio/z/libudf/lnx86/3d'
make libudf.so "CFLAGS=-fpic -shared -ansi -Wall -m32 -O " "LDFLAGS=-shared -lm -m elf_i386"
make[3]: se ingresa al directorio `/home/isabel/Escritorio/z/libudf/lnx86/3d'
# Compiling udf_names.o because of udf_names.c
cc -fpic -shared -ansi -Wall -m32 -O -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/cortex/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/client/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/tgrid/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/multiport/src -I. -c udf_names.c
# Compiling conveccion6082propiedadesvariables.o because of conveccion6082propiedadesvariables.c
cc -fpic -shared -ansi -Wall -m32 -O -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/cortex/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/client/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/tgrid/src -I/home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/multiport/src -I. -c conveccion6082propiedadesvariables.c
conveccion6082propiedadesvariables.c:1: error: expected identifier or ‘(’ before ‘/’ token
In file included from /usr/include/stdio.h:75,
from /home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/src/global.h:18,
from /home/isabel/Escritorio/Fluent.Inc/fluent6.3.26/src/udf.h:23,
from conveccion6082propiedadesvariables.c:12:
/usr/include/libio.h:332: error: expected specifier-qualifier-list before ‘size_t’
/usr/include/libio.h:364: error: expected declaration specifiers or ‘...’ before ‘size_t’
/usr/include/libio.h:373: error: expected declaration specifiers or ‘...’ before ‘size_t’
/usr/include/libio.h:493: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_sgetn’
isabel is offline   Reply With Quote

Old   March 31, 2010, 23:55
Default
  #8
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
You need to install gcc on Linux, this is the standard C compiler on Linux. Fluent will pick this by default.

Do
alfredyang likes this.
DoHander is offline   Reply With Quote

Old   April 30, 2010, 09:52
Default
  #9
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Thank you DoHander. I have instaled gcc with the command:
sudo apt-get install gcc


I have typed dos2unix function.c before compiling but when I try to compile with fluent, I have the following error.




for d in lnx86/[23]*; do \
( \
cd $d; \
for f in ../../src/*.[ch] ../../src/makefile; do \
if [ ! -f `basename $f` ]; then \
echo "# linking to" $f "in" $d; \
ln -s $f .; \
fi; \
done; \
echo ""; \
echo "# building library in" $d; \
if [ "" = "1" ]; then \
echo "# using gcc64"; \
make ARCHC=gcc64 -k>makelog 2>&1; \
else \
if [ "" = "1" ]; then \
echo "# using gcc"; \
make ARCHC=gcc -k>makelog 2>&1; \
else \
make -k>makelog 2>&1; \
fi; \
fi;\
cat makelog; \
) \
done
# linking to ../../src/linux.c in lnx86/2d
# linking to ../../src/makefile in lnx86/2d

# building library in lnx86/2d
make[1]: se ingresa al directorio `/home/isabel/Escritorio/borrar/libudfxx/lnx86/2d'
# Generating udf_names.c because of makefile linux.c
make[2]: se ingresa al directorio `/home/isabel/Escritorio/borrar/libudfxx/lnx86/2d'
make libudf.so "CFLAGS=-fpic -shared -ansi -Wall -m32 -O " "LDFLAGS=-shared -lm -m elf_i386"
make[3]: se ingresa al directorio `/home/isabel/Escritorio/borrar/libudfxx/lnx86/2d'
# Compiling udf_names.o because of udf_names.c
cc -fpic -shared -ansi -Wall -m32 -O -I/home/isabel/Fluent.Inc/fluent6.3.26/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/home/isabel/Fluent.Inc/fluent6.3.26/src -I/home/isabel/Fluent.Inc/fluent6.3.26/cortex/src -I/home/isabel/Fluent.Inc/fluent6.3.26/client/src -I/home/isabel/Fluent.Inc/fluent6.3.26/tgrid/src -I/home/isabel/Fluent.Inc/fluent6.3.26/multiport/src -I. -c udf_names.c
# Compiling linux.o because of linux.c
cc -fpic -shared -ansi -Wall -m32 -O -I/home/isabel/Fluent.Inc/fluent6.3.26/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/home/isabel/Fluent.Inc/fluent6.3.26/src -I/home/isabel/Fluent.Inc/fluent6.3.26/cortex/src -I/home/isabel/Fluent.Inc/fluent6.3.26/client/src -I/home/isabel/Fluent.Inc/fluent6.3.26/tgrid/src -I/home/isabel/Fluent.Inc/fluent6.3.26/multiport/src -I. -c linux.c
linux.c: En la función ‘moving_arc’:
linux.c:7: error: expected expression before ‘/’ token
linux.c:8: error: expected expression before ‘/’ token
linux.c:9: error: expected expression before ‘/’ token
linux.c:10: error: expected expression before ‘/’ token
linux.c:11: error: expected expression before ‘/’ token
linux.c:16: error: expected expression before ‘/’ token
linux.c:18: error: expected expression before ‘/’ token
linux.c:19: error: expected expression before ‘/’ token
linux.c:32: error: expected expression before ‘/’ token
linux.c:33: error: expected expression before ‘/’ token
linux.c:41: error: expected expression before ‘/’ token
linux.c:42: error: expected expression before ‘/’ token
linux.c:42: error: expected expression before ‘/’ token
linux.c:43: error: expected expression before ‘/’ token
linux.c:57: error: ‘x’ no se declaró aquí (primer uso en esta función)
linux.c:57: error: (Cada identificador no declarado solamente se reporta una vez
linux.c:57: error: para cada funcion en la que aparece.)
linux.c:58: error: expected expression before ‘/’ token
linux.c:58: error: expected expression before ‘/’ token
linux.c:59: error: expected expression before ‘/’ token
linux.c:60: error: expected expression before ‘/’ token
linux.c:60: error: expected expression before ‘/’ token
linux.c:64: error: ‘b’ no se declaró aquí (primer uso en esta función)
linux.c:67: error: ‘w’ no se declaró aquí (primer uso en esta función)
linux.c:67: error: ‘L’ no se declaró aquí (primer uso en esta función)
linux.c:102: error: expected expression before ‘/’ token
linux.c:105: error: ‘tramo’ no se declaró aquí (primer uso en esta función)
linux.c:116: error: expected expression before ‘/’ token
linux.c:21: aviso: variable ‘x0’ sin usar
linux.c:19: aviso: variable ‘theta3’ sin usar
linux.c:18: aviso: variable ‘theta2’ sin usar
make[3]: *** [linux.o] Error 1
make[3]: Debido a los errores, el objetivo `libudf.so' no se reconstruyó.
make[3]: se sale del directorio `/home/isabel/Escritorio/borrar/libudfxx/lnx86/2d'
make[2]: *** [lnx86] Error 2
make[2]: se sale del directorio `/home/isabel/Escritorio/borrar/libudfxx/lnx86/2d'
make[1]: *** [default] Error 2
make[1]: se sale del directorio `/home/isabel/Escritorio/borrar/libudfxx/lnx86/2d'
isabel is offline   Reply With Quote

Old   May 3, 2010, 03:55
Default
  #10
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Hello everybody,

I have succesfully compiled my UDF. I followed the instructions given in the udf manual and it runs Ok. Thank you very much.
isabel is offline   Reply With Quote

Old   March 2, 2011, 06:54
Default
  #11
New Member
 
anonymous
Join Date: Jan 2011
Posts: 12
Rep Power: 15
calvin is on a distinguished road
i am facing a similar problem
m tryin to run fluent 13 on redhat lnamd64 arch
i am getting this on erroe only
make[3]: *** [udf_names.o] Error 1
can u please help me out
many thanks and best regards
calvin is offline   Reply With Quote

Old   March 2, 2011, 07:26
Default
  #12
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Hello calvin,

Have you read the instructions of the udf manual? It helped me to successfully compile my udf's
isabel is offline   Reply With Quote

Old   October 15, 2014, 10:27
Default
  #13
New Member
 
Jenifer
Join Date: Oct 2014
Posts: 5
Rep Power: 11
768643480 is on a distinguished road
Quote:
Originally Posted by isabel View Post
Hello calvin,

Have you read the instructions of the udf manual? It helped me to successfully compile my udf's
Hi, I have meet the same problem as you. I also tried doc2unix, but still there is an error. my udf is,

#include "udf.h"
DEFINE_PROFILE(unsteady_velocity,thread,position)
{
face_t f;
real t_cycle=0.1;
real A=20.0;
real time;
begin_f_loop(f,thread)
{
real t=RP_Get_Real("flow-time")
if(t>=t_cycle)
time=(t/t_cycle-(int)(t/t_cycle))*t_cycle;
else
time=t;
if(time<=t_cycle/2.0)
F_PROFILE(f,thread,position)=A;
else
F_PROFILE(f,thread,position)=0;
}
end_f_loop(f,thread)
}

I am using ansys 14.0 fluent in Linux environment. The udf could be used in window. I had compiled my udf by vi in Linux. The error always:

cpp -I"/ansys_inc/v130/fluent/fluent13.0.0/src" -I"/ansys_inc/v130/fluent/fluent13.0.0/cortex/src" -I"/ansys_inc/v130/fluent/fluent13.0.0/client/src" -I"/ansys_inc/v130/fluent/fluent13.0.0/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "/fibus/fs3/1a/cin3179/test/dbsfile/test2.c"
Error: /fibus/fs3/1a/cin3179/test/dbsfile/test2.c: line 12: syntax error.
Error: /fibus/fs3/1a/cin3179/test/dbsfile/test2.c: line 14: syntax error.

I could not find a resolution for.
Could you help to check?
Thank you very much!
768643480 is offline   Reply With Quote

Old   September 1, 2015, 09:33
Default question of parallel udf
  #14
New Member
 
YUNONG
Join Date: Aug 2015
Posts: 1
Rep Power: 0
YUNONG is on a distinguished road
8.30.c
line 2 : syntax error . my udf has nothing wrong when it runs in my computer. But fluent says syntax error when the udf runs in another computer . hope get some helps .thanks
YUNONG is offline   Reply With Quote

Old   February 16, 2016, 13:07
Default convergence issue when running udf on linux
  #15
New Member
 
Quebec
Join Date: Jan 2016
Posts: 2
Rep Power: 0
syed_alizeb@live.com is on a distinguished road
hello,
1)i compiled the udf locally on linux (super-computer), the solution is converging perfectly till 0.05s (flow-time). after that solution is non-converged.

2)the exact same case is run on windows environment (personal-computer), it is converging perfecting through out the simulation.

The different between 1 and 2 is two different computers (but same number of core).

Any possible solution?
syed_alizeb@live.com is offline   Reply With Quote

Old   May 25, 2019, 05:55
Default
  #16
Member
 
Join Date: Aug 2018
Posts: 84
Rep Power: 7
esha is on a distinguished road
Quote:
Originally Posted by YUNONG View Post
Attachment 41809
line 2 : syntax error . my udf has nothing wrong when it runs in my computer. But fluent says syntax error when the udf runs in another computer . hope get some helps .thanks
hi, I also have met the same problem. can you please tell me how to fix it? thanks!
esha is offline   Reply With Quote

Old   May 25, 2019, 06:07
Default
  #17
Member
 
Join Date: Aug 2018
Posts: 84
Rep Power: 7
esha is on a distinguished road
while Udf is running on my computer, there is no problem. but on linux log file contains following error message. can anyone please let me know how may I solve it?

for d in lnamd64/[23]*; do \
( \
cd $d; \
for f in ../../src/*.[ch] ../../src/makefile; do \
if [ ! -f `basename $f` ]; then \
echo "# linking to" $f "in" $d; \
ln -s $f .; \
fi; \
done; \
echo ""; \
echo "# building library in" $d; \
if [ "" = "1" ]; then \
echo "# using gcc64"; \
make ARCHC=gcc64 -k>makelog 2>&1; \
else \
if [ "" = "1" ]; then \
echo "# using gcc"; \
make ARCHC=gcc -k>makelog 2>&1; \
else \
make -k>makelog 2>&1; \
fi; \
fi;\
cat makelog; \
) \
done
# linking to ../../src/1.c in lnamd64/2ddp_host

# building library in lnamd64/2ddp_host
make[1]: Entering directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_host'
make[1]: Warning: File `user.udf' has modification time 4.7e+02 s in the future
# Generating udf_names.c because of makefile 1.c
make[2]: Entering directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_host'
make[2]: Warning: File `user.udf' has modification time 4.7e+02 s in the future
make libudf.so "CFLAGS=-D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= " "LDFLAGS=-shared -lm"
make[3]: Entering directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_host'
make[3]: Warning: File `user.udf' has modification time 4.7e+02 s in the future
# Compiling udf_names.o because of udf_names.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/public/software/Ansys/v150/fluent/fluent15.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/public/software/Ansys/v150/fluent/fluent15.0.0/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/cortex/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/client/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/tgrid/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/include -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/src -I. -c udf_names.c
# Compiling 1.o because of 1.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/public/software/Ansys/v150/fluent/fluent15.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/public/software/Ansys/v150/fluent/fluent15.0.0/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/cortex/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/client/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/tgrid/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/include -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/src -I. -c 1.c
1.c: In function 'source2':
1.c:13: error: expected expression before '/' token
1.c:15: error: expected expression before '/' token
1.c: In function 'source3':
1.c:22: error: expected expression before '/' token
1.c:24: error: expected expression before '/' token
1.c: In function 'source4':
1.c:32: error: expected expression before '/' token
1.c: In function 'source5':
1.c:42: error: expected expression before '/' token
1.c: In function 'source6':
1.c:51: error: expected expression before '/' token
1.c:53: error: expected expression before '/' token
1.c: In function 'execute_at_end':
1.c:109: error: expected expression before '/' token
make[3]: *** [1.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.
make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Leaving directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_host'
make[2]: *** [lnamd64] Error 2
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_host'
make[1]: *** [default] Error 2
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_host'
# linking to ../../src/1.c in lnamd64/2ddp_node

# building library in lnamd64/2ddp_node
make[1]: Entering directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_node'
make[1]: Warning: File `user.udf' has modification time 4.7e+02 s in the future
# Generating udf_names.c because of makefile 1.c
make[2]: Entering directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_node'
make[2]: Warning: File `user.udf' has modification time 4.7e+02 s in the future
make libudf.so "CFLAGS=-D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= " "LDFLAGS=-shared -lm"
make[3]: Entering directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_node'
make[3]: Warning: File `user.udf' has modification time 4.7e+02 s in the future
# Compiling udf_names.o because of udf_names.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/public/software/Ansys/v150/fluent/fluent15.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/public/software/Ansys/v150/fluent/fluent15.0.0/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/cortex/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/client/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/tgrid/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/include -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/src -I. -c udf_names.c
# Compiling 1.o because of 1.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/public/software/Ansys/v150/fluent/fluent15.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/public/software/Ansys/v150/fluent/fluent15.0.0/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/cortex/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/client/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/tgrid/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/src -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/include -I/public/software/Ansys/v150/fluent/fluent15.0.0/multiport/mpi_wrapper/src -I. -c 1.c
1.c: In function 'source2':
1.c:13: error: expected expression before '/' token
1.c:15: error: expected expression before '/' token
1.c: In function 'source3':
1.c:22: error: expected expression before '/' token
1.c:24: error: expected expression before '/' token
1.c: In function 'source4':
1.c:32: error: expected expression before '/' token
1.c: In function 'source5':
1.c:42: error: expected expression before '/' token
1.c: In function 'source6':
1.c:51: error: expected expression before '/' token
1.c:53: error: expected expression before '/' token
1.c: In function 'execute_at_end':
1.c:87: error: expected expression before '/' token
1.c:88: error: expected expression before '/' token
1.c:96: error: expected expression before '/' token
1.c:97: error: expected expression before '/' token
1.c:98: error: expected expression before '/' token
1.c:99: error: expected expression before '/' token
1.c:100: error: expected expression before '/' token
1.c:101: error: expected expression before '/' token
1.c:70: warning: unused variable 'f_body'
1.c:62: warning: unused variable 'ft'
1.c:61: warning: unused variable 'fp'
make[3]: *** [1.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.
make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Leaving directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_node'
make[2]: *** [lnamd64] Error 2
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_node'
make[1]: *** [default] Error 2
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/home/xylcfd/tayyaba/cyl/libudf/lnamd64/2ddp_node'
esha is offline   Reply With Quote

Old   June 17, 2019, 09:08
Default
  #18
New Member
 
hassan
Join Date: Sep 2016
Posts: 2
Rep Power: 0
ahmadian is on a distinguished road
Hi,

I am using a UDF code that can successfully work in FLUENT on Windows platform. But now when I try to interpret the same code on Ubuntu version of FLUENT I encounter the following error:

sh: /ansys_inc/v182/fluent/contrib/lnamd64/cpp: No such file or directory
Error: "/home/lab31/Desktop/pressure_driven_flow/nanofluid/TiO2/NF.c": line 1: syntax error.


in my code the first line is
#include "udf.h"

so I do not think this could be the problem.

I am sure there is not any problem with my code since it is very simple. still I cannot find the problem. I really appreciate if anybody code help me with this problem.
Thanks.
ahmadian is offline   Reply With Quote

Old   June 20, 2019, 03:11
Default
  #19
Member
 
Join Date: Aug 2018
Posts: 84
Rep Power: 7
esha is on a distinguished road
Hi, I have solved my above-mentioned problem with UDF, which I did not understand for almost two weeks. The problem was I put the comments in UDF code lines just for ease. and it was not reading the code due to this. Now I have removed and it is working well. I liked to share with all of you, so If anyone comes up with this situation can try this. All the best!
esha is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent - Linux vs Windows derick FLUENT 2 August 16, 2020 12:23
fluent UDF on linux machine Min-Hua Wang Fluent UDF and Scheme Programming 6 June 29, 2013 09:41
Problem running Fluent on amd64 Manfred FLUENT 10 March 23, 2013 07:47
script file for running fluent on linux cluster Worth FLUENT 2 February 9, 2012 12:31
Problem using parallel Fluent Gustavo FLUENT 0 June 28, 2004 00:12


All times are GMT -4. The time now is 03:38.