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 example4.cpp for illustration.
<Executable Name> <Input Prefix>.<tag> <Output Prefix>.<tag> <tag>
example4 example4_input.27 example4_output.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.
4 2.25 4.64 2.25 8.57e-1
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.
2.324e2
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/example4.apps) specifying the following feasible region:
and
# SAMPLE APPSPACK INPUT FILE @ "Linear" "Upper" vector 4 10 10 10 10 "Lower" vector 4 -10 -10 -10 -10 "Scaling" vector 4 1 1 1 1 "Inequality Upper" vector 2 DNE -1 "Inequality Lower" vector 2 -10 DNE "Equality Bound" vector 1 3 "Inequality Matrix" matrix 2 4 -1 -1 -1 -1 1 -1 1 -1 "Equality Matrix" matrix 1 4 2 0 2 -7 @@ @ "Evaluator" "Executable Name" string "/home/username/appspack/examples/example4" "Input Prefix" string "example4_input" "Output Prefix" string "example4_output" @@ @ "Solver" "Debug" int 3 "Initial X" vector 4 -1 1 -1 -1 "Step Tolerance" double 1e-3 @@
"<String Parameter Name>" string "<A string>" "<Integer Parameter Name>" int <value> "<Double Parameter Name>" double <value>
"<Vector Parameter Name>" vector <N> <value1> ... <valueN>
"<Matrix Parameter Name>" matrix <M> <N> <(1,1) entry> <(1,2) entry> ... <(1,N) entry> <(2,1) entry> <(2,2) entry> ... <(2,N) entry> ... <(M,1) entry> <(M,2) entry> ... <(M,N) entry>
@ "<Sublist List Name>" ... @@
This input file is processed by APPSPACK::parseTextInputFile() to create a Parameter::List with three sublists: "Evaluator", "Linear", and "Solver". These sublists are then used as arguments to the constructors for the APPSPACK::Evaluator::SystemCall, APPSPACK::Constraints::Linear, and APPSPACK::Solver objects, respectively.
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 Fri Feb 16 10:33:36 2007 for APPSPACK 5.0.1 by
1.3.9.1 written by Dimitri van Heesch,
© 1997-2002