View Issue Details

IDProjectCategoryView StatusLast Update
0000480OpenFOAMBugpublic2012-05-16 12:15
Reporteruser256Assigned Touser4 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformPCOSLinux RedhadOS Version 4.1.2-50
Summary0000480: coded function objects crashes when running in parallel
DescriptionThe solver crashes when a run time control function object (http://www.openfoam.org/version2.0.0/runtime-control.php) is used and the code is running parallel. The error message says:

[1]
[1]
[1] --> FOAM FATAL IO ERROR:
[1] error in IOstream "IOstream" for operation primitiveEntry::readData(const dictionary&, Istream&)
[1]
[1] file: IOstream at line 0.
[1]
[1] From function IOstream::fatalCheck(const char*) const
[1] in file db/IOstreams/IOstreams/IOstream.C at line 114.
[1]
FOAM parallel run exiting
[1]
Steps To ReproduceAdd the following code to the controlDict

functions
(
exampleSnipped
{
 functionObjectLibs ("libutilityFunctionObjects.so");
 type coded;
 redirectType average;
 outputControl timeStep;
 code
 #{
     Info << "Hello, world." << endl;
 #};
}
);

Running the code in serial works.

However, decomposing the grid and running the code in parallel generates the error message instate

Additional InformationAn example of the snipped based on icoFoam has been added.
TagsNo tags attached.

Activities

user256

2012-03-23 11:37

 

cavity-runtimecode.tgz (1,799 bytes)

user4

2012-03-23 12:49

  ~0001169

We're aware of this problem - it is some interaction between the masterOnly reading of dictionaries and on-the-fly compilation of the codedFunctionObject.

As a workaround switch off the 'masterOnly' file reading (set fileModificationChecking to timeStamp instead of timeStampMaster) in the etc/controlDict (or your personal one).

user256

2012-03-23 14:08

  ~0001170

Excellent! Thanks, this works.

user4

2012-03-30 08:58

  ~0001185

The problem is actually in the usage of '#{' ('verbatim string') to delimit the snippet of code. This does not work with the masterOnly reading.

user4

2012-05-16 12:15

  ~0001320

The '#{' code issue will be fixed in the next major release.

Issue History

Date Modified Username Field Change
2012-03-23 11:37 user256 New Issue
2012-03-23 11:37 user256 File Added: cavity-runtimecode.tgz
2012-03-23 12:49 user4 Note Added: 0001169
2012-03-23 14:08 user256 Note Added: 0001170
2012-03-27 11:19 user2 Status new => resolved
2012-03-27 11:19 user2 Fixed in Version => 2.1.x
2012-03-27 11:19 user2 Resolution open => no change required
2012-03-27 11:19 user2 Assigned To => user4
2012-03-30 08:58 user4 Note Added: 0001185
2012-05-16 12:15 user4 Note Added: 0001320
2012-05-16 12:15 user4 Status resolved => closed
2012-05-16 12:15 user4 Fixed in Version 2.1.x => Other