Skip to content

Incremental Build Scenarios

Byron Blay edited this page Jun 27, 2022 · 5 revisions

This page collects a series of scenarios which need to be tested to prove that incremental building is working correctly.

Where a recursive build is referred to this means that anything for which the changed file is a prerequisite must be rebuilt and then anything for which those prerequisites are a prerequisite and so on. This journey down the dependency tree stops at the point where a rebuild results in no change. Everything below that may be considered unaffected.

Basic Fortran

  • Change to Fortran module API causes .o and .mod to be rebuilt and all modules which use that API to also be rebuilt, recursively.
  • Change to Fortran module implementation (but not API) causes .o to be rebuilt but nothing more.
  • Change to compiler arguments causes all Fortran to be rebuilt.

Basic C

  • Change to .h file causes every .c which #include that file to be rebuild .o file (unless that change is #ifdeffed out). Recurse through .h files which #include the changed file.
  • Change to .c file causes rebuilt of .o file.
  • Change to compiler arguments causes all C to be rebuilt.

LFRic Configurator

  • Change to configuration metadata (inclusion semantics included) causes regeneration of source.
  • Possible optimisation, only source relating to changed sections regenerated.
    • This is easy for the namelist loaders as they are one file per section. The configuration loader depends on all sections.

PSyclone

  • Change to algorithm (.[Xx]90) source causes PSy layer to be regenerated.
  • Change to transformation script causes those algorithms it affects to be regenerated.
  • Change to PSyclone arguments cause everything to be regenerated.
  • Change to kernel metadata causes affected PSy layer to regenerate.

pFUnit

  • Change to .pf files causes source to be regenerated.
  • Change to .pf files causes driver inclusion list to be regenerated.
  • Change to pFUnit arguments cause all source to be regenerated.
  • Change to implied driver source causes it to be recompiled as per Fortran.

C Interoperation

  • Change to .o file from C used by Fortran binding causes Fortran to be recompiled recursively.
  • Change to .o file from Fortran used by C binding causes C to be recompiled recursively.
Clone this wiki locally