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

Is there a limitation of memory size for UDFs?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 17, 2003, 08:51
Default Is there a limitation of memory size for UDFs?
  #1
Chen Fangzhi
Guest
 
Posts: n/a
I defined a UDF, which requires a large portion of memory. static int randn_1[100000] static int randn_2[100000] static int randn_2[100000]

Can I define three integer arraies like this? I think the needed memory size may be too large?
  Reply With Quote

Old   August 18, 2003, 04:36
Default Re: Is there a limitation of memory size for UDFs?
  #2
kim
Guest
 
Posts: n/a
hi,

If this is a normal variable in C programming, you should refer to the stack size the C compiler permit. Anyway, such a large array definitaion will ocuppy a lot of memory. Why should you do like this?
  Reply With Quote

Old   August 18, 2003, 04:42
Default Re: Is there a limitation of memory size for UDFs?
  #3
Chen Fangzhi
Guest
 
Posts: n/a
I need a list of Gaussian random numbers. I don't want to generate them by my UDF scheme as it may spend long time. I use MatLab to create 100,000 random numbers and read them into memory.

I know this method is awful. FLUENT provides a macro "gauss_random()", but I don't how to use it.
  Reply With Quote

Old   August 19, 2003, 02:46
Default Re: Is there a limitation of memory size for UDFs?
  #4
Greg Perkins
Guest
 
Posts: n/a
For large arrays it makes more sense to allocate it on the heap by using a malloc or calloc call.

is do

real *mydata;

mydata = malloc(size_of_data);

mydata[0] = x

Greg
  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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 14:42.