Thanks much for nitpick - it's helpful tip.
I ran few test with R /w and w/o S and it seems like Slurm (or 'ps' command) doesn't know anything about Singularity - it only detects actual process.
Singularity doesn't spawn a separate process.
For example, when I run R and check 'ps ax' output:
* R 3.4.1 /w S:
9870 8.8 0.0 231732 36092 pts/8 S+ 15:44 0:00 /opt/R/3.4.1/lib64/R/bin/exec/R
* R 3.2.0 native:
7240 0.6 0.0 179356 30520 pts/8 S+ 15:37 0:00 /cluster/shared/apps/R/3.2.0/lib64/R/bin/exec/R
The 'ps' command (and as result the Slurm ) only 'sees' the R process.
R 3.4.1 /w S uses slightly more memory compared to R 3.2.0 native.
It's hard to tell if it's related to Singularity or new R version uses more memory.
So far it looks OK and there should be no reason for Slurm to kill S jobs.
It's possible that the issue is related to Slurm itself - I think we few version behind current Slurm version.
Thank you.