Back to SYMPHONY Home Page
Next: Source Files
Up: Introduction
Previous: Changes to the User
Getting Started
Here is a sketch outline of how to get started with SYMPHONY. This is
basically the same information contained in the README file that comes
with the distribution.
Because SYMPHONY is inherently intended to be compiled and run on
multiple architectures and in multiple configurations, I have chosen
not to use the automatic configuration scripts provided by GNU. With
the make files provided, compilation for multiple architectures and
configurations can be done in a single directory without reconfiguring
or ``cleaning''. This is very convenient, but it means that there is
some hand configuring to do and you might need to know a little about
your computing environment in order to make SYMPHONY compile. For the
most part, this is limited to editing the make file and providing some
path names. Also, for this reason, you may have to live with some
complaints from the compiler because of missing function prototypes, etc.
Note that if you choose not to install PVM, you will need to edit the
make file and provide an environment variable which makes it possible
for ``make'' to determine the current architecture. This environment
variable also allows the path to the binaries for each architecture to
be set appropriately. This should all be done automatically if PVM is
installed correctly.
Preparing for compilation
- First unpack the distribution by typing ``tar -xzf
SYMPHONY-2.8.tgz''.
- Edit the various path variables in the make file ( SYPHONY-2.8/Makefile) to match where you installed the source
code and where the LP libraries and header files reside for
each architecture on your network. Other
architecture-dependent variables should also be set as
required. Be sure to read the comments in the make file to
understand what variables have to be set.
Compiling the sequential version
- Type ``make'' in the SYMPHONY root directory. This
will first make the SYMPHONY library (sequential version).
After this step is completed, you are free to type ``make
clean'' and/or delete the $ROOT/obj.* and $ROOT/dep.* directories if you want to save disk space. You
should only have to remake the library if you change something
in SYMPHONY's internal files.
- After making the libraries, SYMPHONY will compile the
user code and then make the executable for the sample
application, a vehicle routing and traveling salesman problem
solver. The name of the executable will be `` master_tm_lp_cg_cp'', indicating that all modules are
contained in a single executable.
- To test the sample program, you can get some problem
files from http://branchandcut.org/VRP/data/
or the TSPLIB
.
The file format is that specified for the TSPLIB. There is
also one sample file included with the distribution. Make sure
the executable directory is in your path and type
``master_tm_lp_cg_cp -F sample.vrp -N 5'', where sample.vrp
is the sample problem file. The -N argument gives the number
of routes, which must be specified in advance. TSP instances
can also be solved, but in this case, the number of routes does
not need to be specified.
Compiling for shared memory
- To compile a shared memory version, obtain an OpenMP
compliant compiler, such as Omni
.
Other options are listed at the OpenMP Web
site
.
- Set the variable CC to the compiler name in the
make file and compile as above.
- Voila, you have a shared memory parallel solver.
- Note that if you have previously compiled the sequential
version, then you should first type ``make clean_all'',
as this version uses the same compilation directories as the
sequential version. With one active subproblem allowed, it
should run exactly the same as the sequential version so there
is no need to compile both.
Compiling for distributed networks
- You must first obtain and install the Parallel Virtual
Machine (PVM) software,
available for free from Oak Ridge National
Laboratories
.
See Section 1.8 for more notes on using PVM.
- In the Makefile, be sure to set the COMM_PROTOCOL
to PVM. Also, change one or more of COMPILE_IN_TM, COMPILE_IN_LP, COMPILE_IN_CG, and COMPILE_IN_CP, to FALSE,
or you will end up with the sequential version. Various
combinations of these variables will give you different
configurations and different executables. See Section
1.12 for more info on setting them. Also, be
sure to set the path variables in the make file appropriately
so that make can find the PVM library.
- Type ``make'' in the SYMPHONY root directory to
make the distributed libraries. As in Step 1 of the sequential
version, you may type ``make clean'' after making the
library. It should not have to remade again unless you modify
SYMPHONY's internal files.
- After the libraries, all executables requested will be made.
- Make sure there are links from your
$PVM_ROOT/bin/$PVM_ARCH/ directory to each of the
executables in the Vrp/bin.$REV directory. This is required
by PVM.
- Start the PVM daemon by typing ``pvm'' on the command line
and then typing ``quit''.
- To test the sample program, you can get some problem
files from http://branchandcut.org/VRP/data/
or the TSPLIB
.
The file format is that specified for the TSPLIB. There is
also one sample file included with the distribution. Make sure
the executable directory is in your path and type ``master -F
sample.vrp -N 5'', where sample.vrp is the sample problem file.
The -N argument gives the number of routes, which must be
specified in advance. TSP instances can also be solved, but in
this case, the number of routes does not need to be specified.
Note that the actual executable name may not be `` master'' if COMPILE_IN_TM is set to TRUE in the
make file. See Section 1.12 for more
information on executable names.
This should result in the successful compilation of the sample
application. Once you have accomplished this much, you are well on
your way to having an application of your own. Don't be daunted by the
seemingly endless list of user function that you are about to
encounter. Most of them are optional or have default options. If you
get lost, consult the source code for the sample application to see
how it's done.
Next: Source Files
Up: Introduction
Previous: Changes to the User
Ted Ralphs
2000-09-08