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

Re: [condor-users] New user questions about condor_submit



Erik Paulson wrote:
Brian Baer wrote:
>
> 1)  We often make a number of runs of the same program with the only
> difference being a different random number seed.  If we were running
> the program from the command line the syntax would be:
>
>    primitive -s $seed
>
> inside of our condor command file we could do something like:
>
>    executable = ./primitive
>    arguments = -s $(Process)
>    queue 10
>
> However sometimes we don't want to start the sequence from 0.  Is
> there someway to change the starting value of the Process variable?
> Or is there someway to do some basic math inside the command file
> like:
>
>    arguments = -s $(Process)+$(Some_Offset)
>
> or
>
>    arguments = -s `echo "$(Process)+$(Some_Offset)" | bc`
>

Not using condor_submit. We've thought about it in the past, and the current
thinking in Perl/Python/tcsh are better scripting languages than we can
come up with, so we think people are better off writing Perl scripts that
write out submit files.

For example, it should be easy to replace your executable with a simple shell wrapper which increments the Process ID and then calls your "real" executable. E.g.:


  % cat > plusone.sh
  #!/bin/sh
  OFFSET=1
  exec ./primitive -s $[$OFFSET + $1]
  ^D
  % chmod 755 plusone.sh

...and then in your Condor submit file, change:

  executable = plusone.sh
  arguments = $(Process)

(And if you don't use a shared filesystem between submit and execute nodes, you will also need to specify your "real" executable in transfer_input_files, since only plusone.sh will be automatically sent for you by Condor.)

-Peter


--- Peter Couvares http://www.cs.wisc.edu/~pfc Condor Project Research pfc@xxxxxxxxxxx University of Wisconsin-Madison (608) 265-8936

Condor Support Information:
http://www.cs.wisc.edu/condor/condor-support/
To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with
unsubscribe condor-users <your_email_address>