|
[Sponsors] |
May 3, 2015, 14:47 |
Error in Parallel
|
#1 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
After compiling udf in parallel mode, the error appeared in this manner. In fact, I changed the double to single precision as mentioned in another thread, still getting the same error. How to fix this?
Thanks in advance ================================================== ============================ Node 0: Process 9872: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 1: Process 6252: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 2: Process 3308: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 3: Process 2408: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 4: Process 6792: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 5: Process 9236: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 6: Process 3832: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 7: Process 9096: Received signal SIGSEGV. ================================================== ============================ MPI Application rank 0 exited before MPI_Finalize() with status 2 The fl process could not be started. |
|
May 3, 2015, 19:09 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Here's an answer about what the SIGSEGV errors represent. If you still can't make sense of your error, perhaps post your UDF code so that we can read it.
|
|
May 4, 2015, 01:02 |
|
#3 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
Thanks for the link. The error was due to memory allocation. In fact, after allocating the memory also the same error is displaying.
I am working on supersonic flow over a cylinder with sharp edged spike placed at front. from the below code, I am trying to visualize the pattern of shock wave and viscous effects in front of the cylinder. Here is the code. I am attaching the equation as well and the equation in attached file is for 1D flow, my case is 2D. Can you help me? Code:
#include "udf.h" #include "mem.h" #include "sg.h" #include "math.h" #define M_infi 1.2 #define a 340.26 DEFINE_ADJUST(sensors,d) { #if PARALLEL Thread *t; cell_t c; real f_shock, f_viscous; real first_term, second_term; real f_spurious; f_spurious=0; d=Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) { first_term = ( - a / NV_MAG(C_P_G(c,t))) * ( (C_R(c,t) * C_U_G(c,t)[0]) + (C_U(c,t) * C_R_G(c,t)[0]) + (C_R(c,t) * C_V_G(c,t)[1]) + (C_V(c,t) * C_R_G(c,t)[1]) ); second_term = ( ( (C_U(c,t) * C_P_G(c,t)[0]) * (C_V(c,t) * C_P_G(c,t)[1]) ) * M_infi ) / ( ( sqrt( (C_U(c,t) * C_U(c,t)) + (C_V(c,t) * C_V(c,t)) ) ) * (NV_MAG(C_P_G(c,t))) ); f_shock = first_term + second_term; f_viscous = (C_MU_L(c,t)+C_MU_T(c,t)) / C_MU_L(c,t); if(f_shock>=1) { C_UDMI(c,t,0)=f_shock; } if(f_viscous>1.1) { C_UDMI(c,t,1)=f_viscous; } if((f_shock<1) && (f_viscous<=1.1)) { C_UDMI(c,t,2)=f_spurious; } } end_c_loop(c,t) } #endif } |
|
May 4, 2015, 02:26 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
You've used three UDM spaces with the IDs 0, 1 and 2. Have you enabled three UDM slots?
|
|
May 4, 2015, 03:06 |
|
#5 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
||
May 4, 2015, 03:06 |
|
#6 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
and still the error is same.
|
|
May 4, 2015, 04:28 |
|
#7 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You use the pressure gradient, which might be removed from memory by Fluent.
Did you set "solve/set/expert", as mentioned in the Fluent manual section "3.2.3.7. Gradient (G) and Reconstruction Gradient (RG) Vector Macros"? |
|
May 4, 2015, 05:29 |
|
#8 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
I did that one also but still the error is same.
solve/set/expert use alternate formulation for wall temperatures? [yes] yes Keep temporary solver memory from being freed? [yes] yes Allow selection of all applicable discretization schemes? [yes] yes Explicit underrelaxation value: [0.75] 0.75 > iter continuity x-velocity y-velocity energy k omega Cl-1-cylinder Cd-1-cylinder time/iter Library "C:\xxx\ansys15\libudf\win64\2ddp_node\libudf. dll" opened ================================================== ============================ Node 0: Process 5284: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 1: Process 6200: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 2: Process 6284: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 3: Process 8388: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 4: Process 5924: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 5: Process 7144: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 6: Process 2692: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 7: Process 7544: Received signal SIGSEGV. ================================================== ============================ MPI Application rank 0 exited before MPI_Finalize() with status 2 The fl process could not be started. |
|
May 4, 2015, 05:32 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Then I guess you need to really debug it in the hard way.
Add messages like "Code ran to here", to find out when your code gives errors. |
|
May 4, 2015, 09:48 |
|
#10 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
Thank you
Ok.. May be.... I resolved that equation properly. Let me check it once again. I have a doubt in the above code, To find out the du/dx, this macro is correct right? C_U_G(c,t)... I used the same macro earlier but it had yielded compilation error "real[2] .....". After that I added C_U_G(c,t)[0] and did not yield any error. I feel like this may be the problem. |
|
May 4, 2015, 10:04 |
|
#11 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
C_U_G(c,t) is the gradient of the x-component of the velocity.This is a vector, so it has three components. The three components are dux/dx=C_U_G(c,t)[0], dux/dy=C_U_G(c,t)[1] and dux/dz=C_U_G(c,t)[2]. I don't know if that is the same as your "du/dx", because I don't know exactly what that is. I am not stupid, so of course I can see it is some derivative of some velocity, but the notation is exact enough to see if this is a scalar, a tensor or a vector. (Does it have 1 component, 3 or 9?) |
||
May 4, 2015, 10:36 |
|
#12 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
I have just debugged the code and there is a problem in the first_term (code) statement.
In the first term of RHS of eqn, there is term (du/dx * rho) + (d(rho)/dx * u) The resultant term is the vector in this case because du/dx and d(rho)/dx are velocity gradient vector and density gradient vector respectively. Now can you explain this? |
|
May 4, 2015, 10:39 |
|
#13 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It seems to me that you have already explained that it is a vector. I don't understand what it is you would like me to explain.
|
|
May 6, 2015, 07:05 |
|
#14 |
Senior Member
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13 |
Thank you for the help. I deduced the whole equation into simple format and now fluent is working fine..
shiv |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error running simpleFoam in parallel | Yuby | OpenFOAM Running, Solving & CFD | 14 | October 7, 2021 05:38 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |
simpleFoam in parallel issue | plucas | OpenFOAM Running, Solving & CFD | 3 | July 17, 2013 12:30 |
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel | JR22 | OpenFOAM Running, Solving & CFD | 2 | April 19, 2013 17:49 |