@@ -531,7 +531,7 @@ namespace TransferBench
531531 * @note This function is applicable when the IBV/RDMA executor is available
532532 * @returns GPU indices closest to NIC nicIndex, or empty if unable to detect
533533 */
534- void GetClosestGpusToNic (std::vector<int >& nicIndices , int gpuIndex , int targetRank = -1 );
534+ void GetClosestGpusToNic (std::vector<int >& gpuIndices , int nicIndex , int targetRank = -1 );
535535
536536 /* *
537537 * @returns 0-indexed rank for this process
@@ -755,22 +755,22 @@ namespace TransferBench
755755 } \
756756 } while (0 )
757757#else
758- #define IBV_CALL (__func__, ...) \
759- do { \
760- int error = __func__ (__VA_ARGS__); \
761- if (error != 0 ) { \
762- return {ERR_FATAL, " Encountered IbVerbs error (%d) in func (%s) " \
763- , error, #__func__}; \
764- } \
758+ #define IBV_CALL (__func__, ...) \
759+ do { \
760+ int error = __func__ (__VA_ARGS__); \
761+ if (error != 0 ) { \
762+ return {ERR_FATAL, " Encountered IbVerbs error (%d=%s ) in func (%s)" \
763+ , error, strerror (errno), #__func__}; \
764+ } \
765765 } while (0 )
766766
767- #define IBV_PTR_CALL (__ptr__, __func__, ...) \
768- do { \
769- __ptr__ = __func__ (__VA_ARGS__); \
770- if (__ptr__ == nullptr ) { \
771- return {ERR_FATAL, " Encountered IbVerbs nullptr error in func (%s) " \
772- , #__func__}; \
773- } \
767+ #define IBV_PTR_CALL (__ptr__, __func__, ...) \
768+ do { \
769+ __ptr__ = __func__ (__VA_ARGS__); \
770+ if (__ptr__ == nullptr ) { \
771+ return {ERR_FATAL, " Encountered IbVerbs nullptr error (%s) in func (%s) " \
772+ , strerror (errno), #__func__}; \
773+ } \
774774 } while (0 )
775775#endif
776776
@@ -1656,6 +1656,9 @@ namespace {
16561656 " /lib/modules/%s/build/.config" ,
16571657 };
16581658
1659+ // Check if zcat is available in the system
1660+ int has_zcat = (system (" which zcat > /dev/null 2>&1" ) == 0 );
1661+
16591662 for (const auto & path : possiblePaths) {
16601663 // Reset flags for each file
16611664 found_opt1 = 0 ;
@@ -1665,6 +1668,13 @@ namespace {
16651668
16661669 // Special handling for /proc/config.gz
16671670 if (strstr (path, " /proc/config.gz" ) != NULL ) {
1671+ // Skip .gz files if zcat is not available
1672+ if (!has_zcat) {
1673+ if (System::Get ().IsVerbose ()) {
1674+ printf (" [WARN] zcat not available, skipping %s\n " , kernel_conf_file);
1675+ }
1676+ continue ;
1677+ }
16681678 fp = popen (" zcat /proc/config.gz 2>/dev/null" , " r" );
16691679 } else {
16701680 fp = fopen (kernel_conf_file, " r" );
@@ -2584,7 +2594,7 @@ namespace {
25842594 int dstDmabufFd; // /< DMA-BUF file descriptor for DST (if using dmabuf)
25852595 uint64_t srcDmabufOffset; // /< Offset within SRC DMA-BUF
25862596 uint64_t dstDmabufOffset; // /< Offset within DST DMA-BUF
2587- uint8_t qpCount; // /< Number of QPs to be used for transferring data
2597+ uint32_t qpCount; // /< Number of QPs to be used for transferring data
25882598 bool srcIsExeNic; // /< Whether SRC or DST NIC initiates traffic
25892599 vector<vector<ibv_sge>> sgePerQueuePair; // /< Scatter-gather elements per queue pair
25902600 vector<vector<ibv_send_wr>>sendWorkRequests; // /< Send work requests per queue pair
@@ -4269,7 +4279,7 @@ static bool IsConfiguredGid(union ibv_gid const& gid)
42694279 std::vector<std::chrono::high_resolution_clock::time_point> transferTimers (transferCount);
42704280
42714281 do {
4272- std::vector<uint8_t > receivedQPs (transferCount, 0 );
4282+ std::vector<uint32_t > receivedQPs (transferCount, 0 );
42734283 // post the sends
42744284 for (auto i = 0 ; i < transferCount; i++) {
42754285 transferTimers[i] = std::chrono::high_resolution_clock::now ();
0 commit comments