-
Notifications
You must be signed in to change notification settings - Fork 365
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
Windows #947
Windows #947
Conversation
If you like to cherry-pick a remote CI build, I drafted a Windows C++17 build with a recent MSVC in ax3l@ef417d3 :) |
Great! I will. |
GH Action image `windows-latest` currently provides a Visual Studio 16 2019.
here is another one for commonly needed MSVC flags: ax3l@d60a8d8 |
- /bigobj: basically anything modern - /Za: and or keywords
This is ready for review. |
There was a problem hiding this 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 and passes CI (MSVC build). I don't have a Windows to runtime test either (or at least I never boot into it). I let others take a look as well. Congrats again! 🚀 ✨
I have run CPU and GPU regression testing using several codes. And beside the CI, I have tested PGI, Cray, Intel, and IBM compilers. |
## Summary Add missing includes to `AMReX_Extension.H`, which pulls the `<iso646.h>` include on Windows for support for `and`/`or`. ## Additional background Seen with Clang 11.0.0 on x64 Windows with Visual Studio 2017 on conda-forge during a WarpX build. See also #947 ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] are described in the proposed changes to the AMReX documentation, if appropriate
If it's Windows, use C++17 for files system operations, and avoid posix functions.
Avoid gcc extension that allows embedded prepressor directive in function macro.
Get around some MSVC template argument deduction issues.
Rename amrex::USleep to amrex:Sleep and use C++ thread for sleep. The reason for renaming is it would be very confusing that
usleep
inunistd
sleeps for given microseconds whereasamrex::USleep
sleep for given seconds.Windows CI