CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   parallel simpleFoam requires 0/s ; serial solution works (

sral October 16, 2019 10:45

[Solved] parallel simpleFoam requires 0/s ; serial solution works

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:


[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:

├── 0                       
│  ├── U                   
│  ├── U.orig               
│  └── p                   
├── Allclean                 
├── Allrun                   
├── Allrun_parallel         
├── balancer.foam           
├── constant                 
│  ├── transportProperties 
│  └── turbulenceProperties 
├──            # generates blockMesh input file
├──      # fix boundary conditions (mirroring creates two inlets...)         
└── system                   
    ├── blockMeshDict       
    ├── controlDict         
    ├── decomposeParDict     
    ├── fvSchemes           
    ├── fvSolution           
    └── mirrorMeshDict


cd ${0%/*} || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication mirrorMesh -overwrite
runApplication potentialFoam
runApplication simpleFoam


cd ${0%/*} || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication mirrorMesh -overwrite
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 :)

Carlo_P October 16, 2019 18:51

...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..

sral October 17, 2019 05:40

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


$ simpleFoam

  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:
    \\  /    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
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....

Carlo_P October 17, 2019 07:29

Uhm..seems to be similar to another error:

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?


sral October 17, 2019 08:17

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 :rolleyes: It works now.

Carlo_P October 17, 2019 09:55

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!;)

All times are GMT -4. The time now is 15:44.