diff --git a/common/ScaLBL.h b/common/ScaLBL.h index 998ad74b..65211440 100644 --- a/common/ScaLBL.h +++ b/common/ScaLBL.h @@ -10,7 +10,6 @@ #ifndef ScalLBL_H #define ScalLBL_H #include "common/Domain.h" -#include "common/WideHalo.h" extern "C" int ScaLBL_SetDevice(int rank); diff --git a/common/WideHalo.h b/common/WideHalo.h index 24429e3f..601eda13 100644 --- a/common/WideHalo.h +++ b/common/WideHalo.h @@ -106,8 +106,9 @@ private: } } } - ScaLBL_AllocateZeroCopy((void **) &dvcList, count*sizeof(int)); // Allocate device memory - ScaLBL_CopyToZeroCopy(dvcList,List,count*sizeof(int)); + size_t numbytes=count*sizeof(int); + ScaLBL_AllocateZeroCopy((void **) &dvcList, numbytes); // Allocate device memory + ScaLBL_CopyToZeroCopy(dvcList,List,numbytes); return count; } diff --git a/tests/TestWideHalo.cpp b/tests/TestWideHalo.cpp index b78426e0..cc29a15d 100644 --- a/tests/TestWideHalo.cpp +++ b/tests/TestWideHalo.cpp @@ -7,6 +7,7 @@ #include #include #include "common/ScaLBL.h" +#include "common/WideHalo.h" #include "common/MPI_Helpers.h" using namespace std; @@ -168,7 +169,7 @@ int main(int argc, char **argv) //Create a second communicator based on the regular data layout ScaLBL_Communicator ScaLBL_Comm_Regular(Dm); ScaLBL_Communicator ScaLBL_Comm(Dm); - ScaLBLWideHalo_Communicator WideHalo(Dm); + ScaLBLWideHalo_Communicator WideHalo(Dm,2); // LBM variables if (rank==0) printf ("Set up the neighborlist \n");