Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#371 Fix incorrect number of files reported when two stage compilation is done #372

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions source/fab/steps/compile_fortran.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def compile_fortran(config: BuildConfig,
log_or_dot_finish(logger)

if syntax_only:
logger.info("Finalising two-stage compile: object files, single pass")
logger.info(f"Finalising two-stage compile: object files, single "
f"pass for {len(uncompiled)} files.")
mp_common_args.syntax_only = False

# A single pass should now compile all the object files in one go
Expand All @@ -121,8 +122,10 @@ def compile_fortran(config: BuildConfig,
results_this_pass = run_mp(config, items=mp_args, func=process_file)
log_or_dot_finish(logger)
check_for_errors(results_this_pass, caller_label="compile_fortran")
compiled_this_pass = list(by_type(results_this_pass, CompiledFile))
logger.info(f"stage 2 compiled {len(compiled_this_pass)} files")
# The previous call raises an exception in case of an error.
# So at this stage the number of list elements (which are tuples
# of compiled_file, artefact) is the number of compiled files
logger.info(f"stage 2 compiled {len(results_this_pass)} files")

# record the compilation results for the next step
store_artefacts(compiled, build_lists, config.artefact_store)
Expand Down
Loading