CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Problem with Compiling UDFs in Ansys Fluent 13 (lnx64)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 13, 2011, 14:26
Default Problem with Compiling UDFs in Ansys Fluent 13 (lnx64)
  #1
New Member
 
Join Date: Sep 2011
Location: Isfahan
Posts: 2
Rep Power: 0
Ali.beh is on a distinguished road
Hi

I am running Ansys Fluent 13.0 (lnx64) under Opensuse 11.4 (64bit). I have GCC 4.5 installed on my machine however I cannot compile any kind of UDFs (Even examples available in UDF Manual). I can interpret UDFs but for some reasons I have to use a macro that can be used only as a compiled UDF. Here is my log file:
================================================== ======
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

# building library in lnamd64/2ddp
make[1]: Entering directory `/home/ali/Projects/CleanCoal/Runs/Steady-Laminar-2Way-Gravity/libudf/lnamd64/2ddp'
# Generating udf_names.c because of makefile udf.c
make[2]: Entering directory `/home/ali/Projects/CleanCoal/Runs/Steady-Laminar-2Way-Gravity/libudf/lnamd64/2ddp'
make libudf.so "CFLAGS=-D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= " "LDFLAGS=-shared -lm"
make[3]: Entering directory `/home/ali/Projects/CleanCoal/Runs/Steady-Laminar-2Way-Gravity/libudf/lnamd64/2ddp'
# Compiling udf_names.o because of udf_names.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/cortex/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/client/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/tgrid/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/multiport/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/include -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/src -I. -c udf_names.c
cc: Warning: Option -nsi passed to ld, if ld is invoked, ignored otherwise
cc: -W option with unknown program all
make[3]: *** [udf_names.o] Error 1
# Compiling udf.o because of udf.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/cortex/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/client/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/tgrid/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/multiport/src -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/include -I/home/ali/Programs/ansys_inc/v130/fluent/fluent13.0.0/multiport/mpi_wrapper/src -I. -c udf.c
cc: Warning: Option -nsi passed to ld, if ld is invoked, ignored otherwise
cc: -W option with unknown program all
make[3]: *** [udf.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.
make[3]: Leaving directory `/home/ali/Projects/CleanCoal/Runs/Steady-Laminar-2Way-Gravity/libudf/lnamd64/2ddp'
make[2]: *** [lnamd64] Error 2
make[2]: Leaving directory `/home/ali/Projects/CleanCoal/Runs/Steady-Laminar-2Way-Gravity/libudf/lnamd64/2ddp'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/ali/Projects/CleanCoal/Runs/Steady-Laminar-2Way-Gravity/libudf/lnamd64/2ddp'

================================================== ======
I could compile UDFs long before but after getting some updates from Opensuse repositories it seems GCC does not function well. I will be grateful if someone helps me to solve this problem.

Thanks in Advance
Ali
Ali.beh is offline   Reply With Quote

Old   September 14, 2011, 15:23
Default
  #2
New Member
 
Join Date: Sep 2011
Location: Isfahan
Posts: 2
Rep Power: 0
Ali.beh is on a distinguished road
Hi

I solved the problem by modifying "makefile.udf" located in
<FLUENT PATH>/fluent13.0.0/src. I changed "CC= cc" to "CC= gcc" and now I can compile UDFs!!
Ali.beh is offline   Reply With Quote

Old   April 8, 2013, 18:12
Default
  #3
New Member
 
cfd
Join Date: Sep 2011
Posts: 3
Rep Power: 5
omid8 is on a distinguished road
Quote:
Originally Posted by Ali.beh View Post
Hi

I solved the problem by modifying "makefile.udf" located in
<FLUENT PATH>/fluent13.0.0/src. I changed "CC= cc" to "CC= gcc" and now I can compile UDFs!!
hi, i have same problem in win 7/ 64 bit.
Could you explain solution more.
thanks
omid8 is offline   Reply With Quote

Reply

Tags
compile error, fluent 13.0, linux64, udf

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansys 12.1 - Create Rotor/Stator Interface for Fluent opm ANSYS Meshing & Geometry 7 June 19, 2013 02:33
drag coefficient in ansys fluent 12.0 krishna FLUENT 18 May 2, 2013 13:29
[GAMBIT] 3.5 years overtake by Ansys: Where are the enhancements in grid generation Volker P. ANSYS Meshing & Geometry 22 January 17, 2012 18:27
Can I solve this problem by Fluent? Kai_kc FLUENT 1 October 27, 2010 05:29
export data from fluent to ansys galapago FLUENT 0 August 4, 2010 14:04


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