CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

segmentation fault - parallel running

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2015, 12:12
Default segmentation fault - parallel running
  #1
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
I'm new in these things so i'm trying to do the tutorial "Green Water" as a introduction to VOF but when i try to do the parallel running i got a segmentation error as soon as i execute setFields in the Terminal
The message error is this:


cristina@cristina-HP-Pavilion-g6-Notebook-PC:~/OpenFOAM/cristina-2.2.2/run/greenWater$ setFields
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.2-9240f8b967db
Exec : setFields
Date : Mar 23 2015
Time : 16:48:02
Host : "cristina-HP-Pavilion-g6-Notebook-PC"
PID : 3973
Case : /home/cristina/OpenFOAM/cristina-2.2.2/run/greenWater
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading setFieldsDict

Setting field default values
Setting internal values of volScalarField alpha1
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::tmp<Foam::Field<double> > Foam::fvPatch::patchInternalField<double>(Foam::UL ist<double> const&) const in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#4 Foam::zeroGradientFvPatchField<double>::zeroGradie ntFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#5 Foam::fvPatchField<double>::adddictionaryConstruct orToTable<Foam::zeroGradientFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6 Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#7 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::readField( Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#9 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields() in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#10
at setFields.C:0
#11
in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#12
in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#13
in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
#14 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#15
in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/setFields"
Falha de segmentação (imagem do núcleo gravada)
CrisMoreira is offline   Reply With Quote

Old   March 24, 2015, 05:38
Default
  #2
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi Cristina,
tell us more because it is impossible to help you without knowing a little more about your parameters.
You should make an archive with some of your directories like constant, system, mesh and 0.
Best regards,
Laurent
laurentD is offline   Reply With Quote

Old   March 24, 2015, 07:19
Default
  #3
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Hi Laurent
Thank you for your reply, i think that now in the file "exercicio" is there all that is needed but if i'm missing something please let me know.

https://www.dropbox.com/s/dk3jf4n0jo...cicio.tar?dl=0

Cristina
CrisMoreira is offline   Reply With Quote

Old   March 25, 2015, 03:43
Default Maybe a solution
  #4
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi Cristina,
I have tried to run the application setFields using your directories and i have obtained a segmentation fault too.
But when i run first the application blockMesh, and then setFields, it runs.
So try this following command :
blockMesh ; setFields
and tell me if it works.
Have a good day.
Laurent
laurentD is offline   Reply With Quote

Old   March 25, 2015, 04:29
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Just a small comment. Your mesh (the one in tar-file) definition is broken:

Code:
...
Checking topology...
 ****Problem with boundary patch 6 named wall5 of type wall. The patch should start on face no 615865 and the patch specifies 657225.
Possibly consecutive patches have this same problem. Suppressing future warnings.
 ***Boundary definition is in error.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).
...
And this indexing error leads to segmentation fault.

So regeneration of the mesh proposed by laurentD will fix the error. But it seems you performed additional steps like refineMesh and topoSet.
alexeym is offline   Reply With Quote

Old   March 25, 2015, 07:48
Default
  #6
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Hi,
Thank your for your answer. I did run the blockMesh and the checkMesh before and everything was ok. Then i executed refineMesh and everything was also ok so i proceed to overwrite the mesh and did all the changes that were given in the tutorial but when i try setFields a segmentation fault appeared so i did as Laurent said and it did solve the setField problem but when i did the decomposePar command to do the parallel running (it did created some processor folders) appeared this error message:

Code:
-> FOAM FATAL IO ERROR:
Cannot find patchField entry for wall1

file: /home/cristina/OpenFOAM/cristina-2.2.2/run/greenWater/0/alpha1.org.boundaryField from line 25 to line 47.

    From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 206.
then i went to check my "0" folder and i saw that in the "alpha1" a lot of numbers appeared with the code but in the "alpha1.org" the code changed itself from "wall1" to "leftwall" and so on. The walls name in the "alpha1" doesn't match the walls name's in "alpha1.org". From what i have read the "alpha1.org" is a backup so it should use the same names i use in the "alpha1", right?
CrisMoreira is offline   Reply With Quote

Old   March 25, 2015, 08:07
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Can you post the sequence of commands you have used for the case (as a simple list)? If you utilize blockMesh after refineMesh, it cancels refineMesh mesh refinements.

I guess alpha1.org in the tar file is from damBreak tutorial, while patches defined in blockMeshDict have names wall1, wall2 etc. So you should create alpha1.org with correct boundary names.
alexeym is offline   Reply With Quote

Old   March 25, 2015, 09:34
Default
  #8
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Hi,

Sure, i'm using:

  • blockMesh
  • checkMesh
  • setSet -batch setRefin
  • refineMesh -dict system
  • if ok :
  • rm -fr 0.001
  • refineMesh -dict system -overwrite
  • setSet -batch setExtract
  • subsetMesh extr -overwrite (oldInternalFaces -> change to a wall and name it "wall5" )
  • setFields - got the segment fault here
  • I want to do:
  • decomposePar
  • mpirun -np 2 interfoam -parallel > log &
I thought that only the file "alpha1" and "boundary" in the constant folder had to be changed but now i have write "alpha1.org" with the same wall names. Thank you.
CrisMoreira is offline   Reply With Quote

Old   March 25, 2015, 09:53
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

There is no setRefin and setExtract files in the tar file.

