Permalink
Browse files

Everything should now be in trunk

  • Loading branch information...
brianborchers committed Nov 3, 2006
1 parent dc0148a commit e8bce4add875eba3b2a9efa4a8983395434c1a3c
Showing with 17,207 additions and 0 deletions.
  1. +87 −0 .gitattributes
  2. +8 −0 AUTHORS
  3. +180 −0 INSTALL
  4. +237 −0 LICENSE
  5. +51 −0 Makefile
  6. +47 −0 README
  7. +4 −0 doc/README
  8. +309 −0 doc/a1block1.eps
  9. +78 −0 doc/a1block1.fig
  10. BIN doc/a1block1.pdf
  11. +382 −0 doc/cmat.eps
  12. +113 −0 doc/cmat.fig
  13. BIN doc/cmat.pdf
  14. +240 −0 doc/constraints.eps
  15. +44 −0 doc/constraints.fig
  16. BIN doc/constraints.pdf
  17. +19 −0 doc/csdpuser.aux
  18. +30 −0 doc/csdpuser.bbl
  19. +45 −0 doc/csdpuser.blg
  20. +527 −0 doc/csdpuser.log
  21. BIN doc/csdpuser.pdf
  22. +924 −0 doc/csdpuser.tex
  23. +581 −0 doc/example.c
  24. +51 −0 doc/sdp.bib
  25. +127 −0 example/Makefile
  26. +591 −0 example/example.c
  27. +90 −0 include/blockmat.h
  28. +276 −0 include/declarations.h
  29. +50 −0 include/index.h
  30. +35 −0 include/parameters.h
  31. +144 −0 lib/Fnorm.c
  32. +95 −0 lib/Makefile
  33. +40 −0 lib/add_mat.c
  34. +49 −0 lib/addscaledmat.c
  35. +99 −0 lib/allocmat.c
  36. +35 −0 lib/calc_dobj.c
  37. +45 −0 lib/calc_pobj.c
  38. +209 −0 lib/chol.c
  39. +43 −0 lib/copy_mat.c
  40. +668 −0 lib/easysdp.c
  41. +68 −0 lib/freeprob.c
  42. +76 −0 lib/initparams.c
  43. +111 −0 lib/initsoln.c
  44. +342 −0 lib/linesearch.c
  45. +45 −0 lib/make_i.c
  46. +261 −0 lib/makefill.c
  47. +109 −0 lib/mat_mult.c
  48. +723 −0 lib/mat_multsp.c
  49. +76 −0 lib/matvec.c
  50. +86 −0 lib/norms.c
  51. +79 −0 lib/op_a.c
  52. +68 −0 lib/op_at.c
  53. +442 −0 lib/op_o.c
  54. +210 −0 lib/packed.c
  55. +105 −0 lib/psd_feas.c
  56. +100 −0 lib/qreig.c
  57. +983 −0 lib/readprob.c
  58. +135 −0 lib/readsol.c
  59. +2,329 −0 lib/sdp.c
  60. +44 −0 lib/solvesys.c
  61. +129 −0 lib/sortentries.c
  62. +49 −0 lib/sym_mat.c
  63. +43 −0 lib/trace_prod.c
  64. +58 −0 lib/tweakgap.c
  65. +24 −0 lib/user_exit.c
  66. +132 −0 lib/writeprob.c
  67. +121 −0 lib/writesol.c
  68. +47 −0 lib/zero_mat.c
  69. +38 −0 matlab/README
  70. +54 −0 matlab/control1.correct
  71. BIN matlab/control1.mat
  72. +71 −0 matlab/convertf.m
  73. +194 −0 matlab/csdp.m
  74. +197 −0 matlab/readsol.m
  75. +392 −0 matlab/writesdpa.m
  76. +120 −0 solver/Makefile
  77. +117 −0 solver/csdp.c
  78. +30 −0 test/Makefile
  79. +105 −0 test/g50
  80. +25 −0 test/g50.correct
  81. +23 −0 test/theta1.correct
  82. +1,432 −0 test/theta1.dat-s
  83. +143 −0 theta/Makefile
  84. +55 −0 theta/README
  85. +103 −0 theta/complement.c
  86. +213 −0 theta/graphtoprob.c
  87. +129 −0 theta/rand_graph.c
  88. +218 −0 theta/theta.c
