View | Details | Raw Unified | Return to ticket 3318 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/common/slurm_protocol_socket_implementation.c (+22 lines)
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
472
473
#ifdef HAVE_NATIVE_CRAY
474
	char buffer[20];
475
	int max_retry = 300;
476
	int quiesce_fd = open("/sys/class/gni/ghal0/quiesce_status", O_RDONLY);
477
	retry_cnt = 0;
478
	while (quiesce_fd >= 0 && retry_cnt < max_retry) {
479
		if (read(quiesce_fd, buffer, sizeof(buffer)) > 0) {
480
			if (buffer[0] == '0')
481
				break;
482
		}
483
		usleep(500000);
484
		if (retry_cnt % 10 == 0)
485
			debug3("WARNING: ghal0 quiesce status: %c, retry count %d", buffer[0], retry_cnt);
486
		retry_cnt++;
487
		close(quiesce_fd);
488
		quiesce_fd = open("/sys/class/gni/ghal0/quiesce_status",
489
				  O_RDONLY);
490
	}
491
	if (quiesce_fd >= 0)
492
		close(quiesce_fd);
493
#endif
494
473
	if ( (addr->sin_family == 0) || (addr->sin_port  == 0) ) {
495
	if ( (addr->sin_family == 0) || (addr->sin_port  == 0) ) {
474
		error("Error connecting, bad data: family = %u, port = %u",
496
		error("Error connecting, bad data: family = %u, port = %u",
475
			addr->sin_family, addr->sin_port);
497
			addr->sin_family, addr->sin_port);

Return to ticket 3318