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

Add Runtime Options for logMsgAbort and abort #361

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

danrosen25
Copy link
Member

@danrosen25 danrosen25 commented Mar 5, 2025

  • use ESMF_RUNTIME_LOGMSGABORT to set logMsgAbort for ESMF logs
  • use ESMF_RUNTIME_ABORT to call sigquit for ESMF_Abort

Closes #296

Testing Option 1 (uses an ESMF_Initialize configuration file)

Initialize ESMF

call ESMF_Initialize(configFilenameFromArgNum=1, configFileName="esmf.cfg", &
  defaultDefaultCalKind=ESMF_CALKIND_GREGORIAN, rc=rc)

esmf.cfg

ESMF_RUNTIME_LOGMSGABORT: "ESMF_LOGMSG_ERROR" # calls ESMF_Abort if ERROR is reported to ESMF logs
ESMF_RUNTIME_ABORT: "SIGABRT" # signals abort if ESMF_Abort is called

Testing Option 2 (uses environment variables)

set environment variables

export ESMF_RUNTIME_LOGMSGABORT="ESMF_LOGMSG_ERROR"
export ESMF_RUNTIME_ABORT="SIGABRT" # or "SIGQUIT"

Test Application

esmf_abort.tar.gz

* use ESMF_RUNTIME_LOGMSGABORT to set logMsgAbort for ESMF logs
* use ESMF_RUNTIME_ABORT to call sigquit for ESMF_Abort
@danrosen25 danrosen25 added the feature/enhancement New feature or request label Mar 5, 2025
@danrosen25 danrosen25 requested a review from theurich March 5, 2025 22:08
@danrosen25 danrosen25 self-assigned this Mar 5, 2025
@danrosen25
Copy link
Member Author

I spoke with the team and they like this feature as an alternative method for debugging. It extends the capability of setting logMsgAbort for ESMF logs to a runtime configurable option. It also extents the capability of ESMF_Abort to call SIGQUIT (backtrace and coredump) instead of MPI_Abort, also a runtime configurable option.

The note they gave me today is that users would probably want to set this in code. This is something we can discuss as it probably would exist as a flag for the VM.

* ESMF_RUNTIME_LOGMSGABORT
* ESMF_RUNTIME_ABORT
* check for SIGQUIT, not defined on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to SIGQUIT or throw error during ESMF_Abort
1 participant