Fix: add missing <string> include in simple_pexsi.h (Intel classic build) - #7933
Merged
mohanchen merged 1 commit intoSep 8, 2026
Merged
Conversation
simple_pexsi.h uses std::string in the simplePEXSI declaration but relies on transitive includes. Intel Classic (icpc) fails with "namespace std has no member string"; include <string> explicitly.
There was a problem hiding this comment.
🟢 Approval recommended
The change is a minimal, correct header self-containment fix with no behavioral impact and no additional risks identified in the diff.
Pull request overview
This pull request fixes a header self-containment issue in the HSolver/PEXSI interface by adding an explicit standard library include required by the header’s public API, addressing an Intel classic (icpc) compilation failure without changing runtime behavior.
Changes:
- Add
#include <string>tosimple_pexsi.hsostd::stringis available without relying on transitive includes.
File summaries
| File | Description |
|---|---|
| source/source_hsolver/module_pexsi/simple_pexsi.h | Adds the missing <string> include to make the public declaration using std::string self-contained. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mohanchen
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.source/changes.Linked Issue
None — trivial header self-containment fix for an Intel classic (icpc) build failure; a dedicated issue would add no information beyond this description.
Unit Tests and/or Case Tests for my changes
mpicxx -std=gnu++14 -fsyntax-onlyon a TU containing only#include "source_hsolver/module_pexsi/simple_pexsi.h"— passes.simple_pexsi.h:20:28: error: 'string' in namespace 'std' does not name a type— confirming the header was not self-contained and only compiled via transitive<string>includes.icpc2021.6/2022.1 build ofpexsi_solver.cpp(which previously emittedsimple_pexsi.h(20): error: namespace "std" has no member "string"): verified on the Intel classic machine.#includeaddition; no runtime behavior change.What's changed?
source_hsolver/module_pexsi/simple_pexsi.h: add#include <string>. The header declaressimplePEXSI(..., const std::string PexsiOptionFile, ...)but only included<mpi.h>;std::stringrelied on transitive includes. GCC/icpx happen to pull in<string>through other headers; Intel classic (icpc) does not, so compilingpexsi_solver.cppfails withnamespace "std" has no member "string". Including<string>explicitly follows the self-contained-header principle and is safe on every compiler.Governance Notes