@@ -1 +1,88 @@
* text=auto !eol
/AUTHORS -text
/INSTALL -text
/LICENSE -text
/Makefile -text
/README -text
doc/README -text
doc/a1block1.eps -text
doc/a1block1.fig -text
doc/a1block1.pdf -text
doc/cmat.eps -text
doc/cmat.fig -text
doc/cmat.pdf -text
doc/constraints.eps -text
doc/constraints.fig -text
doc/constraints.pdf -text
doc/csdpuser.aux -text
doc/csdpuser.bbl -text
doc/csdpuser.blg -text
doc/csdpuser.log -text
doc/csdpuser.pdf -text
doc/csdpuser.tex -text
doc/example.c -text
doc/sdp.bib -text
example/Makefile -text
example/example.c -text
include/blockmat.h -text
include/declarations.h -text
include/index.h -text
include/parameters.h -text
lib/Fnorm.c -text
lib/Makefile -text
lib/add_mat.c -text
lib/addscaledmat.c -text
lib/allocmat.c -text
lib/calc_dobj.c -text
lib/calc_pobj.c -text
lib/chol.c -text
lib/copy_mat.c -text
lib/easysdp.c -text
lib/freeprob.c -text
lib/initparams.c -text
lib/initsoln.c -text
lib/linesearch.c -text
lib/make_i.c -text
lib/makefill.c -text
lib/mat_mult.c -text
lib/mat_multsp.c -text
lib/matvec.c -text
lib/norms.c -text
lib/op_a.c -text
lib/op_at.c -text
lib/op_o.c -text
lib/packed.c -text
lib/psd_feas.c -text
lib/qreig.c -text
lib/readprob.c -text
lib/readsol.c -text
lib/sdp.c -text
lib/solvesys.c -text
lib/sortentries.c -text
lib/sym_mat.c -text
lib/trace_prod.c -text
lib/tweakgap.c -text
lib/user_exit.c -text
lib/writeprob.c -text
lib/writesol.c -text
lib/zero_mat.c -text
matlab/README -text
matlab/control1.correct -text
matlab/control1.mat -text
matlab/convertf.m -text
matlab/csdp.m -text
matlab/readsol.m -text
matlab/writesdpa.m -text
solver/Makefile -text
solver/csdp.c -text
test/Makefile -text
test/g50 -text
test/g50.correct -text
test/theta1.correct -text
test/theta1.dat-s -text
theta/Makefile -text
theta/README -text
theta/complement.c -text
theta/graphtoprob.c -text
theta/rand_graph.c -text
theta/theta.c -text
@@ -0,0 +1,8 @@
Main author(s):
Dr. Brian Borchers <borchers@nmt.edu> main contributor

Other contributors:
Joseph Young <josyoun@nmt.edu> Original parallel version of
op_o.
Aaron Wilson <wilson@nmt.edu> modified documentation/install
procedure for COIN-OR
180 INSTALL
@@ -0,0 +1,180 @@
REQUIREMENTS:

The build process for CSDP uses make, so your system must have make
installed. The GNU make works quite well, but CSDP has also been
built with other versions of make. The make files are very simple.

In order to build CSDP, you will need an ANSI C compiler. The GNU C
compiler gcc works quite well, but the code has also been compiled
with Intel's icc, IBM's xlc, Sun's cc, and many other compilers.

Although CSDP itself is written in C, the BLAS/LAPACK libraries used
by CSDP were originally written in Fortran. Combining C and Fortran
is generally straight forward, but you may have to install a Fortran
compiler in order to get run time libraries needed by the Fortran code
in BLAS/LAPACK. In particular, on Linux systems using gcc you will
need the g2c C/Fortran compatibility library that comes as part of the
g77 package.

Use of the CSDP library and the solver and theta functions requires
the BLAS library and a few routines from the LAPACK library. Using
BLAS and LAPACK routines that have been optimized for your computer is
critical to getting good performance from CSDP, since the code
typically spends nearly all of its time in these routines. On the
same hardware, it's not uncommon to find that optimized BLAS and
LAPACK routines are an order of magnitude faster than unoptimized BLAS
and LAPACK routines.

The original authors of BLAS and LAPACK have provided "reference
implementations" that are freely available but not very well
optimized. If your system has BLAS and LAPACK libraries in /usr/lib,
there's a good chance that these are the reference implementations.
Using them is a reasonable way to start, but you may well find that
you need faster routines to get acceptable performance.

ATLAS (automatically tuned linear algebra software) is an open source
implementation of BLAS and part of LAPACK that is sufficient for our
purposes. ATLAS obtains good performance on a variety of systems by
automatically adjusting blocksizes and other parameters to get the
best performance out of any particular system. ATLAS is availible at

http://math-atlas.sourceforge.net/

If possible, use their precompiled, optimized libraries that are
availible for several architectures, otherwise build it yourself
from source.

Most hardware manufacturers have developed optimized BLAS/LAPACK
libraries for their systems, such as Apple's veclib for G5
systems, Intel's Math Kernel Library (MKL), AMD's Core Mathematical
Library (ACML), IBM's extended scientific subroutine library (ESSL),
and Sun's sunperf library. These typically have restrictive licenses and
may be expensive to purchase, but can provide very good performance.

