CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF for reading dat files (http://www.cfd-online.com/Forums/fluent-udf/66161-udf-reading-dat-files.html)

mrestrepo30 July 7, 2009 17:11

UDF for reading dat files
 
Hi,
I wrote a UDF to read some velocity values from a .dat file, and the values are represented in 3 columns for each one of the XYZ components. In the UDF I'm using standard C functions (fopen, fscanf, etc).
When I execute the UDF (on demand) in Fluent, I can read up to the row number 1169 (out of 3800); however, when I get to the line 1170, I get the following message:

-************************************************** *******
/home/local/Fluent.Inc/fluent6.3.26/lnamd64/3d/fluent.6.3.26[0xdd6fcb]
/homPlease include this information with any bug report you file on this issue!
================================================== ========
/home/local/Fluent.Inc/fluent6.3.26/bin/fluent: line 4820: 4012 Segmentation fault $NO_RUN $EXE_CMD $CX_FLAGS
e/local/Fluent.Inc/fluent6.3.26/lnamd64/3d/fluent.6.3.26[0xdd6f21]
/lib64/tls/libpthread.so.0[0x3d2df0c4f0]
libudf/lnamd64/3d/libudf.so(read_vel+0xbd)[0x2a962a85c1]
The fluent process could not be started.
-************************************************** *******

Furthermore, in the line 1130 I get always the message:

************************************************** ********
Stack backtrace generated for process id 4012 on signal 1 :
************************************************** ********

Does anyone knows why I keep getting the error and maybe has any suggestion to what should I implement in order to avoid this and read the whole *.dat file???

Thanks!!!

shankara.2 July 9, 2009 16:38

Hi

I've encountered this error so many times over the last 3 months and finally managed to solve it. I'm just telling you what I've gathered so far about this error.
There's usually no specific reason that causes this error. It could be anything from whether you are compiling your udf or interpreting it, whether you have the right zone id, right domain number. Also, depends on whether you are using parallel or serial solver because if you're using parallel solver, you need #if RP_HOST and # endif commands to enclose the working section of your udf. Most importantly, what is changing between the lines 1169 and 1700? I'm no expert but if your problem physics and UDF are correct, it's usually one of the things that I mentioned above. Good luck.

mrestrepo30 July 9, 2009 16:47

Thanks shankara.2!

Actually I solved the problem by just increasing the size of the array where I'm saving the velocities from the dat file... Now the size is larger than what I needed in first place. But thanks again for your response.


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