|
Lines 470-475
extern int slurm_open_stream(slurm_addr_t *addr, bool retry)
Link Here
|
| 470 |
uint16_t port; |
470 |
uint16_t port; |
| 471 |
char ip[32]; |
471 |
char ip[32]; |
|
|
472 |
#ifdef HAVE_NATIVE_CRAY |
| 473 |
char buffer[20]; |
| 474 |
int max_retry = 300; |
| 475 |
int quiesce_fd = open("/sys/class/gni/ghal0/quiesce_status", O_RDONLY); |
| 476 |
retry_cnt = 0; |
| 477 |
while (quiesce_fd >= 0 && retry_cnt < max_retry) { |
| 478 |
if (read(quiesce_fd, buffer, sizeof(buffer)) > 0) { |
| 479 |
if (buffer[0] == '0') |
| 480 |
break; |
| 481 |
} |
| 482 |
usleep(500000); |
| 483 |
if (retry_cnt % 10 == 0) |
| 484 |
debug3("WARNING: ghal0 quiesce status: %c, retry count %d", buffer[0], retry_cnt); |
| 485 |
retry_cnt++; |
| 486 |
close(quiesce_fd); |
| 487 |
quiesce_fd = open("/sys/class/gni/ghal0/quiesce_status", |
| 488 |
O_RDONLY); |
| 489 |
} |
| 490 |
if (quiesce_fd >= 0) |
| 491 |
close(quiesce_fd); |
| 492 |
#endif |
| 493 |
|
| 472 |
if ( (addr->sin_family == 0) || (addr->sin_port == 0) ) { |
494 |
if ( (addr->sin_family == 0) || (addr->sin_port == 0) ) { |
| 473 |
error("Error connecting, bad data: family = %u, port = %u", |
495 |
error("Error connecting, bad data: family = %u, port = %u", |
| 474 |
addr->sin_family, addr->sin_port); |
496 |
addr->sin_family, addr->sin_port); |