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

[HTCondor-users] web service API:sendFile() failed



Hi all,

I am using the web service condor provided to submit job, but it seems the file did not got send successfully, the length of the file created on the server is 0. So the job can't be executed successfully. 

Here is my code using the web service:

    tran_status = schedd.service.beginTransaction(30)
    status_enum = schedd.factory.create("StatusCode")
    universe_enum = schedd.factory.create("UniverseType")
    hash_enum = schedd.factory.create("HashType")
    if tran_status.status.code != status_enum.SUCCESS:
        exit(1)

    schedd_tran = tran_status.transaction
    clu_id = schedd.service.newCluster(schedd_tran)
    job_id = schedd.service.newJob(schedd_tran, clu_id.integer)
    
    mpi1 = open("mpiscript", mode="rb")
    mpi2 = base64.b64encode(mpi1.read())
    schedd.service.declareFile(schedd_tran, clu_id.integer, job_id.integer, "mpiscript", len(mpi2), hash_enum.NOHASH, "")
    schedd.service.sendFile(schedd_tran, clu_id.integer, job_id.integer, "mpiscript", 0, mpi2)
    requiretment = "log = mpi.log;output= mpi.out;error= mpi.errors;machine_count= 4;" \
                            "should_transfer_files= Yes;transfer_input_files= bta4;when_to_transfer_output = ON_EXIT;queue"
    class_ad = schedd.service.createJobTemplate(clu_id.integer, job_id.integer, "condor",
                                  universe_enum.PARALLEL, "mpiscript", "./bta4", requiretment)
    schedd.service.submit(schedd_tran, clu_id.integer, job_id.integer, class_ad.classAd)
    schedd.service.commitTransaction(schedd_tran)
The job status changed to "held"  several seconds after it being submitted.
and here is the output of condor_q -held:
    Error from slot1@xxxxxxxxxx: SHADOW at 10.1.1.103 failed to send file(s) to <10.1.1.103:9659>: error reading from     
    /tmp/var/condor/spool/56/0/cluster56.proc0.subproc0/mpiscript: (errno 2) No such file or directory; STARTER failed to receive file(s) from <10.1.1.103:9820>
The problem really troubled me and seek for your help!

Any help will be appreciated!

Regards,
Kathy