Skip to content
Snippets Groups Projects
Commit fd5b0e56 authored by Mark A. Grondona's avatar Mark A. Grondona Committed by Morris Jette
Browse files

mpi/mvapich: Don't set MPIRUN_PROCESSES by default

The MPIRUN_PROCESSES variable set by the mpi/mvapich plugin probably
is not needed for most if not all recent versions of mvapich.
This environment variable also negatively affects job scalability
since its length is proportional to the number of tasks in a job.
In fact, for very large jobs, the increased environment size can
lead to failures in execve(2).

Since MPIRUN_PROCESSES *might* be required in some older versions of
mvapich, this patch disables the setting of that variable completely
only if SLURM_NEED_MVAPICH_MPIRUN_PROCESSES is not set in the job's
environment. (Thus, by default MPIRUN_PROCESSES is disabled, but
the old behavior may be restored by setting the environment variable
above)
parent b196f153
No related branches found
No related tags found
No related merge requests found
...@@ -101,14 +101,18 @@ int p_mpi_hook_slurmstepd_task (const mpi_plugin_task_info_t *job, ...@@ -101,14 +101,18 @@ int p_mpi_hook_slurmstepd_task (const mpi_plugin_task_info_t *job,
env_array_overwrite_fmt(env, "MPIRUN_MPD", "0"); env_array_overwrite_fmt(env, "MPIRUN_MPD", "0");
debug2("init for mpi rank %u", job->gtaskid); debug2("init for mpi rank %u", job->gtaskid);
/*
* Fake MPIRUN_PROCESSES env var -- we don't need this for
* SLURM at this time. (what a waste)
*/
for (i = 0; i < job->ntasks; i++)
xstrcat (processes, "x:");
env_array_overwrite_fmt(env, "MPIRUN_PROCESSES", "%s", processes); if (getenvp (*env, "SLURM_NEED_MVAPICH_MPIRUN_PROCESSES")) {
/*
* Fake MPIRUN_PROCESSES env var -- we don't need this for
* SLURM at this time. (what a waste)
*/
for (i = 0; i < job->ntasks; i++)
xstrcat (processes, "x:");
env_array_overwrite_fmt(env, "MPIRUN_PROCESSES", "%s",
processes);
}
/* /*
* Some mvapich versions will ignore MPIRUN_PROCESSES If * Some mvapich versions will ignore MPIRUN_PROCESSES If
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment