forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 231
Native Windows (MSYS2/MinGW-w64) build for ABACUS (Useful Information for Native Windows system) #7423
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
Merged
Merged
Native Windows (MSYS2/MinGW-w64) build for ABACUS (Useful Information for Native Windows system) #7423
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
597e42d
Native Windows port (Phase 1 scaffolding): serial PW build on MinGW-w64
ErjieWu bd6371b
Native Windows port (Phase 1): serial PW build compiles, links, runs
ErjieWu 4f2e62e
Fix all-zero seeded random wavefunctions in serial (non-MPI) PW build
ErjieWu f86fd99
Windows: use the existing toolchain + serial test harness, drop bespo…
ErjieWu b6ebfd6
Windows test: run the whole 01_PW suite, drop the curated case list
ErjieWu 255513a
Windows toolchain: provide a generic `abacus` command after build
ErjieWu a32e103
Fix Binstream binary file I/O on Windows (force binary fopen mode)
ErjieWu 32f6ab0
Fix uninitialized structure factor in serial bspline_sf (wrong energy)
ErjieWu 77150d2
docs(windows): note pw_seed cross-platform non-reproducibility (078 i…
ErjieWu fe0f93b
toolchain(windows): clarify to run abacus_env.sh inside a mingw bash
ErjieWu 1d0575d
fix(lcao): guard null deref of DeePKS overlap_orb_alpha when DeePKS i…
ErjieWu cb60705
Windows toolchain: add LCAO + MPI (MS-MPI + ScaLAPACK) build
ErjieWu 2ed5a8c
toolchain(windows): make the unmodified test harness drive MS-MPI
ErjieWu 763f788
toolchain(windows): add MS-MPI Bin (MSMPI_BIN) to PATH in abacus_env.sh
ErjieWu 3acecd9
fix: restore Linux link of FFT_CPU<float> and harden parse_expression
ErjieWu 5cfa159
fft: make the weak-vtable trick Windows-safe without touching Linux code
ErjieWu fa7b577
toolchain(windows): cap default build parallelism by available RAM
ErjieWu 35262de
docs(windows): remove install_windows_native.md
ErjieWu 1e88467
Merge branch 'develop' into windows
ErjieWu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #ifndef MODULEBASE_FS_COMPAT_H | ||
| #define MODULEBASE_FS_COMPAT_H | ||
|
|
||
| //========================================================== | ||
| // Small filesystem-portability helpers. | ||
| // | ||
| // The POSIX `mkdir(path, mode)` takes a permission-mode argument that | ||
| // does not exist in the Windows CRT (`_mkdir`/MinGW `mkdir` take only a | ||
| // path). This header provides a single cross-platform directory-creation | ||
| // helper so call sites stay identical on every platform. | ||
| //========================================================== | ||
|
|
||
| #include <cerrno> | ||
| #include <string> | ||
|
|
||
| #ifdef _WIN32 | ||
| #include <direct.h> // _mkdir | ||
| #else | ||
| #include <sys/stat.h> // mkdir | ||
| #include <sys/types.h> | ||
| #endif | ||
|
|
||
| namespace ModuleBase | ||
| { | ||
|
|
||
| /** | ||
| * @brief Create a single directory, portably. | ||
| * | ||
| * @param path directory path to create | ||
| * @return 0 on success; -1 on failure with `errno` set (e.g. EEXIST when | ||
| * the directory already exists), matching POSIX `mkdir` semantics. | ||
| * | ||
| * On Windows the permission mode is not applicable and is ignored; on | ||
| * POSIX systems the directory is created with mode 0755 (subject to umask), | ||
| * preserving the previous behaviour of the call sites. | ||
| */ | ||
| inline int make_directory(const std::string& path) | ||
| { | ||
| #ifdef _WIN32 | ||
| return _mkdir(path.c_str()); | ||
| #else | ||
| return mkdir(path.c_str(), 0755); | ||
| #endif | ||
| } | ||
|
|
||
| } // namespace ModuleBase | ||
|
|
||
| #endif // MODULEBASE_FS_COMPAT_H |
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
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
20 changes: 20 additions & 0 deletions
20
source/source_base/module_container/base/core/cpu_allocator.cpp
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.