Dear Slurm developers,


On 01/23/2015 02:33 PM, Dorian Krause wrote:

The patch applies to the current (as of this writing) master branch and
also to slurm-14.11.3.

on top of the previous patch, please consider to add the following one which
removes errors() found in the logs from _step_alloc() and _step_dealloc().

Thanks,
Dorian

-----


diff --git a/src/common/gres.c b/src/common/gres.c
index 03ed18e..af1ea85 100644
--- a/src/common/gres.c
+++ b/src/common/gres.c
@@ -5446,6 +5446,9 @@ static int _step_alloc(void *step_gres_data, void
*job_gres_data,
        xassert(job_gres_ptr);
        xassert(step_gres_ptr);

+       if (0 == job_gres_ptr->node_cnt)        /* no_consume */
+               return SLURM_SUCCESS;
+
        if (node_offset >= job_gres_ptr->node_cnt) {
                error("gres/%s: step_alloc for %u.%u, node offset invalid "
                      "(%d >= %u)",
@@ -5631,6 +5634,14 @@ static int _step_dealloc(void *step_gres_data,
void *job_gres_data,

        xassert(job_gres_ptr);
        xassert(step_gres_ptr);
+
+       if (0 == job_gres_ptr->node_cnt) { /* no_consume */
+               xassert(!step_gres_ptr->node_in_use);
+               xassert(!step_gres_ptr->gres_bit_alloc);
+
+               return SLURM_SUCCESS;
+       }
+
        if (step_gres_ptr->node_in_use == NULL) {
                error("gres/%s: step %u.%u dealloc, node_in_use is NULL",
                      gres_name, job_id, step_id);




------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Reply via email to