Skip to content

Commit

Permalink
mxqi: Add underscore to MXQD_JOB_TMPDIR name to forward it properly
Browse files Browse the repository at this point in the history
    $ mxqi -h
    Unknown option: h

    usage: /usr/bin/mxqi OPTIONS

        OPTIONS:

        -j n | --processors n    # set number of processors    (default: 4)
        -m SIZE | --memory SIZE  # set amount of memory        (default: 40G)
        --tmpdir SIZE            # set size of MXQ_JOB_TMPDIR  (default: 100G)
    […]

Currently, running an interactive session, the environment variable
`MXQD_JOB_TMPDIR` is not set due to a missing underscore in the variable
name, that causes it to not get forwarded.

    @hotelcalifornia:~$ env
    SHELL=/usr/bin/bash
    MXQ_SERVERID=main
    MXQ_JOBID=54915408
    MXQI_SUBMIT_WD=/home/pmenzel
    PWD=/home/pmenzel
    LOGNAME=pmenzel
    HOME=/home/pmenzel
    TMPDIR=/dev/shm/mxqd/mnt/job/54915408
    PERL5LIB=/home/pmenzel/perl5/lib/perl5
    MXQ_THREADS=4
    MXQ_TIME=600
    SSH_CONNECTION=141.14.21.78 38894 141.14.16.151 34371
    MXQ_MEMORY=40960
    TERM=xterm-256color
    PERL_MB_OPT=--install_base "/home/pmenzel/perl5"
    USER=pmenzel
    MXQ_HOSTNAME=hotelcalifornia.molgen.mpg.de
    MXQ_HOSTID=12c86da0-a55a-4b72-b587-6b40f466b0b6-436a9-a22
    PERL_MM_OPT=INSTALL_BASE=/home/pmenzel/perl5
    SHLVL=1
    LC_CTYPE=en_US.UTF-8
    PS1=\u@\h:\w\$
    SSH_CLIENT=141.14.21.78 38894 34371
    PERL_LOCAL_LIB_ROOT=/home/pmenzel/perl5
    PATH=/home/pmenzel/perl5/bin:/usr/local/package/bin:/usr/local/bin:/usr/sbin:/usr/bin:/home/pmenzel/bin:/home/pmenzel/.cargo/bin
    MXQ_SLOTS=6
    JOB_ID=54915408
    MAIL=/var/mail/pmenzel
    SSH_TTY=/dev/pts/0
    _=/usr/bin/env

Add the _ score, so it’s correctly matched.
  • Loading branch information
pmenzel committed May 22, 2025
1 parent c919041 commit 78c8d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mxqi/mxqi
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ sub server {
my $s = join (' ', map { exists $ENV{$_} ? sprintf("%s=%s", $_ , $ENV{$_}) : () } qw(
MXQ_HOSTID JOB_ID
MXQ_JOBID MXQ_THREADS MXQ_SLOTS MXQ_MEMORY MXQ_TIME MXQ_HOSTID MXQ_HOSTNAME MXQ_SERVERID
TMPDIR MXQ_JOBTMPDIR CUDA_VISIBLE_DEVICES
TMPDIR MXQ_JOB_TMPDIR CUDA_VISIBLE_DEVICES
));
print $out "SetEnv $s\n" if $s;
print $out "AcceptEnv MXQI_SUBMIT_WD LC_CTYPE\n";
Expand Down

0 comments on commit 78c8d90

Please sign in to comment.