Skip to content

Eliminate the use of temporary files in the vx_config library #2691

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Enhancement

Please see #2690 which is the parent issue derived from the dtcenter/METplus#2364 discussion.

The vx_config library is one major source of the use of temp files in MET. They are used in two ways:

  1. Each config file read() function reads the input line-by-line. Each line is passed through a utility function to recursively interpret any environment variables referenced. The output is written to a temp file and subsequently read back in.
  2. The logic for parsing thresholds is also handled in by the config file code. The read_string() function is called to do so. It writes the threshold string to be parsed to a temp file prior to calling the read() function to handle it... which uses its own temp file! So at least 2 temp files are used for each threshold string!

This issue is to leverage the std::stringstream class to eliminate the use of temporary files in the vx_config library. While the I/O difference may not be obvious when writing to the local /tmp directory, it will vastly improve performance on the lustre file system used by many HPC's, including WCOSS2 and jet.

Time Estimate

1 day

Sub-Issues

Consider breaking the enhancement down into sub-issues.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as the next official version or Backlog of Development Ideas
  • For the next official version, select the MET-X.Y.Z Development project

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y.Z Development project for development toward the next official release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

Status

🏁 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions