appspack_serial
- compiled by default appspack_mpi
- compiled if MPI is enabled (e.g., --with-mpi-compilers
is specified at configure time) To use either of these, you need only complete three steps.
We use example1
for illustration. The code for this example is provided in the examples
directory (at the top level of the source tree).
<Executable Name> <Input Prefix>.<tag> <Output Prefix>.<tag> <tag>
example1 ex1_in.27 ex1_out.27 27
The tag is a unique identifier that is assigned to each trial point and is used in the naming of files to prevent conflicts. Thus, the calling sequence is as follows: the first argument is the name of the executable, the second argument is the name of the input file, the third argument is the name of the output file, and the fourth argument is a unique tag that can be used in the naming of auxillary files.
The input file is very simply formatted. The first line is an integer that indicates the length of the vector. This is then is followed by the vector itself, one entry per line.
2 1.24e-1 17.4e-3
Likewise, the output file is also simply formatted. It should contain either a single numeric entry that is the function value or an error string.
7.58e-3
Infeasible wrt Nonlinear Constraint 5
In most cases, the executable you provide is actually a script that goes through several steps in order to calculate the objective value. If you are creating auxillary files, it is important that you use the tag (the fourth argument in the calling sequence) in the naming of your files to prevent conflicts. This is particularly important if running the MPI version of APPSPACK.
See the APPSPACK::Evaluator::SystemCall object for details on how the evaluation is processed.
examples/example1
.apps):
# SAMPLE APPSPACK INPUT FILE @ "Evaluator" "Executable Name" string "/home/username/appspack/examples/example1" "Input Prefix" string "ex1_in" "Output Prefix" string "ex1_out" @@ @ "Bounds" "Upper" vector 2 1 1 "Lower" vector 2 -1 -1 @@ @ "Solver" "Debug" int 4 "Initial X" vector 2 2e-1 0.3 @@
#
. The beginning of a category is specified by a @
followed by a space and then the category name in quotes. The end of a category is designated by a line containing the symbols @. Within a category, parameters are defined by name (in quotes), type (string
, int
, double
, vector
, or bool
,), and value. String values, such as the executable name, are given in quotes. Double and integer values are just numbers. Vectors values include an integer that represents their length followed by each entry. Boolean values are written without quotes. The only recognized boolean values are true
and false
, and any other input is treated as false. To summarize:
"String Parameter Name" string "A string" "Integer Parameter Name" int 4 "Double Parameter Name" double 3.0 "Vector Parameter Name" vector 2 0.3 0.4
@ "Sublist List Name In Quotes" ... @@
See APPSPACK::parseTextInputFile() for more details.
The command line for what is illustrated might look something like the following:
appspack_serial example1.apps
In the serial version, there is one copy of APPSPACK running.
Serial APPSPACK
There is one master processor, and the remainder are workers that actually run the simulations. The command line varies a bit depending on your version of MPI. However, the command line for what is illustrated might be something like the following:
mpirun -np 5 appspack_mpi example1.apps
MPI APPSPACK
© Sandia Corporation | Site Contact | Privacy and Security
Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by
1.3.8 written by Dimitri van Heesch,
© 1997-2002