swarm-support
[Top][All Lists]
Advanced

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

Re: Drone is making me really mad


From: Theodore C. Belding
Subject: Re: Drone is making me really mad
Date: Wed, 30 Jun 1999 05:38:14 -0400 (EDT)

Hi Paul-

> Sven T posted some examples that propose changing the set  
> 
> param setParamOption = -D
> 
> to
> 
> param setParamOption =" -D"
> 
> but these settings will note even parse with Redhat6, drone 1.03:
> 
> ReadControlFile: Error parsing control file line: param setParamOption
> =" -D"
> 

There must be whitespace (tabs or spaces) before and after the "=" when
you use the param command in the drone control file; use:

 param setParamOption = " -D"

instead of

 param setParamOption =" -D"

This is true for the other commands, as well: In general, where the drone
manual shows whitespace in the examples, it is required. I'm sorry that
this isn't more explicit in the drone manual.

But I'm not sure why you want to do that, since drone already puts
whitespace between command-line options; do you mean the following?

 param setParamOption = "-D "

> There is some discussion/debate/puzzlement over drone in the email
> archive. I can't find any definitive statement on how to just pass in
> one or two simple little arguments to a Swarm program.

You might want to read the drone manual. :)

>From p. 11:

"You can also set program parameters from the control file using the
set command:

set parameter = value

These parameters are dependent on the particular target program being
used.  They are set on the target program's command line, using the
command-line option specified by the Drone parameter setParamOption, just
like the sweep parameters [...]." 

> Drone seems to want to pass all program parameters with -D in front of
> them, as in -Dn=33.

Sort of. It requires that the target program have a command-line option to
set the value of a run-time parameter:

<option><parameter>=<value> 

This command-line option is -D by default, but you can set it to anything
you want by setting setParamOption appropriately.

If you want to pass the string "-n33", unchanged, as a command-line
argument to your program in *all* of your runs, you can just set the
miscOptions parameter to "-n33" in the control file:

 param miscOptions = -n33

We had to make some assumptions about what command line arguments the
target program would take.  The assumptions drone makes about target
programs, and their command-line arguments, are explicitly stated in the
drone manual, in Section 3.3.1, "Target Program Requirements" on p. 20.

When I wrote drone, there was no standard for what command-line arguments
a Swarm program took, or how arguments were parsed, so we had to figure
out our own way of doing things. Since many of the programs we use at
Michigan have upwards of 20-30 run-time parameters, it seemed to make
sense to have a general-purpose command-line option that said "set
parameter X to value Y", instead of defining a distinct command-line
option to set each parameter. For one thing, if you had a distinct option
for each parameter, such as "-n33", this would make the drone control file
even more complicated than it is now: you'd have to tell drone what option
to use for each parameter. I'd suggest writing your program so that it
accepts both "-n33" and "-Dn=33" to set the parameter n to 33; that way
it'd be both compatible with done and work as you want it to from the
command line. But that's just how I'd do things.

If the assumptions drone makes about the target program are incompatible
with the command-line arguments your Swarm program accepts, you can always
write a wrapper script which is called by drone in place of your Swarm
program.  The wrapper script would take the command-line arguments passed
by drone and convert them into a format that your program understands: It
would convert "-Dn=33" to "-n33". Then it would start up your Swarm
program and pass it the new command-line arguments. See Section 3.3.3 of
the drone manual for details. There are some examples of wrapper scripts
included in the drone distribution. 

I'm currently rewriting drone; the next version will be scriptable and
completely customizable using C, C++, Obj C, Perl, Tcl, Python, or
Guile, but I can't predict when it'll be done.
-Ted

--
Ted Belding                              address@hidden 
University of Michigan Center for the Study of Complex Systems
Homepage: http://www-personal.umich.edu/~streak/
PGP key:  http://www-personal.umich.edu/~streak/pgp-key.html


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]