added gpu wrapper test

This commit is contained in:
James E McClure 2021-07-02 11:21:25 -04:00
parent 288d62b824
commit 147f0b9d15

View File

@ -1196,6 +1196,7 @@ void testCommDup( UnitTest *ut )
}
class gpuWrapper{
public:
gpuWrapper(MPI_CLASS MPI_COMM, int MSG_SIZE);
~gpuWrapper();
void Send(double *values);
@ -1224,6 +1225,11 @@ gpuWrapper::gpuWrapper(MPI_CLASS MPI_COMM, int MSG_SIZE){
if (!(rank_X < nprocs)) rank_X = 0;
}
gpuWrapper::~gpuWrapper(){
ScaLBL_FreeDeviceMemory(sendbuf);
ScaLBL_FreeDeviceMemory(recvbuf);
}
void gpuWrapper::Send(double *values){
sendtag = recvtag = 130;
ScaLBL_CopyToDevice(sendbuf,values,sendCount*sizeof(double));