Skip to content

Commit

Permalink
Modify memory checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioDelConte committed Dec 13, 2024
1 parent 40e7676 commit 8c739c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions drmaatic/job/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,9 @@ def create(self, validated_data):
drm_params = {
'queue': task.queue.name,
'cpus_per_task': str(task.cpus),
'mem_per_node': task.mem,
}

if task.queue.name != 'local':
drm_params['mem_per_node']: task.mem

p_job = job.get_first_ancestor()

# Take the first 8 characters of the job uuid to use as outfile names
Expand Down
6 changes: 3 additions & 3 deletions drmaatic/queue/models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.core.validators import MaxValueValidator, MinValueValidator
from django.core.validators import MinValueValidator
from django.db import models


class Queue(models.Model):
name = models.CharField(max_length=50, null=False, blank=False, unique=True)
max_cpu = models.PositiveIntegerField(default=16, validators=[MinValueValidator(1), MaxValueValidator(64)],
max_cpu = models.PositiveIntegerField(default=16, validators=[MinValueValidator(1)],
verbose_name="Maximum CPUs per node")
max_mem = models.PositiveIntegerField(default=1024, validators=[MinValueValidator(1), MaxValueValidator(96000)],
max_mem = models.PositiveIntegerField(default=1024, validators=[MinValueValidator(1)],
verbose_name="Maximum memory (MB) per node")

def __str__(self):
Expand Down

0 comments on commit 8c739c2

Please sign in to comment.