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

Re: [HTCondor-users] condor job wrapper?



Example:Â this worked fine for me. You may do condor_ssh_to_job by putting sleep in a wrapper script so that it will give you some time to do ssh to the job before failure.Â

[vaggarwal@xxxxxxxx ~/test_executable]$ egrep -v "^(#|$)" sleep.sub
transfer_input_files = myexecutable, arg1.txt, arg2.txt
executable = jobwrapper.sh
should_transfer_files = yes
log = output_file
requirements = machine == "condornode500.test.com"
batch_name = 'test'
output = test1_output_file_1
error = test1_error_file_1
queue 1

[vaggarwal@xxxxxxxx ~/test_executable]$ cat jobwrapper.sh
#!/bin/bash
cat arg1.txt
cat arg2.txt
./myexecutable arg1.txt arg2.txt

[vaggarwal@xxxxxxxx ~/test_executable] $ cat myexecutable
#!/bin/bash
cat $1
cat $2

[vaggarwal@xxxxxxxx ~/test_executable]$ cat arg1.txt
hello

[vaggarwal@xxxxxxxx ~/test_executable]$ cat arg2.txt
world

[vaggarwal@xxxxxxxx ~/test_executable]$ cat test1_output_file_1
hello
world
hello
world
[vaggarwal@xxxxxxxx ~/test_executable]$

Thanks & Regards,
Vikrant Aggarwal


On Wed, Jul 1, 2020 at 10:05 PM Nagaraj Panyam <pn@xxxxxxxxxxx> wrote:

Hi,

Prior to executing the actual executable, we need to execute shell scripts. I have the job wrapper shell script as the main executable. Within the shell I execute the shell scripts, then call the executable with its arguments

The job script transfers the initial shell scripts and then the executable. However, the error is that the file "myexecutable not found" even though "ls -l" shows it in the directory on the target machine. What is the correct procedure for this kind of job?

---

my jobwrapper.sh looks like:

#!/bin/bash

source env1.sh

source env2.sh

./myexecutable arg1.txt arg2.txt


my job file looks like

transfer_input_files: env1.sh, env2.sh, myexecutable, arg1.txt, arg2.txt

executable = jobwrapper.sh


Thanks

Nagaraj


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/