Esempio n. 1
0
/*
 * task_p_pre_launch() is called prior to exec of application task.
 *	It is followed by TaskProlog program (from slurm.conf) and
 *	--task-prolog (from srun command line).
 */
extern int task_p_pre_launch (stepd_step_rec_t *job)
{

	if (use_cpuset) {
		/* set affinity if requested */
		if (slurm_cgroup_conf.task_affinity)
			task_cgroup_cpuset_set_task_affinity(job);
	}

	return SLURM_SUCCESS;
}
Esempio n. 2
0
/*
 * task_pre_launch() is called prior to exec of application task.
 *	It is followed by TaskProlog program (from slurm.conf) and
 *	--task-prolog (from srun command line).
 */
extern int task_pre_launch (slurmd_job_t *job)
{

	if (use_cpuset) {
		/* attach the task ? not necessary but in case of future mods */
		task_cgroup_cpuset_attach_task(job);

		/* set affinity if requested */
		if (slurm_cgroup_conf.task_affinity)
			task_cgroup_cpuset_set_task_affinity(job);
	}

	if (use_memory) {
		/* attach the task ? not necessary but in case of future mods */
		task_cgroup_memory_attach_task(job);
	}

	if (use_devices) {
		task_cgroup_devices_attach_task(job);
	}

	return SLURM_SUCCESS;
}