|
||||||||||||
|
4.1 Submitting with file transferCondor can easily transfer files for you. To do so, you can just add the following lines to your submit file: transfer_input_files = list files here should_transfer_files = YES when_to_transfer_output = ON_EXIT
Condor will automatically transfer the executable, standard input, and
jar files (we'll talk about Java programs later), as well as all the
files you list with You don't need to specify what output files to transfer: Condor finds all of them and sends them back. Here is a re-written submit file for the first job you ran to demonstrate a file transfer. Put it into a file called simplefile.sub: Universe = vanilla Executable = simplefile.bat Arguments = 4 10 Log = simplefile.log.txt Output = simplefile.out.txt Error = simplefile.err.txt transfer_input_files = file1.txt should_transfer_files = YES when_to_transfer_output = ON_EXIT Queue You will need a new batch script, too. This is the same as our previous example, but it also prints out the file that was transfered, so you can see that it was indeed transfered. Call it simplefile.bat: @echo off setlocal set THINKING_TIME=2 set COUNT=10 if not A%1 == A ( set THINKING_TIME=%1 ) if not A%2 == A ( set COUNT=%2 ) echo Thinking really hard for %THINKING_TIME% seconds... rem We use ping here as a hack because "sleep" is non-standard. ping -n %THINKING_TIME% 127.0.0.1 >NUL 2>&1 echo Our result: if %COUNT% GEQ 1 ( for /L %%x in (1,1,%COUNT%) do ( echo %%x ) ) type file1.txt endlocal Finally, create file1.txt. You can put any text you like into it. For example: This is the contents of file1.txt. Run this re-written job. Did it work? |
|||||||||||
|