Resources for IT Professionals > 포럼 홈 > Windows HPC Server Job Submission and Scheduling > Cannot pass environment variables containing ";" via job submit
질문하기질문하기
 

답변됨Cannot pass environment variables containing ";" via job submit

  • 2009년 4월 8일 수요일 오후 7:59Dr.Darshan 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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.

답변

  • 2009년 4월 17일 금요일 오후 7:04MWirtz 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    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
    • 답변으로 표시됨Dr.Darshan 2009년 5월 5일 화요일 오후 6:28
    •  
  • 2009년 5월 2일 토요일 오전 12:28sayanch1MSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    This issue should be fixed in SP1. However, you might try using the SetEnvironmentVariable method in the Scheduler API as that might work.
    • 답변으로 표시됨Dr.Darshan 2009년 5월 5일 화요일 오후 6:29
    •  

모든 응답

  • 2009년 4월 17일 금요일 오후 7:04MWirtz 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    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
    • 답변으로 표시됨Dr.Darshan 2009년 5월 5일 화요일 오후 6:28
    •  
  • 2009년 5월 2일 토요일 오전 12:28sayanch1MSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    This issue should be fixed in SP1. However, you might try using the SetEnvironmentVariable method in the Scheduler API as that might work.
    • 답변으로 표시됨Dr.Darshan 2009년 5월 5일 화요일 오후 6:29
    •  
  • 2009년 5월 5일 화요일 오후 6:24Dr.Darshan 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Thank you, that was indeed helpful.
  • 2009년 5월 5일 화요일 오후 6:28Dr.Darshan 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    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.
    • 답변으로 표시됨Dr.Darshan 2009년 5월 5일 화요일 오후 6:28
    • 답변으로 표시 취소됨Dr.Darshan 2009년 5월 5일 화요일 오후 6:28
    •