CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   help, parallel udf problem (

EllenW June 26, 2009 15:54

help, parallel udf problem
Hi everyone,

I guess I still don't understand well how things work in parallel mode, so I got all kinds of problems when trying to run udfs which worked fine in the serial mode. Now I narrow down my problems into this one:

my udf has two parts: part I is reading a table of property data and store it into an array, which is done in a DEFINE_EXECUTE_ON_LOADING macro; the second part is to define a property using the data stored in the array from part I, and this is done using a DEFINE_PROPERTY macro.

when trying to run this udf in parallel mode, I used the directive #!RP_NODE on part I, since the file-read operations (fopen, fread...) normally are handled by the host or serial process.
Then I used the directive #!RP_HOST on part II, since the host process doesn't contain any grid information.

my problems are:
1. This parallelized file can be sucessfully complied, but after loading it, I found the part I of my code was not executed (I checked using a Message statement in part I)

2. If I take out part II, trying to test Part I only, then it cannot pass the complilation. I was prompted something like "improper end of file";

3. if I take out part II and take out the directive (#!RP_NODE) around part I, then I have this compliation error:
udf_names.c(7) : error C2059: syntax error : '}'
udf_names.c(8) : warning C4034: sizeof returns 0

I'm really stuck here, any suggestions from you would be helpful, especially examples (or tips) on how to handle DEFINE_EXECUTE_ON_LOADING type of macro.

Thank you in advance,

almostafa67 August 1, 2010 05:30

udf_names.c(7) : error C2059: syntax error : '}'
hello dear Ellen...
did u find your answer hot to correct this error message ( udf_names.c(7) : error C2059: syntax error : '}') that fluent have given you.know i'm facing with this problem and i want u as a Experienced person help me out...
looking forward to ur help:)

All times are GMT -4. The time now is 17:15.