@@ -38,6 +38,10 @@ ATTRIBUTE((unused));
3838
3939#define MPIDI_OFI_WIN (win ) ((win)->dev.netmod.ofi)
4040
41+ #define MPIDI_OFI_NIC_NAME (nic ) (MPIDI_OFI_global.prov_use[nic] ? \
42+ MPIDI_OFI_global.prov_use[nic]->domain_attr->name : "(n/a)")
43+ #define MPIDI_OFI_DEFAULT_NIC_NAME (MPIDI_OFI_NIC_NAME(0))
44+
4145int MPIDI_OFI_progress_uninlined (int vci );
4246int MPIDI_OFI_handle_cq_error (int vci , int nic , ssize_t ret );
4347
@@ -55,18 +59,16 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret);
5559#define MPIDI_OFI_PROGRESS_WHILE (cond , vci ) \
5660 while (cond) MPIDI_OFI_PROGRESS(vci)
5761
58- #define MPIDI_OFI_ERR MPIR_ERR_CHKANDJUMP4
59- #define MPIDI_OFI_CALL (FUNC ,STR ) \
62+ #define MPIDI_OFI_ERR MPIR_ERR_CHKANDJUMP2
63+ #define MPIDI_OFI_CALL (FUNC ,STR ) \
6064 do { \
6165 ssize_t _ret = FUNC; \
6266 MPIDI_OFI_ERR(_ret<0, \
6367 mpi_errno, \
6468 MPI_ERR_OTHER, \
6569 "**ofid_"#STR, \
66- "**ofid_"#STR" %s %d %s %s", \
67- __SHORT_FILE__, \
68- __LINE__, \
69- __func__, \
70+ "**ofid_"#STR" %s %s", \
71+ MPIDI_OFI_DEFAULT_NIC_NAME, \
7072 fi_strerror(-_ret)); \
7173 } while (0)
7274
@@ -81,10 +83,8 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret);
8183 mpi_errno, \
8284 MPI_ERR_OTHER, \
8385 "**ofid_"#STR, \
84- "**ofid_"#STR" %s %d %s %s", \
85- __SHORT_FILE__, \
86- __LINE__, \
87- __func__, \
86+ "**ofid_"#STR" %s %s", \
87+ MPIDI_OFI_DEFAULT_NIC_NAME, \
8888 fi_strerror(-_ret)); \
8989 if (_retry > 0) { \
9090 _retry--; \
@@ -94,9 +94,7 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret);
9494 * for recursive locking in more than one lock (currently limited
9595 * to one due to scalar TLS counter), this lock yielding
9696 * operation can be avoided since we are inside a finite loop. */ \
97- MPIDI_OFI_THREAD_CS_EXIT_VCI_OPTIONAL (vci_ ); \
98- mpi_errno = MPIDI_OFI_retry_progress (); \
99- MPIDI_OFI_THREAD_CS_ENTER_VCI_OPTIONAL (vci_ ); \
97+ mpi_errno = MPIDI_OFI_retry_progress (vci_ , _retry ); \
10098 MPIR_ERR_CHECK (mpi_errno ); \
10199 } while (1 ); \
102100 } while (0 )
@@ -113,9 +111,7 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret);
113111 _retry--; \
114112 MPIR_ERR_CHKANDJUMP(_retry == 0, mpi_errno, MPIX_ERR_EAGAIN, "**eagain"); \
115113 } \
116- MPIDI_OFI_THREAD_CS_EXIT_VCI_OPTIONAL(vci_); \
117- mpi_errno = MPIDI_OFI_retry_progress(); \
118- MPIDI_OFI_THREAD_CS_ENTER_VCI_OPTIONAL(vci_); \
114+ mpi_errno = MPIDI_OFI_retry_progress(vci_, _retry); \
119115 } \
120116 } while (0)
121117
@@ -129,10 +125,8 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret);
129125 mpi_errno, \
130126 MPI_ERR_OTHER, \
131127 "**ofid_"#STR, \
132- "**ofid_"#STR" %s %d %s %s", \
133- __SHORT_FILE__, \
134- __LINE__, \
135- __func__, \
128+ "**ofid_"#STR" %s %s", \
129+ MPIDI_OFI_DEFAULT_NIC_NAME, \
136130 fi_strerror(-_ret)); \
137131 mpi_errno = MPIDI_OFI_progress_do_queue(vci_); \
138132 if (mpi_errno != MPI_SUCCESS) \
@@ -176,10 +170,8 @@ int MPIDI_OFI_handle_cq_error(int vci, int nic, ssize_t ret);
176170 mpi_errno, \
177171 MPI_ERR_OTHER, \
178172 "**ofid_"#STR, \
179- "**ofid_"#STR" %s %d %s %s", \
180- __SHORT_FILE__, \
181- __LINE__, \
182- __func__, \
173+ "**ofid_"#STR" %s %s", \
174+ MPIDI_OFI_DEFAULT_NIC_NAME, \
183175 fi_strerror(-_ret)); \
184176 } while (0)
185177
@@ -299,7 +291,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_mr_bind(struct fi_info *prov, struct fid_
299291#define MPIDI_OFI_LOCAL_MR_KEY 0
300292#define MPIDI_OFI_COLL_MR_KEY 1
301293#define MPIDI_OFI_INVALID_MR_KEY 0xFFFFFFFFFFFFFFFFULL
302- int MPIDI_OFI_retry_progress (void );
294+ int MPIDI_OFI_retry_progress (int vci , int retry );
303295int MPIDI_OFI_recv_huge_event (int vci , struct fi_cq_tagged_entry * wc , MPIR_Request * rreq );
304296int MPIDI_OFI_recv_huge_control (int vci , MPIR_Context_id_t comm_id , int rank , int tag ,
305297 MPIDI_OFI_huge_remote_info_t * info );
0 commit comments