Esempio n. 1
0
/* Send GRES information to slurmstepd on the specified file descriptor */
extern void send_stepd(int fd)
{
	int mps_cnt;
	mps_dev_info_t *mps_ptr;
	ListIterator itr;

	common_send_stepd(fd, gres_devices);

	if (!mps_info) {
		mps_cnt = 0;
		safe_write(fd, &mps_cnt, sizeof(int));
	} else {
		mps_cnt = list_count(mps_info);
		safe_write(fd, &mps_cnt, sizeof(int));
		itr = list_iterator_create(mps_info);
		while ((mps_ptr = (mps_dev_info_t *) list_next(itr))) {
			safe_write(fd, &mps_ptr->count, sizeof(uint64_t));
			safe_write(fd, &mps_ptr->id, sizeof(int));
		}
		list_iterator_destroy(itr);
	}
	return;

rwfail:	error("%s: failed", __func__);
	return;
}
Esempio n. 2
0
/* Send GRES information to slurmstepd on the specified file descriptor*/
extern void send_stepd(int fd)
{
	common_send_stepd(fd, gres_devices);
}