CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF on SGI (https://www.cfd-online.com/Forums/fluent/27819-udf-sgi.html)

Diana August 7, 2000 10:06

UDF on SGI
 
Hello

I am trying to write a UDF (Fluent 5.1) to run on my SGI Octane computer. I only have the GNU compilers - I do not have the SGI ones.

I have real problems (i.e. it doesn't work) trying to get either the interpreted or compiled udf's to 'compile'. I get an error message saying:

/Fluent.Inc/fluent5.1/src/mem.h:49: conflicting types for `cell_t'

/usr/include/sys/types.h:202: previous declaration of `cell_t'

This is for basic examples copied exactly from the examples given in the Fluent UDF guide. If I add other things, there are even more errors and conflicts.

Please Help me.

Sebastien DANIEL August 8, 2000 02:17

Re: UDF on SGI
 
Hey,

I got the same issues with different UDFs I typed but actually it is running good.

"conflicting types for 'cell_t'" seems to be a persistent bug on the UDF compiler. You can begin by checking your src and Makefile directory and ensure the user command directory is correct (I got these issue with SGI before).

Then check if you can run without 'cell_t' in your UDF. This is strange but sometime it is running after.

I hope I help you.

Sebastian

Chris August 8, 2000 12:11

Re: UDF on SGI
 
Unfortunately, both fluent and Irix are defining the symbol cell_t as a type, and the definitions are not compatible.

Your options are to either not to include one of the
definitions or changing the symbol being defined. Not including the definitions is probably not feasible, since you need the fluent cell_t definition for any non-trivial UDF, and the Irix definition is in a very common system include file (/usr/include/sys/types.h).

So the best bet is to change the symbol being defined.
Try these as the first lines in your UDF:


#define cell_t IRIX_CELL_T
#include <sys/types.h>
#undef cell_t

#include "udf.h"


Hope that helps.

Chris August 8, 2000 12:15

Re: UDF on SGI
 
Uh oh, the html didn't like my include file name.

The file name should be sys/types.h and it should be enclosed within angle brackets (less-than and greater-than signs).

#include sys/types.h

Rüdiger Schwarze August 10, 2000 04:20

Re: UDF on SGI
 
Change the compiler flags in the makefile from

CFLAGS_IRIX...= -KPIC -ansi -fullwarn -O -n32

to

CFLAGS_IRIX...= -KPIC -xansi -fullwarn -O -n32



All times are GMT -4. The time now is 19:09.