Ticket 358 - sacct fields are truncated one character before that is necessary
Summary: sacct fields are truncated one character before that is necessary
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: Accounting (show other tickets)
Version: 2.6.x
Hardware: Linux Linux
: 3 - Medium Impact
Assignee: Danny Auble
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2013-07-02 10:03 MDT by Puenlap Lee
Modified: 2013-07-02 10:46 MDT (History)
0 users

See Also:
Site: Atos/Eviden Sites
Slinky Site: ---
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
Google sites: ---
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

Note You need to log in before you can comment on or make changes to this ticket.
Description Puenlap Lee 2013-07-02 10:03:01 MDT
sudo sacct -o JobID%12,JobName%10,user%6,account%10,partition%10,qos%6
       JobID    JobName   User    Account  Partition    QOS
------------ ---------- ------ ---------- ---------- ------
           0 allocatio+  thipa validatio+            Unkno+
       55143     temoin jouvi+ validatio+        mpi norma+
       55146     temoin jouvi+ validatio+  TestSlurm norma+
       55147    stgj012 jouvi+ validatio+        mpi norma+

JobName : allocation 10 char
User : jouvin 6 char
Account : validation 10 char
Qos : normal 6 char


sudo sacct -o JobID%12,JobName%11,user%7,account%11,partition%10,qos%7
       JobID     JobName    User     Account  Partition     QOS
------------ ----------- ------- ----------- ---------- -------
           0  allocation   thipa  validation            Unknow+
       55143      temoin  jouvin  validation        mpi  normal
       55146      temoin  jouvin  validation  TestSlurm  normal
       55147     stgj012  jouvin  validation        mpi  normal
Comment 1 Puenlap Lee 2013-07-02 10:08:44 MDT
The 2.5.1 and older version of 2.6 are working fine. I think the problem is in the "extern void print_fields_str "routine in /src/common/print_fields.c file.

The old code was:

			if(strlen(value) > abs_len)
				temp_char[abs_len-1] = '+';
			print_this = temp_char;

and the new code is:
			if (abs_len && (len >= abs_len))
				temp_char[abs_len-1] = '+';
			else if ((abs_len == 0) && (len >= sizeof(temp_char)))
				temp_char[sizeof(temp_char)-1] = '+';
			print_this = temp_char;


I believe that the two ">=" should be just ">".
Comment 2 Danny Auble 2013-07-02 10:09:24 MDT
I agree.  I am looking at it now.  I'll see why it was changed.
Comment 3 Danny Auble 2013-07-02 10:46:29 MDT
It appears this is a side effect of commit 0ce7c9aaaf844bbed1e815162103d0a8a24e2c01 dealing with a %0 option in the format string.  I removed the relevant code since it appeared %0 would mess up the formatting of multiple jobs.

Things should be back to normal now after 914992591b28afed573510f5f25e769d1d512e14.

Let me know if you things don't work as you would expect.  Thanks for finding this.