|
[Sponsors] |
June 15, 2016, 12:38 |
received signal SIGSEV
|
#1 |
Member
ERMACORA Florian
Join Date: May 2016
Posts: 39
Rep Power: 10 |
Hello
I have an error "Process 60025:received signal SIGSEV" . I find it's due to a program try to access a memory location which is not allowed. So I allow a User defined memory location and a user defined node memory location but without success. It's my UDF: Code:
#include "udf.h" #include "unsteady.h" #include "math.h" DEFINE_GRID_MOTION(position_piston,domain,dt,time,dtime) { #if PARALLEL static Thread *tf; static face_t f; static Node *v; static int n; static real t; static real L,A,WS; L = 0.06; /* m Connecting rod lenght*/ A = 0.054; /* m piston stroke */ WS = 60; /* rpm Crank shaft speed */ t = CURRENT_TIME; begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v = F_NODE(f,tf,n); if (NODE_POS_NEED_UPDATE (v)) /*the current node has not been previously visited when looping through previous faces */ { NODE_Y(v)=L+((A/2)*(1-cos(t*WS*M_PI/30)))-sqrt((L*L)-((A*A)*(sin(t*WS*M_PI/30)*sin(t*WS*M_PI/30))/4)); } } } end_f_loop(f,tf); #endif } |
|
June 15, 2016, 20:34 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
You haven't used user-defined memory and therefore don't require allocating memory for UDM. Why are you restricting the DEFINE_GRID_MOTION macro to parallel (with the #if PARALLEL preprocessor directive)? Are you running Fluent in serial or parallel? The host process would still execute the code; the only thing this conditional statement is achieving is avoiding mesh motion in serial mode. Face looping macros are skipped over by the host node anyway; you don't require any special parallel considerations for this macro.
If you're checking if the node has already been updated, then you should tell Fluent that it has been updated (shouldn't practically matter as the node movement is absolute and not dependent on its current position): Code:
if (NODE_POS_NEED_UPDATE (v)) /*the current node has not been previously visited when looping through previous faces */ { NODE_Y(v)=L+((A/2)*(1-cos(t*WS*M_PI/30)))-sqrt((L*L)-((A*A)*(sin(t*WS*M_PI/30)*sin(t*WS*M_PI/30))/4)); NODE_POS_UPDATED(v); } Code:
Thread *tf = DT_THREAD((Dynamic_Thread *)dt); |
|
June 16, 2016, 05:40 |
|
#3 | |
Member
ERMACORA Florian
Join Date: May 2016
Posts: 39
Rep Power: 10 |
Quote:
|
||
June 16, 2016, 08:43 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Which three compiler directives are you using now? You don't need to use any for this UDF code. Read the UDF manual on parallelising if you're interested. Ensure you're recompiling correctly by checking my compiling process for Fluent UDFs with an existing library loaded.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Node 0: Process 15088: Received signal SIGSEGV. | hasib61 | FLUENT | 7 | September 4, 2022 02:25 |
[ImmersedBoundary] About the moving immersed boundary tutorial: icoDyMIbFoam+movingCylinderInChannelIco | wyldckat | OpenFOAM Community Contributions | 25 | September 14, 2021 18:15 |
Free Surface Ship Flow | timfranke | OpenFOAM Running, Solving & CFD | 322 | March 3, 2021 10:04 |
fluentError: received a fatal signal (Segmentation fault). | thomaszhangjing | Fluent UDF and Scheme Programming | 11 | January 13, 2021 10:37 |
VOF Transient Error | rkanesan | OpenFOAM Running, Solving & CFD | 0 | November 13, 2014 20:38 |