|
[Sponsors] |
July 7, 2009, 18:11 |
UDF for reading dat files
|
#1 |
Member
Join Date: Jun 2009
Posts: 31
Rep Power: 17 |
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!!! |
|
July 9, 2009, 17:38 |
|
#2 |
New Member
Prashanth
Join Date: Apr 2009
Posts: 19
Rep Power: 17 |
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. |
|
July 9, 2009, 17:47 |
|
#3 |
Member
Join Date: Jun 2009
Posts: 31
Rep Power: 17 |
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. |
|
Tags |
dat files, fault, fscanf, segmanetation, stack backtrace |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 08:21 |
OpenFOAM15 paraFoam bug | koen | OpenFOAM Bugs | 19 | June 30, 2009 11:46 |
Associating profile files for the UDS though a UDF | Bharath | FLUENT | 0 | December 1, 2006 16:58 |
[making animations] fclose fails to close files? | Mika | FLUENT | 0 | March 30, 2001 09:19 |
UDF files | don joe | FLUENT | 0 | March 13, 2001 14:42 |