Not quite sure I got the meaning of

Quote:
I thought that only the file "alpha1" and "boundary" in the constant folder had to be changed but now i have write "alpha1.org" with the same wall names. Thank you.
You create alpha1.org file with initial and boundary conditions description. Before setFields execution you copy alpha1.org to alpha1. setFields will modify alpha1 creating internalField section of the file.
alexeym is offline   Reply With Quote

Old   March 25, 2015, 10:18
Default
  #10
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Sorry i forgot to put it in the list (edited now).
the files i miss are here. (i'm sorry!)
https://www.dropbox.com/s/1m2gs1kcva...etExtract?dl=0
https://www.dropbox.com/s/e3w6e4lknud0ahk/setRefin?dl=0

Ok, i was doing that wrong because i thought that alpha1.org hadn't to be changed and was puting the code right in the alpha1. But now i have correct it.
I have redone everything checking the mesh every change i made and discoverd that the problem appear after changing the oldInternalFaces to a wall (wall5), the error message said that the startFace number wasn't correct that sould be another.

Code:
 Checking topology...
 ****Problem with boundary patch 6 named wall5 of type wall. The patch should start on face no 638252 and the patch specifies 657225.
Possibly consecutive patches have this same problem. Suppressing future warnings.
So i went to the boundary file and changed the number (given in the tutorial) to the number that was suggested and checked the mesh again, the segmentation fault appear:

Code:
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/opt/openfoam222/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  
 at checkTopology.C:0
#4  Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >::calcMeshData() const in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/checkMesh"
#5  
 in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/checkMesh"
#6  
 in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/checkMesh"
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  
 in "/opt/openfoam222/platforms/linux64GccDPOpt/bin/checkMesh"
Falha de segmentação (imagem do núcleo gravada)
CrisMoreira is offline   Reply With Quote

Old   March 25, 2015, 11:01
Default
  #11
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

I do not know what am I doing wrong but I was not able to reproduce the error. Maybe you mess-up boundary file during editing?

As I am rather lazy, to skip entering commands every time, I have create Allprepare file:

Code:
#!/bin/sh
cd ${0%/*} || exit 1    # run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

runApplication blockMesh
runApplication checkMesh
runApplication setSet -batch setRefin
mv log.setSet log.setSet.setRefin
runApplication refineMesh -overwrite -dict system/refineMeshDict
runApplication setSet -batch setExtract
mv log.setSet log.setSet.setExtract
runApplication subsetMesh extr -overwrite
sed -i~ 's/oldInternalFaces/wall5/' constant/polyMesh/boundary
for f in 0/*; do
    [ -f $f ] && sed -i~ 's/oldInternalFaces/wall5/' $f
done
runApplication changeDictionary
cp 0/alpha1.org 0/alpha1
runApplication setFields
runApplication decomposePar
Everything is like in your post except a few things:

1. I use sed to rename patch
2. It turns out that subsetMesh will create oldInternalFaces patch not only in boundary file but also in all files in 0 folder, so I rename the patch there also
3. I use changeDictionary for manipulation of the dictionaries (boundary file and boundaryField dictionaries in 0 folder)

Attached archive is modified case.
Attached Files
File Type: gz exercicio.tar.gz (3.9 KB, 4 views)
alexeym is offline   Reply With Quote

Old   March 25, 2015, 12:18
Default
  #12
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Thank you, with that code the solver run without problems and i learn something very useful.
Yes i don't know what i did wrong with the boundary file but definelly the problem was there. I will try to do it again in order to find the error.
CrisMoreira is offline   Reply With Quote

Old   November 1, 2015, 08:49
Default Same simulation but using foam-extend
  #13
New Member
 
Daniel Tiago Muller
Join Date: Nov 2015
Location: Brazil
Posts: 3
Rep Power: 10
dtmuller is on a distinguished road
Hey guys,

I'm trying to simulate something very similar with this problem presented by Cristina. When I run the steps to refine and extract mesh everything works fine at openFoam-2.3 but when I try to run the same steps at foam-extend-3.1, it presents an error during extract. Instead of extracting, it recreates the old mesh without the extract part. Could any help me, please?

I think the problem is with subsetMesh at foam-extend-3.1.
dtmuller is offline   Reply With Quote

Old   November 1, 2015, 16:13
Default
  #14
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Hi Daniel,

I used OpenFoam 2.2.2 so i'm not familiar with the ones you specified.
Are you using SHM to refine and extract according to an .stl file?
If so the problem could be with the point you are using to select the part of the mesh you wanna keep. Or maybe something related with wanna keep the inside/outside cells of the contour defined by the .stl (check snappyHexMeshDict).
I'm not a specialist but if i were you i would check this out.

Best Regards

Cristina
CrisMoreira is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error running simpleFoam in parallel Yuby OpenFOAM Running, Solving & CFD 14 October 7, 2021 04:38
Fluent 14.0 file not running in parallel mode in cluster tejakalva FLUENT 0 February 4, 2015 07:02
Running CFX parallel distributed Under linux system with loadleveler queuing system ahmadbakri CFX 1 December 21, 2014 04:19
Segmentation Fault Shawn_A OpenFOAM Running, Solving & CFD 6 October 31, 2011 14:38
Fluent parallel: segmentation fault? hp FLUENT 2 September 6, 2001 14:18


All times are GMT -4. The time now is 06:08.