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

Introduce framework routine mpas_framework_report_settings for reporting compile-time options and run-time settings #1163

Merged
merged 3 commits into from
May 3, 2024

Conversation

mgduda
Copy link
Contributor

@mgduda mgduda commented May 2, 2024

This PR introduces a new framework routine, mpas_framework_report_settings, that reports compile-time options and run-time settings to the log file. For example, the following is written by the routine when MPAS is compiled with the nvhpc build target with OPENACC=true:

 Output from 'git describe --dirty': v8.1.0-dirty

 Compile-time options:
   Build target: nvhpc
   OpenMP support: no
   OpenACC support: yes
   Default real precision: single
   Compiler flags: optimize
   I/O layer: SMIOL

 Run-time settings:
   MPI task count: 4

The output is core-independent, and any core can therefore invoke the mpas_framework_report_settings, for example, in its setup_log routine.

As part of this PR, a call to mpas_framework_report_settings has been added to the test core's test_setup_log routine, and copy-and-paste code for writing the same compile-time option and run-time setting information in the init_atmosphere and atmosphere cores has been replaced with calls to mpas_framework_report_settings.

mgduda added 3 commits May 1, 2024 19:18
The new mpas_framework_report_settings routine writes information about compile-
time options and run-time settings to the log file.

A call to mpas_framework_report_settings has been added to the test core's
test_setup_log routine, so that information like the following is written to the
log file for the test core:

 Output from 'git describe --dirty': v8.1.0-dirty

 Compile-time options:
   Build target: intel
   OpenMP support: no
   OpenACC support: no
   Default real precision: single
   Compiler flags: optimize
   I/O layer: SMIOL

 Run-time settings:
   MPI task count: 32
This commit replaces code in the atmosphere core's atm_setup_log routine for
writing compile-time options and run-time settings with a single call to the
framework routine mpas_framework_report_settings.
…osphere core

This commit replaces code in the init_atmosphere core's init_atm_setup_log
routine for writing compile-time options and run-time settings with a single
call to the framework routine mpas_framework_report_settings.
@mgduda mgduda force-pushed the all/log_runtime_settings branch from 2070fd7 to 3a4bece Compare May 2, 2024 01:20
@mgduda mgduda changed the base branch from master to develop May 2, 2024 01:21
@mgduda mgduda marked this pull request as ready for review May 2, 2024 01:22
@mgduda mgduda requested a review from gdicker1 May 2, 2024 01:22
Copy link
Collaborator

@gdicker1 gdicker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mgduda mgduda merged commit a4c2a93 into MPAS-Dev:develop May 3, 2024
@mgduda mgduda deleted the all/log_runtime_settings branch May 3, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants