fre.make.create_compile_script module
Retrieves information from the resolved YAML configuration to generate the compile.sh
in the [modelRoot]/[experiment name]/[platform-target]/exec directory, where
modelRootis defined in the platforms.yamlexperiment nameis defined in compile.yamlplatformandtargetare passed via Click options
The compile.sh script
Sets the
src_dirSets the
bld_dirSets the
mkmf_templateLoads/unloads modules to set-up the compile environment
Calls
mkmfto generate Makefiles for each model component defined in the compile.yamlCalls
maketo generate the model executable
- fre.make.create_compile_script.compile_create(yamlfile: str, platform: tuple[str], target: tuple[str], makejobs: int = 4, nparallel: int = 1, execute: bool | None = False, verbose: bool | None = None)
This function compile_create generates the compile script for bare-metal build.
- Parameters:
yamlfile (str) – Model compile YAML file
platform (tuple of strings) – FRE platform; defined in the platforms yaml
target (tuple of strings) – Predefined FRE targets
makejobs (int) – Number of recipes from the Makefile to run in parallel (default 4); corresponds to -j option in make
nparallel (int) – Number of compile.sh scripts to run in parallel (default 1)
execute (bool) – If True, execute the created compile.sh script to build a model executable
verbose (bool) – If True, increase verbosity output
- Raises:
ValueError –
Error if platform does not exist in platforms yaml configuration
Error if the mkmf template defined in platforms yaml does not exist