In practice, on Intel or AMD Linux systems, we find that ATLAS
provides very good performance (close to if not better than MKL or
ACML.) Thus we recommend ATLAS. However, to make the build process
simpler and more flexible, the make files are setup to use whatever
LAPACK and BLAS libraries are already installed on your system. If
you decide to use ATLAS, the make files contain ATLAS specific
instructions.

CSDP also includes a set of routines for interfacing CSDP to MATLAB
and Octave. This interface is entirely optional- CSDP works fine
without it. In order to use this interface, you will need MATLAB (6.5
or later) or Octave (2.9.5 or later.) Note that earlier versions of
Octave, particularly 2.0 and 2.1, will not function with this interface
because Octave didn't support sparse matrices until version 2.9. The
README file in the matlab directory contains instructions for installing
the matlab interface and testing it on a sample problem.

DOWNLOADING CSDP:

The current version of CSDP can be obtained using subversion from
the COIN-OR web site. To do this, first install the subversion
tools, then issue the command

svn co https://projects.coin-or.org/svn/Csdp Csdp

Or use a GUI to access the repository.

Source and binaries for older stable versions of CSDP can be
downloaded from

http://www.nmt.edu/~borchers/csdp.html

INSTALLING CSDP:

The following instructions assume that you're using a Linux system with
gcc, g77, LAPACK, and BLAS installed. The make files will have to be
altered for other systems, but the basic process of building the software
will be similar.

After you've downloaded the source code, unpack the tar archive if you
downloaded a .tar archive of CSDP 5.0, and then go into the csdp
directory (this directory is called "Csdp" in subversion) Issue the
command

> make

to build CSDP. Make will go into the lib, solver, theta, and example
subdirectories and compile the C code, using values of CFLAGS and LIBS
supplied in the Makefiles in these directories.

If the build fails, it is important to start by identifying where the
build failed. Failures in building the CSDP library are extremely
rare. Most reported failures have occured in the solver and theta
directories. The most common problem in practice is that one or more
of the required libraries (blas, lapack, or g2c) is missing. In that
case you must install the required library before continuing with the
installation of CSDP. If the build fails for some other reason, feel
free to contact the author for help- we're interested in learning about
problems on different systems.

If for some reason the build fails, it's a good idea to remove all
of the binaries before modifying the make files and rebuilding. To do
this, issue the command

> make clean

If the build appears to be successful, you can test the code with

> make unitTest

This will run tests of the stand alone solver csdp and Lovasz theta
program theta. Compare the .out files produced by the test with the
corresponding .correct files. The actual values will typically vary
because of small differences in floating point round-off, compiler
optimizations, and so on. However, the optimal objective values
should match to at least six digits, the relative primal and dual
infeasibilities should be smaller than 1.0e-7, and all DIMACS errors
should be smaller than 5.0e-7.

If either of the tests fail, please contact the author.

Once you're satisfied with tests, you can become root and issue the
command

> make install

This will copy csdp, rand_graph, complement, theta, and graphtoprob
into the /usr/local/bin directory. If you use the C shell, remember
to "rehash" so that the shell will know that these programs have been
added to the /usr/local/bin directory.

The matlab directory contains .m files that provide a matlab interface
to CSDP solver. To install these .m files they must be added to your
matlab path. This requires use of the path(...) command in
matlab. See '>help path' for instructions on adding a new directory to
your matlab path (you can put the .m files in any directory you wish,
then add that directory to your matlab path).

USING GCC 4:

In gcc 3.x, the C/Fortran compatibility library was linked with -lg2c. In
gcc 4.x, you will need to link with -lgfortran instead.

Note that OpenMP support first appears in Red Hat's version of gcc 4.1.1
and also appears in the general release of gcc 4.2. There is no OpenMP
support in earlier versions of gcc!

RUNNING CSDP IN PARALLEL:

Version 6 of CSDP includes support for a parallel version of CSDP on
multi-processor shared memory systems. This is done using the OpenMP
standard for #pragma's that tell the C compiler how to parallelize
various loops in the code. On systems that don't support OpenMP,
these pragma's are simply ignored. On systems that do support OpenMP,
it will typically be necessary to modify the CFLAGS and LIBS in the
Makefiles to build a parallel version of CSDP. As an example, the
following CFLAGS and LIBS have been used to build a parallel version
of CSDP on a Red Hat Enterprise Linux system using Red Hat's version
of gcc4.1 with ATLAS.

CFLAGS=CFLAGS=-O3 -march=nocona -m64 -fprefetch-loop-arrays -ftree-vectorize -ftree-vectorizer-verbose=1 -fopenmp -ansi -Wall -DNOSHORTS -DBIT64 -DUSEOPENMP -I../include

LIBS=LIBS=-static -L../lib -lsdp -llapack -lptf77blas -lptcblas -latlas -lgomp -lrt -lpthread -lgfortran -lm




Oops, something went wrong.

0 comments on commit e8bce4a

Please sign in to comment.