Hello, I was hoping to understand this difference in behavior with the --export=NONE option when used in srun vs sbatch. When used in sbatch, attempting to execute mpirun commands will lead to errors about launch failures, presumably because some environmental variable is unset. However, doing the same via an interactive srun job leads to mpirun commands executing successfully. Is there a difference in how --export=NONE behaves via srun vs sbatch? We're hoping to understand why mpirun works in srun so we can direct users who are having trouble with sbatch but still prefer the "clean" environment they get with --export=NONE.
I'm investigating this to make sure I give you correct information. I should be able to post that information within a couple days. Thanks
Will you post exactly what you are running and what errors you get? Specifically, what do you expect to work? (in detail; show me example commands and shell scripts) mpirun inside an interactive srun doesn't work for me. ❯ srun --mpi=pmix -N4 -n4 --preserve-env --pty /usr/bin/bash [broderick@caesar caesar]$ mpirun mpi/xthi -------------------------------------------------------------------------- While trying to determine what resources are available, the SLURM resource allocator expects to find the following environment variables: SLURM_NODELIST SLURM_TASKS_PER_NODE However, it was unable to find the following environment variable: SLURM_TASKS_PER_NODE ... This looks like a bug; let me know if you have seen the same thing or if it is working for you. What MPI implementation and version are you using? OpenMPI, IntelMPI, etc What version of PMI are you using, if any? Is there particular reason you are using `mpirun` instead of `srun`? Thanks
Marking as duplicate of bug 6772. *** This ticket has been marked as a duplicate of ticket 6772 ***