Risorse per professionisti IT > Home page del forum > Windows HPC Server Job Submission and Scheduling > Cannot pass environment variables containing ";" via job submit
Formula una domandaFormula una domanda
 

Con rispostaCannot pass environment variables containing ";" via job submit

  • mercoledì 8 aprile 2009 19.59Dr.Darshan Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    I have a cluster with Windows HPC Server 2008 and Microsoft HPC Pack. I am trying to submit a job using the "job submit" command that needs to set an environment variable with semi-colon delimited values for each task. I have tried the following alternatives, but each of them fails in the same manner:
    Microsoft Windows [Version 6.0.6001]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

    C:\Users\XXXXX>job submit /env:key="value1;value2" dir
    Bad format for 'env' parameter.  Should be /env:name=value;*

    C:\Users\XXXXX>job submit /env:"key=value1;value2" dir
    Bad format for 'env' parameter.  Should be /env:name=value;*

    C:\Users\XXXXX>job submit /env:key=value1;value2 dir
    Bad format for 'env' parameter.  Should be /env:name=value;*

    Could someone please let me know what I am doing incorrectly? The error message is quite incomprehensible and the documentation did not address this problem.

Risposte

  • venerdì 17 aprile 2009 19.04MWirtz Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    I believe you're not doing anything wrong, because the "job submit" command seems to use the ";" as a string delimiter while parsing the argument /env. I guess it's just impossible that way. Maybe you could try to add the set variable command to your commandline string  e.g. like this:

    job submit set key=value1;value2 ^&^& dir

    Make sure to mask the "&" with "^" because otherwise the dir command would be executed directly after your submission command in the local shell.
    Hope this helps.

    - Michael
    • Contrassegnato come rispostaDr.Darshan martedì 5 maggio 2009 18.28
    •  
  • sabato 2 maggio 2009 0.28sayanch1MSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    This issue should be fixed in SP1. However, you might try using the SetEnvironmentVariable method in the Scheduler API as that might work.
    • Contrassegnato come rispostaDr.Darshan martedì 5 maggio 2009 18.29
    •  

Tutte le risposte

  • venerdì 17 aprile 2009 19.04MWirtz Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    I believe you're not doing anything wrong, because the "job submit" command seems to use the ";" as a string delimiter while parsing the argument /env. I guess it's just impossible that way. Maybe you could try to add the set variable command to your commandline string  e.g. like this:

    job submit set key=value1;value2 ^&^& dir

    Make sure to mask the "&" with "^" because otherwise the dir command would be executed directly after your submission command in the local shell.
    Hope this helps.

    - Michael
    • Contrassegnato come rispostaDr.Darshan martedì 5 maggio 2009 18.28
    •  
  • sabato 2 maggio 2009 0.28sayanch1MSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta
    This issue should be fixed in SP1. However, you might try using the SetEnvironmentVariable method in the Scheduler API as that might work.
    • Contrassegnato come rispostaDr.Darshan martedì 5 maggio 2009 18.29
    •  
  • martedì 5 maggio 2009 18.24Dr.Darshan Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Thank you, that was indeed helpful.
  • martedì 5 maggio 2009 18.28Dr.Darshan Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Thank you, I will wait for SP1 and use the previous workaround meanwhile. I would have preferred to use the Scheduler API, but cannot because I am submitting jobs from a Python application.
    • Contrassegnato come rispostaDr.Darshan martedì 5 maggio 2009 18.28
    • Contrassegno come risposta annullatoDr.Darshan martedì 5 maggio 2009 18.28
    •