Skip to content

Problem with unicode characters in Slurm job names #33

@laparn

Description

@laparn

Hello to all,

When jobs are submitted with names including unicode characters (perfectly allowed by slurm), then when doing a job.get on them, I get 👍

JobId=90 Name=dédé job
UserId=admin(9999) GroupId=admin(9999)
Priority=4294901746 Account=(null) QOS=(null)
JobState=COMPLETED Reason=None Dependency=(null)
Requeue=1 Restarts=0 BatchFlag=1 ExitCode=0:0
RunTime=00:00:01 TimeLimit=12:00:00 TimeMin=N/A
SubmitTime=2013-05-06T15:53:38 EligibleTime=2013-05-06T15:53:38
StartTime=2013-05-06T15:53:38 EndTime=2013-05-06T15:53:39
PreemptTime=None SuspendTime=None SecsPreSuspend=0
Partition=computes AllocNode:Sid=vpdev-master:24449
ReqNodeList=(null) ExcNodeList=(null)
NodeList=workstation-1-1
BatchHost=workstation-1-1
NumNodes=1 NumCPUs=1 CPUs/Task=1 ReqS:C:T=::*
MinCPUsNode=1 MinMemoryCPU=1024M MinTmpDiskNode=0
Features=(null) Gres=(null) Reservation=(null)
Shared=0 Contiguous=0 Licenses=(null) Network=(null)
Command=/tmp/tmppKlgGg
WorkDir=/tmp

import pyslurm
jobs=pyslurm.job()
jobs.get()
Traceback (most recent call last):
File "", line 1, in
File "pyslurm.pyx", line 1588, in pyslurm.pyslurm.job.get (pyslurm/pyslurm.c:20266)
File "pyslurm.pyx", line 1705, in pyslurm.pyslurm.job.__get (pyslurm/pyslurm.c:21489)
File "slurm.pxd", line 56, in pyslurm.slurm.stringOrNone (pyslurm/pyslurm.c:46456)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)

Clearly, this is something that pyslurm does not like much. I have not tested, but I suppose that unicode character in the workdir will have the same consequences.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions