diff options
author | 2020-11-22 15:14:17 -0800 | |
---|---|---|
committer | 2020-11-22 15:14:17 -0800 | |
commit | 95251950c86378675dbca15e64bdc98949b603cc (patch) | |
tree | 0d0f034b714eae66b569dcd30346afe0d5793cec /Source/Particles/WarpXParticleContainer.cpp | |
parent | 72cebe5af26b6f13034e258bec1f67c3b5c9c680 (diff) | |
download | WarpX-95251950c86378675dbca15e64bdc98949b603cc.tar.gz WarpX-95251950c86378675dbca15e64bdc98949b603cc.tar.zst WarpX-95251950c86378675dbca15e64bdc98949b603cc.zip |
CI: Windows (#1521)
* CI: Windows
Add an MSVC build to CI.
* Windows: _USE_MATH_DEFINES
Fix:
```
error C2065: 'M_PI': undeclared identifier
```
* Windows: no unistd.h
fix:
```
fatal error C1083: Cannot open include file: 'unistd.h':
No such file or directory
```
* Injector: Trivially Copyable only GPU
Only strictly required when we memcopy to accelerator devices.
* Flex: never-interactive
We don't use the interactive mode, so we can save some performance
and address:
```
Parser\wp_parser.lex.cpp(1503,40): error C3861: 'isatty': identifier not found
```
Alternatively, we can include `<io.h>` on Windows.
* MSVC: Vector<Long> != Vector<long>
Fix return and assignment issues with `amrex::Long` != `long`
in `amrex::Vector`.
```
Particles\MultiParticleContainer.cpp(438,13): error C2440: 'return': cannot convert from 'const amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>'
Particles\MultiParticleContainer.cpp(452,94): error C2440: 'initializing': cannot convert from 'amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>'
Particles\MultiParticleContainer.cpp(459,60): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types
Particles\WarpXParticleContainer.cpp(782,51): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types
```
* Windows CI: Parallel Build
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 63b1125c2..df39bd250 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -710,7 +710,7 @@ std::array<Real, 3> WarpXParticleContainer::meanParticleVelocity(bool local) { amrex::Real vy_total = 0.0; amrex::Real vz_total = 0.0; - long np_total = 0; + amrex::Long np_total = 0; amrex::Real inv_clight_sq = 1.0/PhysConst::c/PhysConst::c; |