diff --git a/contribs/cray/srun.pl b/contribs/cray/srun.pl index 985d248069c8fc823970418f1c12933188e71573..9bf61f4d217cc8dd4a2fd6ede791019e9fb2ebda 100755 --- a/contribs/cray/srun.pl +++ b/contribs/cray/srun.pl @@ -344,6 +344,17 @@ my %node_opts; my $command; if ($have_job == 0) { + for ($memory_per_cpu) { + $i = index($memory_per_cpu, "hs"); + if ($i >= 0) { + $memory_per_cpu = substr($memory_per_cpu, 0, $i); + } + $i = index($memory_per_cpu, "h"); + if ($i >= 0) { + $memory_per_cpu = substr($memory_per_cpu, 0, $i); + } + } + $command = "$salloc"; $command .= " --account=$account" if $account; $command .= " --acctg-freq=$acctg_freq" if $acctg_freq; @@ -848,10 +859,11 @@ Applies only when creating a job allocation. Specify the real memory required per node in MegaBytes. Applies only when creating a job allocation. -=item B<--mem-per-cpu=MB> +=item B<--mem-per-cpu=MB>[h|hs] Specify the real memory required per CPU in MegaBytes. Applies only when creating a job allocation. +Append "h" or "hs" for huge page support. =item B<--mem_bind=type>