/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2014,2015,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2018,2019,2020, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
return;
}
- CU_CHECK_PREV_ERR();
+ gmx::ensureNoPendingDeviceError("Could not allocate page-locked memory.");
stat = cudaMallocHost(h_ptr, nbytes, flag);
sprintf(strbuf, "cudaMallocHost of size %d bytes failed", (int)nbytes);
return;
}
- CU_CHECK_PREV_ERR();
+ gmx::ensureNoPendingDeviceError("Could not allocate page-locked memory with write-combining.");
stat = cudaMallocHost(h_ptr, nbytes, flag);
sprintf(strbuf, "cudaMallocHost of size %d bytes failed", (int)nbytes);
return;
}
- CU_CHECK_PREV_ERR();
+ gmx::ensureNoPendingDeviceError("Could not free page-locked memory.");
stat = cudaFreeHost(h_ptr);
CU_RET_ERR(stat, "cudaFreeHost failed");