[slurm-users] salloc with bash scripts problem

Renfro, Michael Renfro at tntech.edu
Thu Jan 3 10:41:11 MST 2019


Those errors appear to pop up when qemu can’t find enough RAM to run. If the #SBATCH lines are only applicable for ‘sbatch' and not ‘srun' or ‘salloc', the ‘--mem=8G' setting there doesn’t affect anything.

- Does the srun version of the command work if you specify 'qemu-system-x86_64 -m 2048' or lower in the script?

- Does the srun version of the command work if you specify '--mem=8G' along with the other parameters?

- What’s the DefMemPerCPU setting you see from ‘scontrol show partition’ for whatever your default partition is (grep ‘default=yes’ /path/to/slurm.conf to find out what partition that is)?

I suppose there’s a slim chance of srun adding an additional process to your resource reservation compared to salloc, but that’s just a guess.

> On Jan 3, 2019, at 2:23 AM, Mahmood Naderan <mahmood.nt at gmail.com> wrote:
> 
> Mark Hahn,
> 
> Using srun only returns a memory allocation error while salloc doesn't
> 
> [mahmood at rocks7 ~]$ srun --spankx11 ./run_qemu.sh 
> qemu-system-x86_64: -usbdevice tablet: '-usbdevice' is deprecated, please use '-device usb-...' instead
> qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.fma [bit 12]
> qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.f16c [bit 29]
> qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.tbm [bit 21]
> qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
> srun: error: compute-0-2: task 0: Exited with exit code 1
> [mahmood at rocks7 ~]$ salloc --spankx11 ./run_qemu.sh 
> salloc: Granted job allocation 292
> qemu-system-x86_64: -usbdevice tablet: '-usbdevice' is deprecated, please use '-device usb-...' instead
> qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.fma [bit 12]
> qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.01H:ECX.f16c [bit 29]
> qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.tbm [bit 21]
> salloc: Relinquishing job allocation 292
> [mahmood at rocks7 ~]$ cat run_qemu.sh 
> #!/bin/bash
> #SBATCH --nodes=1
> #SBATCH --cores=1
> #SBATCH --mem=8G
> #SBATCH --partition=QEMU
> #SBATCH --account=q20_8
> USERN=`whoami`
> qemu-system-x86_64 -m 4096 -cpu Opteron_G5 -smp cores=1 -hda win7_x64_snap.img -boot c  -usbdevice tablet -enable-kvm -device e1000,netdev=host_files -netdev user,net=10.0.2.0/24,id=host_files,restrict=off,smb=/home/$USERN,smbserver=10.0.2.4 
> 
> 
> 
> 
> Regards,
> Mahmood
> 
> 
> 
> 
> On Thu, Jan 3, 2019 at 6:21 AM Chris Samuel <chris at csamuel.org> wrote:
> On 30/12/18 9:41 am, Mahmood Naderan wrote:
> 
> > So, isn't possible to override that "default"? I mean the target node. 
> > In the faq page it is possible to change the default command for salloc, 
> > but I didn't see your confirmation.
> 
> The answer was in the FAQ page, but it's not something I've used before 
> so I cannot vouch for how it works.
> 
> All the best,
> Chris
> -- 
>   Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC
> 



More information about the slurm-users mailing list