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

UDF Compilation Error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2020, 18:29
Default UDF Compilation Error
  #1
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 10
cwl6750084 is on a distinguished road
I compiled my UDF function, however, it comes up with the following error. I wonder if anyone understands what is the problem with it. Tried searching online but could not find anything ever relevant. The lines in red supposed to tell the problem, I think, but I do not understand what do they mean.

Thanks.


---- Error Log from Fluent ----

Copied /lustre/home/wacheng50/Flash-B//lustre/home/wacheng50/Flash-B/rkeos.c to libudf/src


Working...
for d in lnamd64/[23]*; do \
( \
cd $d; \
for f in ../../src/*.[ch] ../../src/makefile ../../src/user.udf; 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/rkeos.c in lnamd64/2ddp
# linking to ../../src/makefile in lnamd64/2ddp
# linking to ../../src/user.udf in lnamd64/2ddp

# building library in lnamd64/2ddp
make[1]: Entering directory '/lustre/home/wacheng50/Flash-B/libudf/lnamd64/2ddp'
# Generating udf_names.c because of makefile rkeos.c
make[2]: Entering directory '/lustre/home/wacheng50/Flash-B/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 '/lustre/home/wacheng50/Flash-B/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/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/main -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/addon-wrapper -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/io -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/species -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/pbns -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/numerics -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/sphysics -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/storage -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/mphase -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/bc -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/models -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/material -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/amg -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/util -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/mesh -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/udf -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/ht -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/dx -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/turbulence -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/parallel -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/etc -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/ue -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/dpm -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/dbns -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/cortex/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/client/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/tgrid/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/multiport/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/multiport/mpi_wrapper/include -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/multiport/mpi_wrapper/src -I. -c udf_names.c
No supported cpu target is set, CRAY_CPU_TARGET=x86-64 will be used.
Load a valid targeting module or set CRAY_CPU_TARGET
CC-2115 craycc: ERROR in command line
"-ansi" is an invalid command-line option.
CC-2119 craycc: ERROR in command line
The phase argument or the comma before the phase argument is missing for the -W option.
makefile:114: recipe for target 'udf_names.o' failed
make[3]: *** [udf_names.o] Error 1
# Compiling rkeos.o because of rkeos.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/main -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/addon-wrapper -I/lustre/sw/xc40ac/ansys/v162/flue
You can also see the 'log'-file in
the working directory for this compilation history

Done.
nt/fluent16.2.0/src/io -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/species -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/pbns -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/numerics -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/sphysics -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/storage -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/mphase -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/bc -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/models -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/material -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/amg -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/util -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/mesh -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/udf -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/ht -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/dx -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/turbulence -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/parallel -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/etc -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/ue -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/dpm -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/src/dbns -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/cortex/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/client/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/tgrid/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/multiport/src -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/multiport/mpi_wrapper/include -I/lustre/sw/xc40ac/ansys/v162/fluent/fluent16.2.0/multiport/mpi_wrapper/src -I. -c rkeos.c
No supported cpu target is set, CRAY_CPU_TARGET=x86-64 will be used.
Load a valid targeting module or set CRAY_CPU_TARGET
CC-2115 craycc: ERROR in command line
"-ansi" is an invalid command-line option.
CC-2119 craycc: ERROR in command line
The phase argument or the comma before the phase argument is missing for the -W option.
makefile:114: recipe for target 'rkeos.o' failed
make[3]: *** [rkeos.o] Error 1
make[3]: Target 'libudf.so' not remade because of errors.
make[3]: Leaving directory '/lustre/home/wacheng50/Flash-B/libudf/lnamd64/2ddp'
makefile:194: recipe for target 'lnamd64' failed
make[2]: *** [lnamd64] Error 2
make[2]: Leaving directory '/lustre/home/wacheng50/Flash-B/libudf/lnamd64/2ddp'
makefile:119: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/lustre/home/wacheng50/Flash-B/libudf/lnamd64/2ddp'
cwl6750084 is offline   Reply With Quote

Old   March 17, 2020, 04:17
Default OS
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Which OS and processor architecture are you using? Could you share the snapshot of following command?

uname -a
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 17, 2020, 11:42
Default
  #3
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 10
cwl6750084 is on a distinguished road
I ran the uname -a command and it gives the attached screen. It is a LINUX computer cluster running SLES 11.3.
Attached Images
File Type: jpg Uname.jpg (12.4 KB, 6 views)
cwl6750084 is offline   Reply With Quote

Old   March 17, 2020, 12:10
Default The error
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Though it appears to be something related to setting of hardware arch, which it automatically sets to x86_64, the main issue could be related to either MPI or its version. Which MPI is being used? Is it cray or some other interface?

You may try after loading PrgEnv-Intel module and setting the variable FLUENT_USE_CRAY_MPT5 = 1.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 17, 2020, 12:29
Default
  #5
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 10
cwl6750084 is on a distinguished road
Thanks for your reply. The university's system information page states, "The system uses the proprietary Aries dragonfly interconnect". Or is there anywhere I can look up that information?
cwl6750084 is offline   Reply With Quote

Old   March 17, 2020, 12:43
Default Aries Dragonfly
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Aries is Cray. So, I suppose when you submit the job, it might be using -mpi=cray as an option. That can be checked in the log or out file written by Fluent. If that is the case, then the option to set MPT5 should work. Else, you have to check first whether the UDF compiles in serial or not. If it does, then the issue is with MPI. If it does not, then it may require either some extra modules to be loaded or quite possible the gcc version is incompatible, most likely higher than it can work with.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 17, 2020, 13:56
Default
  #7
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 10
cwl6750084 is on a distinguished road
I actually compiled it in the serial version of Fluent. What do you mean by extra modules?

When compiling the code, there is a place asking for a header file. What exactly is it? I do not recall I upload any header files in the past, could that be the problem?
cwl6750084 is offline   Reply With Quote

Old   March 17, 2020, 14:45
Default Modules and Header Files
  #8
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
The option for header files is for user defined header files. You don't have to provide any until you have some of your own header files.

By modules I mean module required to setup environment or provide variables as I mentioned earlier. To load module you need to issue the following command

module load PrgEnv-Intel

This needs to be done before loading Fluent.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 17, 2020, 17:01
Default
  #9
Member
 
CWL
Join Date: Nov 2015
Posts: 58
Rep Power: 10
cwl6750084 is on a distinguished road
Thank you very much for your help. It actually helped - I did not realized that the compiler is not loaded automatically upon login. I loaded the compiler and then launched Fluent, the code compiles without any problems.
cwl6750084 is offline   Reply With Quote

Old   March 18, 2020, 05:00
Default Good
  #10
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Good that it is working now. So, the issue was due to the unavailability of compiler.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Reply


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
[swak4Foam] swak4foam openfoam 7 installation problem Andrea23 OpenFOAM Community Contributions 1 February 17, 2020 18:11
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 11:39
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 18:54
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07


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