Skip to content

BUG: problem with collated format and writing of NURBS3DVolume control points

Summary

adjointOptimisationFoam crashes when attempting to write the volumetric B-Splines control points into an IOdictionary when using the collated file format.

In specific, the if(Pstream::master()) clause in NURBS3DVolume::writeCpsInDict() is causing the fileName of the regIOobject not to be allocated in all processors, giving problems when masterUncollatedFileOperation::masterOp is called by collatedFileOperation::writeObject for the mkDirOp.

Steps to reproduce

Running the case under $FOAM_TUTORIALS/incompressible/adjointOptimisationFoam/shapeOptimisation/sbend/laminar/opt/unconstrained/BFGS using the collated file format gives

--> FOAM FATAL IO ERROR:
Bad token - could not get string

A serial execution gives no error.

Possible fixes

Removing the

if (Pstream::master())

clause from line 1915 of NURBS3DVolume.C fixes the issue.