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

udf compilation in cluster(linux)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 24, 2017, 01:35
Default udf compilation in cluster(linux)
  #1
New Member
 
Moulish Kommu
Join Date: Jan 2017
Posts: 6
Rep Power: 2
moulish is on a distinguished road
Hi,

I am solving 2D combustion problem, supplying udf for surface reaction. when I compile the udf in my local computer (windows OS) its running successfully. but if I use the same udf to give the job in cluster (linux) its showing error.


# building library in lnamd64/2ddp_host
make[1]: Entering directory `/IITM_GPFS_FS2/userfs2/ms/ch15s002/virgo/libudf/lnamd64/2ddp_host'
# Generating udf_names.c because of Gerhard_selle_UDF.c
make[2]: Entering directory `/IITM_GPFS_FS2/userfs2/ms/ch15s002/virgo/libudf/lnamd64/2ddp_host'
make libudf.so "CFLAGS=-D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= " "LDFLAGS=-shared -lm"
make[3]: Entering directory `/IITM_GPFS_FS2/userfs2/ms/ch15s002/virgo/libudf/lnamd64/2ddp_host'
# Compiling udf_names.o because of udf_names.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/sware/ansys16.1/ansys_inc/v161/fluent/fluent16.1.0/`expr "\`pwd\`" : '.*/\(.*\)/[23].*'`/`basename "\`pwd\`"` -
# Compiling Gerhard_selle_UDF.o because of Gerhard_selle_UDF.c
cc -D_lnamd64 -D_GNU_SOURCE -fpic -shared -ansi -Wall -O -DPTR_RESTRICT= -I/sware/ansys16.1/ansys_inc/v161/fluent/fluent16.1.0/`expr "\`pwd\`" :


Gerhard_selle_UDF.c: In function my_rate:
Gerhard_selle_UDF.c:46: error: expected expression before / token
Gerhard_selle_UDF.c:65: error: expected expression before / token
Gerhard_selle_UDF.c:24: warning: unused variable x
make[3]: *** [Gerhard_selle_UDF.o] Error 1
make[3]: Target `libudf.so' not remade because of errors.
make[3]: Leaving directory `/IITM_GPFS_FS2/userfs2/ms/ch15s002/virgo/libudf/lnamd64/2ddp_node'
make[2]: *** [lnamd64] Error 2
make[2]: Leaving directory `/IITM_GPFS_FS2/userfs2/ms/ch15s002/virgo/libudf/lnamd64/2ddp_node'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/IITM_GPFS_FS2/userfs2/ms/ch15s002/virgo/libudf/lnamd64/2d
moulish is offline   Reply With Quote

Old   February 24, 2017, 05:25
Default
  #2
Senior Member
 
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 2
KevinZ09 is on a distinguished road
It's giving you an indication of what the error is:

Quote:
Originally Posted by moulish View Post
Gerhard_selle_UDF.c: In function my_rate:
Gerhard_selle_UDF.c:46: error: expected expression before / token
Gerhard_selle_UDF.c:65: error: expected expression before / token
Gerhard_selle_UDF.c:24: warning: unused variable x
So I'd suggest to have a look there.

Also, were you performing a serial run before and now intend to run it in parallel? Because to use UDFs in parallel simulations, you probably need to modify it (unless your initial UDF was parallel-proof).
KevinZ09 is offline   Reply With Quote

Old   February 24, 2017, 06:14
Default
  #3
New Member
 
Moulish Kommu
Join Date: Jan 2017
Posts: 6
Rep Power: 2
moulish is on a distinguished road
Thank you very much Kevin.
I got it correct after removing the one extra comment line ( starts with //). but i still dont understand why it didnt show any error when I ran in windows system.
moulish is offline   Reply With Quote

Old   February 24, 2017, 06:59
Default
  #4
Senior Member
 
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 2
KevinZ09 is on a distinguished road
Probably has to do with how different compilers treat the // comment indicator. I believe it's always safer to use /* and */, because sometimes comments after // still get broken in multiple lines. Plus, I think it's more readable, at least I think so.
KevinZ09 is offline   Reply With Quote

Reply

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
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 08:26
Udf Compilation problem mystical_kaledioscope Fluent UDF and Scheme Programming 0 July 22, 2014 14:52
UDF Compilation mystical_kaledioscope Fluent UDF and Scheme Programming 0 July 21, 2014 11:37
UDF compilation/ platform issue! Help!! :s lmarf88 Fluent UDF and Scheme Programming 4 April 11, 2014 13:11


All times are GMT -4. The time now is 21:25.