|
[Sponsors] |
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 13, 2011, 15:26 |
Problem with Compiling UDFs in Ansys Fluent 13 (lnx64)
|
#1 |
New Member
Join Date: Sep 2011
Location: Isfahan
Posts: 2
Rep Power: 0 |
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 |
|
September 14, 2011, 16:23 |
|
#2 |
New Member
Join Date: Sep 2011
Location: Isfahan
Posts: 2
Rep Power: 0 |
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!! |
|
April 8, 2013, 19:12 |
|
#3 |
New Member
cfd
Join Date: Sep 2011
Posts: 4
Rep Power: 15 |
||
August 27, 2018, 05:22 |
|
#4 | |
New Member
Join Date: Mar 2016
Posts: 1
Rep Power: 0 |
Quote:
Modify the first line below Code:
#----------------------------------------------------------------------# # Build targets (do not modify below this line). #----------------------------------------------------------------------# Code:
CC=cc Code:
CC=gcc |
||
Tags |
compile error, fluent 13.0, linux64, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
drag coefficient in ansys fluent 12.0 | krishna | FLUENT | 19 | April 12, 2018 01:49 |
Ansys 12.1 - Create Rotor/Stator Interface for Fluent | opm | ANSYS Meshing & Geometry | 21 | May 23, 2016 09: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 06:29 |
export data from fluent to ansys | galapago | FLUENT | 0 | August 4, 2010 15:04 |