Giter Club home page Giter Club logo

Comments (7)

gingergeeks avatar gingergeeks commented on May 15, 2024

Hi,
Sorry for the delay, have been distracted by other things. I will take a look at the weekend.

Mark

from pyslurm.

laparn avatar laparn commented on May 15, 2024

Thanks Mark. Good luck.

from pyslurm.

gingergeeks avatar gingergeeks commented on May 15, 2024

Any additional info you can provide ? cluster/platform and what nodes were in the cluster.

from pyslurm.

gingergeeks avatar gingergeeks commented on May 15, 2024

Laparn,
I have traced the issue, this whole area of code needs some serious reworking but I have a temporary fix up at the moment. I will commit the change once I check the data more.

Regards

Mark

from pyslurm.

laparn avatar laparn commented on May 15, 2024

I found the error message in src/plugins/select/linear/select_linear.c at the end of the function extern int select_p_select_nodeinfo_get :

extern int select_p_select_nodeinfo_get(select_nodeinfo_t *nodeinfo,
                    enum select_nodedata_type dinfo,
                    enum node_states state,
                    void *data)
{
    int rc = SLURM_SUCCESS;
    uint16_t *uint16 = (uint16_t *) data;
    char **tmp_char = (char **) data;
    select_nodeinfo_t **select_nodeinfo = (select_nodeinfo_t **) data;

    if (nodeinfo == NULL) {
        error("get_nodeinfo: nodeinfo not set");
        return SLURM_ERROR;
    }

    if (nodeinfo->magic != NODEINFO_MAGIC) {
        error("get_nodeinfo: nodeinfo magic bad");
        return SLURM_ERROR;
    }

    switch (dinfo) {
    case SELECT_NODEDATA_SUBGRP_SIZE:
        *uint16 = 0;
        break;
    case SELECT_NODEDATA_SUBCNT:
        if (state == NODE_STATE_ALLOCATED)
            *uint16 = nodeinfo->alloc_cpus;
        else
            *uint16 = 0;
        break;
    case SELECT_NODEDATA_PTR:
        *select_nodeinfo = nodeinfo;
        break;
    case SELECT_NODEDATA_RACK_MP:
    case SELECT_NODEDATA_EXTRA_INFO:
        *tmp_char = NULL;
        break;
    default:
        error("Unsupported option %d for get_nodeinfo.", dinfo);
        rc = SLURM_ERROR;
        break;
    }
    return rc;

The enum dinfo is a select_nodedata_type which is defined in slurm.h .

What happens in the code above is that SELECT_NODEDATA_BITMAP is not a case in the switch. Then when it occurs (and it is the case here), it ends up on default and the error message appears.

enum select_nodedata_type {
    SELECT_NODEDATA_BITMAP_SIZE, /* data-> uint16_t */
    SELECT_NODEDATA_SUBGRP_SIZE, /* data-> uint16_t */
    SELECT_NODEDATA_SUBCNT,      /* data-> uint16_t */
    SELECT_NODEDATA_BITMAP,      /* data-> bitstr_t * needs to be
                      * freed with FREE_NULL_BITMAP */
    SELECT_NODEDATA_STR,         /* data-> char *  needs to be
                      * freed with xfree */
    SELECT_NODEDATA_PTR,         /* data-> select_nodeinfo_t *nodeinfo */
    SELECT_NODEDATA_EXTRA_INFO,  /* data-> char *  needs to be
                      * freed with xfree */
    SELECT_NODEDATA_RACK_MP,     /* data-> char * needs to be
                      * freed with xfree */
};

This is clearly not a pyslurm bug, but a slurm one. It should be reported there. There is no impact on pyslurm.

from pyslurm.

gingergeeks avatar gingergeeks commented on May 15, 2024

Hi,
Thank you for the report. I will have a look just to make sure PySlurm is not missing some code logic once the pressures of work have resided :(

Mark

from pyslurm.

gingergeeks avatar gingergeeks commented on May 15, 2024

I reworked the code a long time ago for this so it should be closed. Please reopen if still a problem

from pyslurm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.