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

Windows #947

Merged
merged 19 commits into from
Jun 2, 2020
Merged

Windows #947

merged 19 commits into from
Jun 2, 2020

Conversation

WeiqunZhang
Copy link
Member

@WeiqunZhang WeiqunZhang commented May 29, 2020

  • 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 in unistd sleeps for given microseconds whereas amrex::USleep sleep for given seconds.

  • Windows CI

@ax3l
Copy link
Member

ax3l commented May 29, 2020

If you like to cherry-pick a remote CI build, I drafted a Windows C++17 build with a recent MSVC in ax3l@ef417d3 :)

@WeiqunZhang
Copy link
Member Author

Great! I will.

@ax3l
Copy link
Member

ax3l commented May 30, 2020

here is another one for commonly needed MSVC flags: ax3l@d60a8d8

ax3l and others added 2 commits May 29, 2020 18:56
- /bigobj: basically anything modern
- /Za: and or keywords
.github/workflows/windows.yml Outdated Show resolved Hide resolved
@WeiqunZhang WeiqunZhang marked this pull request as ready for review June 1, 2020 01:34
@WeiqunZhang
Copy link
Member Author

This is ready for review.

Copy link
Member

@ax3l ax3l left a 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! 🚀 ✨

@WeiqunZhang
Copy link
Member Author

I have run CPU and GPU regression testing using several codes. And beside the CI, I have tested PGI, Cray, Intel, and IBM compilers.

@WeiqunZhang WeiqunZhang merged commit 8272ea8 into AMReX-Codes:development Jun 2, 2020
@WeiqunZhang WeiqunZhang deleted the windows branch June 2, 2020 05:42
@ax3l ax3l mentioned this pull request Dec 2, 2020
5 tasks
WeiqunZhang pushed a commit that referenced this pull request Dec 3, 2020
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants