CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   thread pointer comparison crash in Fluent UDF (http://www.cfd-online.com/Forums/main/15651-thread-pointer-comparison-crash-fluent-udf.html)

Miriam August 31, 2008 16:40

thread pointer comparison crash in Fluent UDF
 
Dear all,

I wrote a UDF to be used in Fluent 6.3, it did not give any problem during the compilation process, but as soon as the simulation started it stopped giving the following error:

iter continuity x-velocity y-velocity z-velocity

uds-0 time/iter

6016 4.7173e-06 1.1117e-07 1.2179e-06 1.8832e-07 0.0000e+00 0:00:00 100

================================================== ============================ Stack backtrace generated for process id 11798 on signal 1
: Please include this information with any bug report you file on this issue! ================================================== ============================

/home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26[0x8892a97] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26[0x889292a] [0xffffe420] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26[0x8180cd9] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26[0x81d22c5] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0xb6f)[0x88c6286] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0xb6f)[0x88c6286] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0xd4a)[0x88c6461] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0xf0b)[0x88c6622] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26[0x88c689a] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval_errprotect+0x41)[0x88c694b] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0xb6f)[0x88c6286] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0x2f3)[0x88c5a0a] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0x102a)[0x88c6741] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26(eval+0xf0b)[0x88c6622] /home/miriam/bin/Fluent.Inc/fluent6.3.26/lnx86/3ddp/fluent.6.3.26[0x88c689a]

Error: fluent.6.3.26 received a fatal signal (SEGMENTATION VIOLATION). Error Object: #f

I commented all the source code, removing the comments line by line, in order to identify the problematic instruction. The code line that causes the crash is the following one:

************************************************** ** if (C_FACE_THREAD(C0_B, T0_B, n) == Lookup_Thread(domain, ID_B))

*************************************************

In which I performed the comparison between the pointer to the thread of faces for a certain face (belonging to cell with index C0_B and thread T0_B) with a pointer to the thread of boundary faces, identified by zone number ID_B. This comparison aims at assessing whether the face of the cell belongs to the boundary corresponding to the zone number ID_B.

In C the comparison between pointers is allowed, so why in this case it creates this problem? Could please anyone help me?

Thanks a lot in advance

Miriam



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