[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] python3.6



Odd - I'm not sure why that would work in 2.7 but not in 3.6, because I think it should fail in both. Presumably the 2.7 code is not as strict as 3.6. The legal values of transfer_output are True and False (seeÂhttps://htcondor.readthedocs.io/en/latest/man-pages/condor_submit.html)

Do the jobs appear in the queue if you submit them from 2.7? What's your intended output transfer behavior?

Josh Karpel


On Wed, Aug 7, 2019 at 4:43 PM Larry Martell <larry.martell@xxxxxxxxx> wrote:
     submit_dict = {
      Â'universe': 'vanilla',
      Â'executable':
MODULE_SOURCE_FOR_CLUSTER+'CAPbase/capcompute/util/tasks/compute_radiology.py',
      Â'arguments': str(args),
      Â'output': os.path.join(log_dir, 'compute_radiology.out.'
+ extention),
      Â'error': os.path.join(log_dir, 'compute_radiology.err.' +
extention),
      Â'log': log_file,
      Â'should_transfer_files': 'YES',
      Â'when_to_transfer_output': 'ON_EXIT',
      Â'transfer_output': 'output',
      Â'Initialdir': SYSTEM_ROOT+'/elucid/Cluster/tmp',
      Â'getenv': 'True',
      Â'leave_in_queue': '(JobStatus == 4)',
     }
    Âsubmits.append(htcondor.Submit(submit_dict))

Also my jobs are not running - I never see them in the queue. But this
code works in 2.7 fails in 3.6.


On Wed, Aug 7, 2019 at 5:31 PM Josh Karpel via HTCondor-users
<htcondor-users@xxxxxxxxxxx> wrote:
>
> Hi Larry,
>
> Could you include the code where you make the Submit objects? That's probably where the error is originating, although you don't see it until you actually try to submit the jobs.
>
> Josh Karpel
> karpel@xxxxxxxx
>
>
> On Wed, Aug 7, 2019 at 3:18 PM Larry Martell <larry.martell@xxxxxxxxx> wrote:
>>
>> I have a script that works in python2.7, but when I run it in 3.6 it
>> fails. The code that fails is here:
>>
>>Â Â Â Â Â Âwith schedd.transaction() as txn:
>>Â Â Â Â Â Â Â Âfor i, submit in enumerate(submits):
>>Â Â Â Â Â Â Â Â Â Âid = submit.queue(txn)
>>Â Â Â Â Â Â Â Â Â Âid_map[id] = i
>>Â Â Â Â Â Â Â Â Â Âjob_ids.append(id)
>>
>> The error is on the submit.queue:
>>
>> RuntimeError: transfer_output=output is invalid, must eval to a boolean.