Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 418
    • Issues 418
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1587
Closed
Open
Issue created Feb 10, 2020 by Mortesins@Mortesins

#include directive not working in snappyHexMeshDict with collated file handler

Summary

The #include directive does not work properly inside snappyHexMeshDict when running with the collated file handler. It throws the following error:

[1] --> FOAM FATAL ERROR: 
[1] Not implemented
[1] 
[1]     From function virtual Foam::Istream& Foam::ITstream::readRaw(char*, std::streamsize)
[1]     in file db/IOstreams/Tstreams/ITstream.C at line 344.

Steps to reproduce

  1. Starting from the motorbike tutorial, move the refinementSurfaces settings to an external file. So the snappyHexMeshDict will look like this:
    refinementSurfaces
    {
        #include "motorBikeRefinementDict"
    }

and a new file called motorBikeRefinementDict should contain the following:

motorBike
{
    // Surface-wise min and max refinement level
    level (5 6);

    // Optional specification of patch type (default is wall). No
    // constraint types (cyclic, symmetry) etc. are allowed.
    patchInfo
    {
        type wall;
        inGroups (motorBikeGroup);
    }
}
  1. Change the file handler to be collated. NOTE: there is no issue with the uncollated format.

Example case

I've attached:

snappyHexMeshDict

motorBikeRefinementDict

controlDict

What is the current bug behaviour?

Snappy crashes.

What is the expected correct behavior?

The #include directive should be correctly parsed.

Relevant logs and/or images

Create time

Overriding OptimisationSwitches according to controlDict
    fileHandler (unregistered)
Overriding fileHandler to collated
I/O    : collated (maxThreadFileBufferSize 0)
         Threading not activated since maxThreadFileBufferSize = 0.
         Writing may run slowly for large file sizes.
Create mesh for time = 0

Read mesh in = 0 s

Overall mesh bounding box  : (-5 -4 0) (15 4 8)
Relative tolerance         : 1e-06
Absolute matching distance : 2.29783e-05

[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] Not implemented
[1] 
[1]     From function virtual Foam::Istream& Foam::ITstream::readRaw(char*, std::streamsize)
[1]     in file db/IOstreams/Tstreams/ITstream.C at line 344.
[1] 
FOAM parallel run aborting
[1] 
[1] #0  Foam::error::printStack(Foam::Ostream&)Reading refinement surfaces.
Read refinement surfaces in = 0.33 s

Reading refinement shells.
Refinement level 4 for all cells inside refinementBox
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
 at ??:?
[1] #1  Foam::error::abort() at ??:?
[1] #2  Foam::ITstream::readRaw(char*, long) at ??:?
[1] #3  Foam::readRawLabel(Foam::Istream&, int*, unsigned long) at ??:?
[1] #4  Foam::Istream& Foam::operator>><int, 2u>(Foam::Istream&, Foam::FixedList<int, 2u>&) at ??:?
[1] #5  Foam::refinementSurfaces::refinementSurfaces(Foam::searchableSurfaces const&, Foam::dictionary const&, int, bool) at ??:?
[1] #6  ? at ??:?
[1] #7  __libc_start_main in /lib64/libc.so.6
[1] #8  ? at ??:?
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD 
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Environment information

  • OpenFOAM version : v1912
  • Operating system : CentOS Linux 7
  • Compiler : Gcc 4.8.5
Assignee
Assign to
Time tracking