Immediate Segmentation fault when running new solver
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! |
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 |
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 . Code:
my_simpleFoam.C 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? |
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. |
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! |
Can you post the output of your application, that we can check when the error occur?
|
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?
|
Hi Tobi,
You were correct initially - the problem was with the installation of foam extend. Thank you for help! |
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:
|
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!
|
segmentation fault foam-3.1 extended
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:
|
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. |
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. |
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:
|
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. |
segementation error
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? |
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:
|
problem with ICEM mesh
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 |
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/ |
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:
|
All times are GMT -4. The time now is 03:18. |