Add in rlimits_maximize_nofiles() to workaround setrlimit() restrictions on macOS.
Rather than repeat the #ifdef block through five locations, use a common function to handle this and print a consistent error message if there is an issue. From getrlimit(2): setrlimit() now returns with errno set to EINVAL in places that historically succeeded. It no longer accepts "rlim_cur = RLIM_INFINITY" for RLIM_NOFILE. Use "rlim_cur = min(OPEN_MAX, rlim_max)". (This was causing spurious error messages to appear for sbatch/srun.)
Showing
- src/common/slurm_rlimits_info.c 19 additions, 0 deletionssrc/common/slurm_rlimits_info.c
- src/common/slurm_rlimits_info.h 7 additions, 0 deletionssrc/common/slurm_rlimits_info.h
- src/sbatch/sbatch.c 1 addition, 8 deletionssrc/sbatch/sbatch.c
- src/slurmctld/controller.c 2 additions, 4 deletionssrc/slurmctld/controller.c
- src/slurmd/slurmd/slurmd.c 3 additions, 4 deletionssrc/slurmd/slurmd/slurmd.c
- src/slurmdbd/slurmdbd.c 2 additions, 4 deletionssrc/slurmdbd/slurmdbd.c
- src/srun/libsrun/srun_job.c 1 addition, 8 deletionssrc/srun/libsrun/srun_job.c
Loading
Please register or sign in to comment