Ticket 9132 - Information requested by API about threads not right
Summary: Information requested by API about threads not right
Status: OPEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Accounting (show other tickets)
Version: 20.02.2
Hardware: Linux Linux
: C - Contributions
Assignee: Tim Wickberg
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2020-06-01 04:08 MDT by Anton Brekhov
Modified: 2020-06-01 07:39 MDT (History)
0 users

See Also:
Site: -Other-
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
slurm-19.05.3.patch (633 bytes, text/plain)
2020-06-01 04:08 MDT, Anton Brekhov
Details

Note You need to log in before you can comment on or make changes to this ticket.
Description Anton Brekhov 2020-06-01 04:08:47 MDT
Created attachment 14455 [details]
slurm-19.05.3.patch

We're requesting info about threads per core from slurm_job_cpus_allocated_str_on_node_id function by our golang agent. And we're getting an error. 
Here's the patch which helped us:
```
diff -Naur slurm/src/api/job_info.c slurm-19.05.3/src/api/job_info.c
--- slurm/src/api/job_info.c    2019-11-27 09:44:27.244501674 +0000
+++ slurm-19.05.3/src/api/job_info.c    2019-11-27 10:00:33.123122670 +0000
@@ -1771,8 +1771,10 @@

        /* get the number of threads per core on this node
         */
+       _load_node_info();
        if (job_node_ptr)
                threads = job_node_ptr->node_array[node_id].threads;
+       _free_node_info();
        cpu_bitmap = bit_alloc(bit_reps * threads);
        for (j = 0; j < bit_reps; j++) {
                if (bit_test(job_resrcs_ptr->core_bitmap, bit_inx)){
```