|
[Sponsors] |
Immediate Segmentation fault when running new solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2016, 16:03 |
Immediate Segmentation fault when running new solver
|
#1 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
I am experimenting with writing my own solver, but I am having trouble running a copy of a standard openFoam solver. I am using foam extend 3.2 and all I have done is to copy and make the simpleFoam solver into my_simpleFoam solver located in $FOAM_USER_APPBIN. The wmake proceeded without any evident problems, but now when I run my_simpleFoam i immediately get greeted with 'Segmentation fault'
I have absolutely no idea how to proceed! Any help would be much appreciated! |
|
June 29, 2016, 16:07 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Jack,
if you did it like you told, there should not be a error. The best way is to delete your solver, copy paste again and try.
All in all this will take less than 1 minute and would be easier for you and all who want to give you support (: because you did not provide enough information (it could be everything that causes this error). Good luck
__________________
Keep foaming, Tobias Holzmann |
|
June 29, 2016, 16:21 |
|
#3 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hi Tobi,
Sorry, I got a bit ahead of myself, here is everything I have done as you suggest. I have repeated the following steps a few times now (I delete the directory and remove the binary executable created each time ) but the result is still the same! I am currently inside $WM_PROJECT_USER/applications/solvers Code:
cp -r $FOAM_SOLVERS/incompressible/simpleFoam . mv simpleFoam my_simpleFoam cd my_simpleFoam wclean mv simpleFoam.C my_simpleFoam.C Code:
my_simpleFoam.C EXE = $(FOAM_USER_APPBIN)/my_simpleFoam Now we just want to test run my_simpleFoam by typing the this name at the command line. The result is a segmentation fault! I am not expecting this since the standard simpleFoam solver that is already compiled can be run (but obviously crashes because it can't find a controlDict) Any ideas? |
|
June 29, 2016, 16:59 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
well I am very familiar with compiling and FOAM but this is somehow wired. Just one thing that I could imagine ... did you load different foam version? Further more, did you try do wclean simpleFoam and wmake it again? Normally simpleFoam should also give the error. If you can observe this behavior there is something wrong in your FOAM compilation. Just recompile everything.
__________________
Keep foaming, Tobias Holzmann |
|
June 29, 2016, 17:06 |
|
#5 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hi Tobi,
Thanks for your help - I only have one openFoam version active in my environment and that is foam extend 3.2 Since I am running on a server with many other users, who share the same installation I don't want to change anything on the main installation path (I don't even think I can!) It is very strange indeed! |
|
June 29, 2016, 18:17 |
|
#7 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Which output would you like? The only output I get when I run my_simpleFoam is "Segmentation fault". Would you like to see the output of the wmake?
|
|
June 30, 2016, 10:12 |
|
#8 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hi Tobi,
You were correct initially - the problem was with the installation of foam extend. Thank you for help! |
|
June 30, 2016, 10:56 |
|
#9 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Jack,
very nice. That means you recompiled FOAM yourself? Well I could have told you that you can make a local compilation without changing anything at the foam-extend that is used for all. How did you figure out that FOAM was broken? Anyway, nice to here that you solved the problem. Quote:
__________________
Keep foaming, Tobias Holzmann |
||
June 30, 2016, 21:37 |
|
#10 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
I took your word for it! I guess others can rest assured that provided the above steps are taken, it should work provided the openFoam build is correct!
|
|
July 18, 2016, 12:05 |
segmentation fault foam-3.1 extended
|
#11 | |
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13 |
Hi There,
I am having a similar problem but I actually want to recompile a new solver in foam-3.1 extended. The solver I copied from works perfectly, then I do a new my_solver and compile it with no errors. When I try to run it (without any further modification) I also get immediately Segmentation Fault. Do yu have any idea why this would be? Cheers, Heliana Quote:
|
||
July 18, 2016, 12:14 |
|
#12 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
I probably won't be able to offer much help other than to say that Tobi is correct - provided you follow the above steps it should work. In my case there were a few inconsistencies with the way the extend environment was set up. Did you install it yourself?
In my case the problem was with the compiler used in the build. Specifically changing to gcc 4.9.2 instead of 5.2.0. Its tricky to know I guess without any further information. Sadly I am not very knowledgable on the build of foam extend so again cant help, but this is where I would start to investigate. |
|
July 18, 2016, 14:15 |
|
#13 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Quote:
if you can compile the original solver and run it without any problems, then you should also be able to make a new solver by coping it, rename the *.C file and change the Make/files with respect to the new *.C file and furthermore you should change the path to $(USER_APPBIN). if this is not working properly, then you did something wrong. In addition, what do you mean with "immediately". Do you get the FOAM header and some other stuff or you just really get immediately the error message. Without further information we just can guess.
__________________
Keep foaming, Tobias Holzmann |
||
July 19, 2016, 06:04 |
|
#14 | |
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13 |
Hi Tobi,
I tried to recompile foam-3.1 extend and now I get a bunch of errors when the solvers are compiled. Well they are actually not really compiled now, so maybe there was already a problem i did not know about. I am right now trying to re-install and compile again f31 and seeing same error, something of the like: collect2: error: ld returned 1 exit status /home/heliana/foam/foam-extend-3.1/wmake/Makefile:152: recipe for target '/home/heliana/foam/foam-extend-3.1/applications/bin/linux64GccDPOpt/coalChemistryFoam' failed I have already installed in my computer OF23x and before it used to work all fine when I changed between environments. I am following http://www.tfd.chalmers.se/~hani/kur...OwnLaptop.html instructions to install the extend. If you have any hint it would be nice if you could let me know, I write again as soon as my compilation finishes. Thank you! heliana Quote:
|
||
July 19, 2016, 06:19 |
|
#15 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Heliana,
for a better understanding please distinguish between "install" and "compile". These methods are different but as far as I got it, you compile the code. In your case I would just remove the old foam-extend clone the repo again, make sure that all pre-requirements are available and recompile it (on a modern machine ~ 30 min - 60min. Here you should use Code:
./Allwmake > log 2>&1 Furthermore, be sure to load FOAM within a clean terminal. Sometimes I get a problem if I first load ofxx and then ofxy in the same terminal. Good luck.
__________________
Keep foaming, Tobias Holzmann |
|
July 19, 2016, 08:10 |
segementation error
|
#16 |
New Member
nurjs
Join Date: Oct 2015
Location: Iraq
Posts: 11
Rep Power: 11 |
hi here,
I complete my geometry and mesh it using ICEM meshing .When i run it in fluent i obtain segmentation error exiting when saving , I don;t have any chooses only OK then fluent close. I tried so much time but this message still appears. Any one know how can i solve this problem? |
|
July 19, 2016, 08:28 |
|
#17 | |
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13 |
Hi Tobi,
Yes you are absolutely right, I should use the proper terms. So, like you said, I meant compiling. I removed the old foam-extend and cloned it again, and when I compile I get always this error: /home/heliana/foam/foam-extend-3.1/lib/linux64GccDPOpt/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' I presume this is something relatex to flex ?? I'm digging into forums to see what I find. Do you have any idea? Cheers, Heliana Quote:
|
||
July 19, 2016, 17:51 |
problem with ICEM mesh
|
#18 |
New Member
nurjs
Join Date: Oct 2015
Location: Iraq
Posts: 11
Rep Power: 11 |
Hi all,
I am new in ICEM meshing, i have many problem when doing my mesh. My geometry is multi cylinder inside a box. My problem when i make blocking and split my cylinders and complete meshing. In fluent the interface between solid and liquid (shadow not appears) why this happen i defined it in mesh? please any help |
|
July 19, 2016, 17:54 |
|
#19 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
a) Not related to that topic
b) ICEM does not belong to OpenFOAM c) ICEM does not belong to OpenFOAM and subforum Programming & development Please use the right forum: http://www.cfd-online.com/Forums/ansys-meshing/
__________________
Keep foaming, Tobias Holzmann |
|
July 20, 2016, 06:16 |
|
#20 | |
Member
Heliana Cardenas
Join Date: Jul 2013
Posts: 30
Rep Power: 13 |
Dear Tobi,
I have been struggling a bit again with the compilation of foam-3.1 extend.. I found this website: http://www.tfd.chalmers.se/~hani/kur...sAndTricks.htm where it says what to do when there is a problem like the one I got.. Sadly, when I do what they say, the compilation does not work because of the same errors. I noticed though which of the applications are the ones that don't compile, like src/triSurface, when I try to compile for example, that one alone, compilation does not work even by modifying: So, I just substituted the line: extern "C" int yywrap() with int yyFlexLexer::yywrap() in the .L files as suggested by: http://www.cfd-online.com/OpenFOAM_D...es/1/7503.html Do you know how or have experience of how I could fix this problem? I cannot get my head around it Cheers, Heliana Quote:
|
||
Tags |
foam extend |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 17:08 |
segmentation fault - parallel running | CrisMoreira | OpenFOAM Running, Solving & CFD | 13 | November 1, 2015 17:13 |
Segmentation fault when running in parallel | Pj. | OpenFOAM Running, Solving & CFD | 3 | April 8, 2015 09:12 |
Strange Segmentation Fault | jd210 | OpenFOAM Running, Solving & CFD | 0 | March 30, 2015 08:04 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 10:38 |