Skip to content

Commit d98a378

Browse files
committed
Merge branch 'mercury_profiling_interface' of https://github.com/srini009/mercury into mercury_profiling_interface
2 parents ace64be + a55bc1e commit d98a378

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

src/na/na_ofi.c

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ static unsigned long const na_ofi_prov_flags[] = {NA_OFI_PROV_TYPES};
185185

186186
/* Number of retries when receiving FI_EINTR error */
187187
#define NA_OFI_MAX_EINTR_RETRY (1000)
188+
/* The magic number for na_ofi_op_id verification */
189+
#define NA_OFI_OP_ID_MAGIC_1 (0x1928374655627384ULL)
190+
#define NA_OFI_OP_ID_MAGIC_2 (0x8171615141312111ULL)
188191

189192
/* The predefined RMA KEY for MR_SCALABLE */
190193
#define NA_OFI_RMA_KEY (0x0F1B0F1BULL)
@@ -1839,24 +1842,16 @@ na_ofi_domain_open(struct na_ofi_class *priv, enum na_ofi_prov_type prov_type,
18391842

18401843
#ifdef NA_OFI_HAS_EXT_GNI_H
18411844
if (na_ofi_domain->prov_type == NA_OFI_PROV_GNI) {
1842-
int32_t enable = 1;
1843-
# ifdef NA_OFI_GNI_HAS_UDREG
1845+
int enable = 1;
1846+
# ifdef NA_OFI_GNI_HAS_UDREG
18441847
char *other_reg_type = "udreg";
1845-
int32_t udreg_limit = 1024;
18461848

18471849
/* Enable use of udreg instead of internal MR cache */
1848-
ret = na_ofi_gni_set_domain_op_value(
1849-
na_ofi_domain, GNI_MR_CACHE, &other_reg_type);
1850-
NA_CHECK_NA_ERROR(
1851-
error, ret, "Could not set domain op value for GNI_MR_CACHE");
1852-
1853-
/* Experiments on Theta showed default value of 2048 too high if
1854-
* launching multiple clients on one node */
1855-
ret = na_ofi_gni_set_domain_op_value(
1856-
na_ofi_domain, GNI_MR_UDREG_REG_LIMIT, &udreg_limit);
1850+
ret = na_ofi_gni_set_domain_op_value(na_ofi_domain, GNI_MR_CACHE,
1851+
&other_reg_type);
18571852
NA_CHECK_NA_ERROR(error, ret,
1858-
"Could not set domain op value for GNI_MR_UDREG_REG_LIMIT");
1859-
# endif
1853+
"Could not set domain op value for GNI_MR_CACHE");
1854+
# endif
18601855

18611856
/* Enable lazy deregistration in MR cache */
18621857
ret = na_ofi_gni_set_domain_op_value(
@@ -4656,15 +4651,9 @@ na_ofi_progress(
46564651

46574652
if (wait_hdl) {
46584653
/* Wait in wait set if provider does not support wait on FDs */
4659-
int rc = 0, retry_cnt = 0;
4660-
do {
4661-
rc = fi_wait(wait_hdl, (int) (remaining * 1000.0));
4662-
} while (
4663-
rc == -FI_EINTR && retry_cnt++ < NA_OFI_MAX_EINTR_RETRY);
4664-
4654+
int rc = fi_wait(wait_hdl, (int) (remaining * 1000.0));
46654655
if (rc == -FI_ETIMEDOUT)
46664656
break;
4667-
46684657
NA_CHECK_ERROR(rc != 0, out, ret, NA_PROTOCOL_ERROR,
46694658
"fi_wait() failed, rc: %d (%s)", rc,
46704659
fi_strerror((int) -rc));

0 commit comments

Comments
 (0)