From 95251950c86378675dbca15e64bdc98949b603cc Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sun, 22 Nov 2020 15:14:17 -0800 Subject: 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 `` on Windows. * MSVC: Vector != Vector 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>' to 'amrex::Vector>' Particles\MultiParticleContainer.cpp(452,94): error C2440: 'initializing': cannot convert from 'amrex::Vector>' to 'amrex::Vector>' 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 --- Source/Particles/WarpXParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Particles/WarpXParticleContainer.cpp') 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 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; -- cgit v1.2.3