@@ -196,6 +196,8 @@ public List<Queue> getOfferQueues() {
196196 @ Validate (on = {"sestavovac" }, required = true , minvalue = 1 )
197197 long mem = 400 ;
198198 String memu = "mb" ;
199+ long gpu_mem = 0L ;
200+ String gpu_memu = "mb" ;
199201 int nodes = 1 ;
200202 int ncpus = 1 ;
201203 int ngpus = 0 ;
@@ -233,10 +235,11 @@ public Resolution sestavovac() {
233235 Resolution r = data ();
234236 if (r != null ) return r ;
235237 //Sestavovac
236- log .info ("sestavovac() user={} -l walltime={}:{}:{}:,q={},nodes={}:ncpus={}:scratch_{}={}{}:mem={}{}: resources= {}:cluster={}:city={}:spec={}" ,
237- user , wh , wm , ws , fronta , nodes , ncpus , scratchtype , scratch , scratchu , mem , memu , resources ,cluster ,city ,spec );
238+ log .info ("sestavovac() user={} -l walltime={}:{}:{}:,q={},nodes={}:ncpus={}:scratch_{}={}{}:mem={}{}:gpu_mem={}{}: resources= {}:cluster={}:city={}:spec={}" ,
239+ user , wh , wm , ws , fronta , nodes , ncpus , scratchtype , scratch , scratchu , mem , memu , gpu_mem , gpu_memu , resources ,cluster ,city ,spec );
238240
239241 long memBytes = PbsUtils .parsePbsBytes (this .mem + this .memu );
242+ long gpuMemBytes = PbsUtils .parsePbsBytes (this .gpu_mem + this .gpu_memu );
240243 long scratchBytes = PbsUtils .parsePbsBytes (this .scratch + this .scratchu );
241244 long walltimeSecs = walltimeSecs ();
242245
@@ -299,6 +302,11 @@ public Resolution sestavovac() {
299302 log .debug ("node {} has not enough RAM: {}<{}" , node .getName (), node .getTotalMemoryInt (), memBytes );
300303 continue ;
301304 }
305+ //musi mit dost GPU pameti
306+ if (node .getGpuMemoryInt () < gpuMemBytes ) {
307+ log .debug ("node {} has not enough GPU memory: {}<{}" , node .getName (), node .getGpuMemoryInt (), gpuMemBytes );
308+ continue ;
309+ }
302310 //musi mit vhodny typ scratche
303311 Scratch nodeScratch = node .getScratch ();
304312 if (scratchBytes > 0 ) {
@@ -422,6 +430,22 @@ public void setMem(long mem) {
422430 this .mem = mem ;
423431 }
424432
433+ public long getGpu_mem () {
434+ return gpu_mem ;
435+ }
436+
437+ public void setGpu_mem (long gpu_mem ) {
438+ this .gpu_mem = gpu_mem ;
439+ }
440+
441+ public String getGpu_memu () {
442+ return gpu_memu ;
443+ }
444+
445+ public void setGpu_memu (String gpu_memu ) {
446+ this .gpu_memu = gpu_memu ;
447+ }
448+
425449 public int getNodes () {
426450 return nodes ;
427451 }
0 commit comments