|
[Sponsors] |
double free or corruption (!prev) in a solver not apparently using malloc or similar. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 3, 2014, 04:56 |
double free or corruption (!prev) in a solver not apparently using malloc or similar.
|
#1 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
Hi, i'm running a OF solver developed by a subcontractor and can't get t to work more than a single timestep. At that point the solver exits and gives a double free or corruption (!prev). Compiled it with "make" without errors. Tried to compile it with GCC but it would not be able to find the .H files listed after each #include directive listed, so given up as I am not sure why it would not find them. Used valgrind and obtained an error file I am not really able to understand (i'm new to CFD and my C is a vague memory from my first year at uni oh so many years ago). I attach the program code (thermalblabla) and valgrind output (both as txt).
Would love to understand how can I track down the error, so would appreciate some help. May I say I had not had this problems with seemingly the same code before having to reinstall it all, but other colleagues had it. I don't think I had a different code. Maybe I compiled it wrong? thanks. If i have not put enough info, pls let me know i. |
|
February 3, 2014, 14:11 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
With compilation, do you mean make or wmake?
|
|
February 3, 2014, 16:44 |
|
#3 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
ah, good question. I might have used make - sorry I'm home now and working on another computer and the wrong partition so can't check just yet . just read something on OpenFoam on wmake but I don't know enough to understand the difference with make. I know in the thermoblabla folder I have a .dep file, i have the Make directory with the option and files files. Might try a fresh recompile and report back in the morning. thanks
|
|
February 3, 2014, 17:53 |
|
#4 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
||
February 4, 2014, 05:03 |
|
#5 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
still the same problem after recompiling with wmake.
I've dug out the old skype conversation with the subcontractor but can't find no clues, except perhaps silly thing, my platforms are called linuxGccDPOpt, his were called linux64GccDPOpt I thought that 64 referred to the mysterious 64 bits of his whatever built of whatever. can't be that can it... during wmake I can see it links to my platforms nicely Thanks, will read up on compiling! |
|
February 4, 2014, 05:10 |
|
#6 |
Senior Member
|
Hi,
What if the problem is not in this "double free" but in your case files? Can you post the error which solver produces after one time step? |
|
February 4, 2014, 05:23 |
|
#7 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
hello
I have a solver err log file which remains blank (although I have to look up how to tell the program to write on it, as it's always been blank). The solver file simply puts "end" at the end of the time step (have attached it in any case) Have also attached the error generated on terminal thanks |
|
February 4, 2014, 05:34 |
|
#8 |
Senior Member
|
Well,
Now I'd like to look at your controlDict as it seems that your endTime is 1, also lines in 'error to terminal-1.txt' with Code:
/opt/openfoam211/platforms/linuxGccDPOpt/lib/libsampling.so |
|
February 4, 2014, 05:40 |
|
#9 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
here the controlDict
sorry i don't understand, what else should i provide you with? |
|
February 4, 2014, 05:48 |
|
#10 |
Senior Member
|
Well
1. Only one time step is actually done due to Code:
stopAt writeNow; Code:
stopAt endTime; Code:
libs ( "libOpenFOAM.so" // OpenFOAM will (probably) crash if this library is not specified "libsimpleSwakFunctionObjects.so" "libmyBCs.so" "libswakFunctionObjects.so" "libgroovyBC.so" ); |
|
February 4, 2014, 07:49 |
|
#11 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
well indeed... how silly of me not checking that detail about the endtime proper beginner!!!!
I must admit even when it worked it did end up giving that glibc error, but at least it was at the end of the simulation. so i have to get back to the developer about the libraries as I do not know the consequences in the long term (or on the results) |
|
February 4, 2014, 10:00 |
|
#12 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
the simulation goes to step 2 but then it stays there, and I have a solver err log that i do not like a single bit...
|
|
February 4, 2014, 10:19 |
|
#13 |
Senior Member
|
Step 2 is a time step after first time step or second run or the solver (according to comments in controlDict you need to restart solver after first 50 steps with modified relaxation factors)?
As you've posted only stack trace I don't know what field causes the error. Usually you can start by changing GAMG solver to PCG (or PBiCG, it depends). Also you can try to change discretisation schemes (go with first order). Play with relaxation factors. To suggest anything I need to have a look at your fvSchemes and fvSolution. |
|
February 4, 2014, 10:43 |
|
#14 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
thanks and sorry for giving you only bits at a time unknowingly
control dict should be set so the simulation runs for 50 time steps, so 2 is the second time step I ma following the direction of the subcontractor with relaxation factors and stuff, so here is the solver log and the other files... |
|
February 4, 2014, 11:00 |
|
#15 |
Senior Member
|
It seems that you've got problem solving velocity equation.
Comments in the fvSolution (relaxationFactors section) state that relaxation factor for U equation should be 0.2 up to time step 150 (while in the file you've attached relaxation factor for U is commented out). Uncomment line with relaxation factor for U equation. Also attached fvScheme (while it should be fvSchemes) and fvSolution are actually the same file. |
|
February 4, 2014, 11:28 |
|
#16 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
that what happens when you do too many things at once sorry
uncommented, relaunched. |
|
February 5, 2014, 04:04 |
|
#17 |
New Member
i.schiavi
Join Date: Jan 2014
Posts: 11
Rep Power: 12 |
thanks for all your help Alexej
my chugging computer completed the simulation successfully. There are still problems of memory allocation at the end of the run, which I need to raise with the subcontractor, but hopefully I get to arrive to some results. best regards I. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New densitybased solver AeroFoam | giulio_romanelli | OpenFOAM Running, Solving & CFD | 48 | January 15, 2016 09:20 |
Steady state chemistry | linnemann | OpenFOAM Running, Solving & CFD | 14 | April 7, 2015 14:10 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
Parallel rasInterFoam | openfoam_user | OpenFOAM Running, Solving & CFD | 4 | November 1, 2008 05:14 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 09:23 |