View Issue Details

IDProjectCategoryView StatusLast Update
0002042OpenFOAM[All Projects] Bugpublic2016-04-04 09:08
ReporterwyldckatAssigned Tohenry 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Version 
Summary0002042: The default "stop on 1st error" feature isn't fully working within the "applications" tree
DescriptionRelated to report #2040, this report refers to the "stop on first error" feature in OpenFOAM's own "applications" source code tree not stopping properly when there is a particular application that fails to build.
More specifically, when the error is triggered within the scope of an "Allwmake" script, it's not reported properly to make and therefore the build proceeds without stopping.

For example, if we build of "applications/utilities/mesh/generation/blockMesh" fails, it was called from within "applications/utilities/mesh/generation/Allwmake", which is not reporting the error to the caller, because it does not have "set -e" in the script.

Attached is the package "OpenFOAM-stopOnError_v1.tar.gz", which provides the following updated files:

  - applications/solvers/compressible/rhoCentralFoam/Allwmake
  - applications/solvers/lagrangian/DPMFoam/Allwmake
  - applications/solvers/multiphase/compressibleInterFoam/Allwmake
  - applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
  - applications/solvers/multiphase/driftFluxFoam/Allwmake
  - applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
  - applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
  - applications/solvers/multiphase/multiphaseInterFoam/Allwmake
  - applications/solvers/multiphase/reactingEulerFoam/Allwmake
  - applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake
  - applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake
  - applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
  - applications/utilities/mesh/conversion/Optional/Allwmake
  - applications/utilities/mesh/generation/Allwmake
  - applications/utilities/mesh/generation/extrude2DMesh/Allwmake
  - applications/utilities/mesh/generation/foamyMesh/Allwmake
  - applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake
  - applications/utilities/mesh/manipulation/renumberMesh/Allwmake
  - applications/utilities/mesh/manipulation/setSet/Allwmake
  - applications/utilities/miscellaneous/foamHelp/Allwmake
  - applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
  - applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
  - applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
  - applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
  - applications/utilities/postProcessing/graphics/PVReaders/Allwmake
  - applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake
  - applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake
  - applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
  - applications/utilities/preProcessing/wallFunctionTable/Allwmake

    - All of the above source "wmake/scripts/AllwmakeParseArguments" and some of them also set the "targetType=libso" and use it for building the libraries, to make it consistent with the "Allwmake" scripts in "src".

    - This also enables the scripts to report back to the caller application (which for us "make" is what matters) when something goes wrong.


  - wmake/wmake

    - The addition of the changes in the Allwmake scripts isn't enough. There was a flaw in "wmake", which the attached package aims to fix:

      - When using "wmake all", the part "Find all the sub-directories containing a 'Make' directory" was incorrectly reporting back the error code from within the if-block "! -d $MakeDir".

      - The fix relies on storing in the environment variable "makeExitCode" the result from the execution of the "$make" line, for later reporting within the if-block.

      - In addition, in case of error, the if-block also reports it:

          if [ ! -d $MakeDir -o $makeExitCode -ne 0 ]
          then
              exit $makeExitCode
          fi
Additional InformationHopefully I didn't forget anything in this report.
TagsNo tags attached.

Activities

wyldckat

2016-04-03 22:46

updater  

OpenFOAM-stopOnError_v1.tar.gz (6,041 bytes)

henry

2016-04-04 09:08

manager   ~0006079

Thanks Bruno
Resolved by commit 94e9b05eddb06721b3b3421314bb46b970aafafc

Issue History

Date Modified Username Field Change
2016-04-03 22:46 wyldckat New Issue
2016-04-03 22:46 wyldckat Status new => assigned
2016-04-03 22:46 wyldckat Assigned To => henry
2016-04-03 22:46 wyldckat File Added: OpenFOAM-stopOnError_v1.tar.gz
2016-04-04 09:08 henry Note Added: 0006079
2016-04-04 09:08 henry Status assigned => resolved
2016-04-04 09:08 henry Resolution open => fixed