Skip to content

Commit

Permalink
Display rank too.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Oct 9, 2020
1 parent cbceb99 commit e3acf86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/device_helpers.cuh
Expand Up @@ -391,8 +391,9 @@ using XGBBaseDeviceAllocator = thrust::device_malloc_allocator<T>;

inline void ThrowOOMError(std::exception const& e, size_t bytes) {
auto device = CurrentDevice();
auto rank = rabit::GetRank();
std::stringstream ss;
ss << "Memory allocation error: " << e.what() << "\n"
ss << "Memory allocation error on worker " << rank << ": " << e.what() << "\n"
<< "- Free memory: " << AvailableMemory(device) << "\n"
<< "- Requested memory: " << bytes << std::endl;
LOG(FATAL) << ss.str();
Expand Down

0 comments on commit e3acf86

Please sign in to comment.