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

parallel simpleFoam requires 0/s ; serial solution works

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2019, 10:45
Default [Solved] parallel simpleFoam requires 0/s ; serial solution works
  #1
New Member
 
Lars
Join Date: Jul 2015
Posts: 8
Rep Power: 11
sral is on a distinguished road
Hello,

I am trying to calculate the steady state drag on a sphere with the simpleFoam solver. (Newtonian fluid, laminar flow, Re=1)

Meshing is done with blockMesh and mirrorMesh.

When run in serial, everything is fine (sic! see third post). But when running simpleFoam in parallel following error comes up for every processor:

Code:
[0] --> FOAM FATAL ERROR:
[0] cannot find file "<pwd>/processor0/0/s"
Why is 0/s needed for parallel execution and not for the serial solution? s is the entropy, if I am not mistaken? Creating zero valued initial conditions for s leads to the prompt to also define appropriate fvSchemes and I'd like to avoid that.


Folder structure:
Code:
.                             
├── 0                         
│   ├── U                     
│   ├── U.orig                
│   └── p                     
├── Allclean                  
├── Allrun                    
├── Allrun_parallel           
├── balancer.foam             
├── constant                  
│   ├── transportProperties   
│   └── turbulenceProperties  
├── genMeshScript.py            # generates blockMesh input file
├── repairBCAfterMirror.sh       # fix boundary conditions (mirroring creates two inlets...)          
└── system                    
    ├── blockMeshDict         
    ├── controlDict           
    ├── decomposeParDict      
    ├── fvSchemes             
    ├── fvSolution            
    └── mirrorMeshDict
Allrun:
Code:
#!/bin/sh
cd ${0%/*} || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./genMeshScript.py
runApplication blockMesh
runApplication mirrorMesh -overwrite
./repairBCAfterMirror.sh
runApplication potentialFoam
runApplication simpleFoam
Allrun_parallel:
Code:
#!/bin/sh
cd ${0%/*} || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./genMeshScript.py
runApplication blockMesh
runApplication mirrorMesh -overwrite
./repairBCAfterMirror.sh
runApplication decomposePar
runApplication mpirun -np 4 potentialFoam -parallel
runApplication mpirun -np 4 simpleFoam -parallel
runApplication reconstructPar -latestTime
I hope somebody can lead me in the right direction

Last edited by sral; October 17, 2019 at 08:18. Reason: Problem solved. Marked in the title with [Solved]
sral is offline   Reply With Quote

Old   October 16, 2019, 18:51
Default
  #2
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8
Carlo_P is on a distinguished road
...uhm...strange, also because seems to be a very simple case.
Did you try to run the tutorial for simpleFoam in parallel?

One suggestion, I don't know if can work... can you try to avoid potentialFoam?
Because once gives me similar error.

What would append if you run some iterations in serial and decompose it later?

Just to make some debugging..
Carlo_P is offline   Reply With Quote

Old   October 17, 2019, 05:40
Default
  #3
New Member
 
Lars
Join Date: Jul 2015
Posts: 8
Rep Power: 11
sral is on a distinguished road
Thank you, Carlo for your suggestions. I tried them but had no luck. The motorBike case runs fine in parallel.
I just recognized that my serial case also complains about the missing s

Code:
$ simpleFoam


/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 7-109ba3c8d53a
Exec   : simpleFoam
I/O    : uncollated
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0
SIMPLE: Convergence criteria found
        p: tolerance 0.01
        U: tolerance 0.0001
Reading field p
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present
No finite volume options present

Starting time loop
--> FOAM Warning :
     From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 746
    Caught FatalError
--> FOAM FATAL ERROR:
cannot find file "/home/.../0/s"

    From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
    in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 538.

forces forceCoeffs:
    Not including porosity effects
forceCoeffs forceCoeffs:
    Not including porosity effects
 Time = 1


... # simulation goes on until convergence is reached
So the serial execution neglects the "Fatal Error" but MPI stops everything when the error is encountered. So it is just about different error handling in serial and parallel ...

I guess my fvSchemes or fvSolution is still wrong. I will try to get rid of the Fatal Error in the serial case and then try parallel execution again....
sral is offline   Reply With Quote

Old   October 17, 2019, 07:29
Default
  #4
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8
Carlo_P is on a distinguished road
Uhm..seems to be similar to another error: running iocFoam in parrallel


seems that the problem can be the functionObject, the one gives you the warning.
I know, it is only a warning, but..maybe..


Can you run without it?


Cheers!
Carlo_P is offline   Reply With Quote

Old   October 17, 2019, 08:17
Default
  #5
New Member
 
Lars
Join Date: Jul 2015
Posts: 8
Rep Power: 11
sral is on a distinguished road
Thank you. Yes the functions dictionary in controlDict was the problem. There was a "includeFunc scalarTransport" I commented out with a '#' and not '//'.

So it was a typical syntax Error It works now.
sral is offline   Reply With Quote

Old   October 17, 2019, 09:55
Default
  #6
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8
Carlo_P is on a distinguished road
Perfect!
The main question is why openFOAM complains about in only in parallel.
Maybe would be nice to report it.


Feel free to add a reputation point, thanks!
Carlo_P is offline   Reply With Quote

Reply

Tags
0/s, parallel, simplefoam

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 openfoam in parallel fede32 OpenFOAM Programming & Development 5 October 4, 2018 17:38
Dynamic mesh crashes in parallel, but works in serial 86lolo FLUENT 7 June 24, 2014 06:24
Parallel runs with sonicDyMFoam crashes (works fine with sonicFoam) jnilsson OpenFOAM Running, Solving & CFD 0 March 9, 2012 07:45
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 14:53.