Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > df736a3bc446df5b16150bebb7296274 > files > 22

DSDP-devel-5.8-2.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>DSDP: Installation Instructions.</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DSDP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Installation Instructions. </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>The compressed files <code>DSDP5.X.tar.gz</code> and <code>DSDP5.X.zip</code> contain an implementation of the dual-scaling algorithm for conic programming optimization problems.</p>
<p>Create the <code>DSDP5.X</code> directory structure and enter it. For example, </p>
<div class="fragment"><pre class="fragment">
gunzip DSDP5.X.tar.gz
tar -xvf DSDP5.X.tar
</pre></div><p> or </p>
<div class="fragment"><pre class="fragment">
unzip DSDP5.X.zip
</pre></div><p>Several executables may have been provided. If not, it will have to be compiled. DSDP is written in the C programming language. It has been tested using several different compilers and architectures. In particular, it has been tested using gcc-2.96 and gcc-3.2 (C and C++), Intel-6.0, Intel-7.1, Intel-8.0, and Microsoft Visual Studio 2003. It has been compiled on 32 bit and 64 bit architectures.</p>
<h2><a class="anchor" id="Compile"></a>
Compiling DSDP</h2>
<h3><a class="anchor" id="Make"></a>
Using Make</h3>
<p>DSDP was developed using Make -- which is available on Linux and most Unix systems. To compile DSDP using Make</p>
<ul>
<li>Go to the DSDP directory and edit the file <code>make.include</code> <ul>
<li>Go to the DSDP directory <div class="fragment"><pre class="fragment">
&gt; cd DSDP5.X
</pre></div></li>
<li>Define the <code>DSDPROOT</code> variable as the full directory name. For example, <div class="fragment"><pre class="fragment">
DSDPROOT        = /home/benson/DSDP5.X
</pre></div> For those using the GCC compilers, the default values for the remaining variables may suffice.</li>
<li>Edit the compiler flags <code>CC</code> and <code>OPTFLAGS</code>. For example, <div class="fragment"><pre class="fragment">
CC       = gcc
</pre></div></li>
<li>Edit the compiler optimization flag <div class="fragment"><pre class="fragment">
OPTFLAGS = -O3
</pre></div></li>
<li>Add timing flag. By default, timing routines are not implemented due to portability issues among architectures. However, DSDP can provide time profiles for several important operations by defining one of the following variables. <div class="fragment"><pre class="fragment">
DSDPTIMER   = NONE
</pre></div> Users of the Microsoft compiler will probably need the flags <div class="fragment"><pre class="fragment">
DSDPTIMER   = DSDP_MS_TIME
</pre></div> Users of the GCC and many other compilers should consider defining <div class="fragment"><pre class="fragment">
DSDPTIMER   = DSDP_TIME
</pre></div> The routines that call these two timing utilities can be found in the file <code><a class="el" href="dsdptime_8c.html" title="Timing routines for GNU and Microsoft compilers.">dsdptime.c</a></code> and edited.</li>
<li>Add additional compiler flags. See the next section for more information about specific compiler flags.</li>
<li>If the Matlab interface is required, also check and edit the <code>MEX</code> flag. For example, <div class="fragment"><pre class="fragment">
MEX           = mex -O
</pre></div></li>
<li>In the same file, edit the location of the BLAS and LAPACK libraries and include any other libraries required to link to them such as <code>-lg2c</code> or <code>-lm</code>. For example, <div class="fragment"><pre class="fragment">
LAPACKBLAS  = -llapack -lblas -lg2c -lm
</pre></div> Linking to a fast implementations of these libraries, such as ATLAS or Intel, will significantly improve performance.</li>
</ul>
</li>
<li>Compile the source code to create the DSDP library and drivers. <div class="fragment"><pre class="fragment">
&gt; make all
</pre></div> Alternatively, to compile just the DSDP Matlab routine: <div class="fragment"><pre class="fragment">
&gt; make dsdpmatlab
</pre></div> Alternatively, to compile just the DSDP library and C examples: <div class="fragment"><pre class="fragment">
&gt; make dsdpapi
</pre></div></li>
</ul>
<p>If the DSDP Matlab mex function does not link with the library, try the next method of compilation. If problems persist, please send a copy of the compilation log to the developers.</p>
<h3><a class="anchor" id="NoMake"></a>
Without Make</h3>
<p>DSDP can also be compiled by copying all of the source and header files into another directory, compiled, and linked with a driver routine (such as one of the files in <code>DSDPROOT/examples/</code> ). This process is demonstrated in the <code>dsdpagain</code> target in <code>DSDPROOT/examples/Makefile</code>. This method neglects the directory structure of the source code and the Makefile system, but it works fine.</p>
<h2><a class="anchor" id="Flags"></a>
Compiler Flags</h2>
<h3><a class="anchor" id="blas"></a>
BLAS and LAPACK</h3>
<p>DSDP uses BLAS and LAPACK for many of the underlying operations and it must be linked to these libraries. Two of the eigenvalue routines require LAPACK version 3 or later. The routines in BLAS and LAPACK are called from the C programming language under the assumption that the routine names are lower case and end with an underscore. The most common linking problem occurs when these assumptions are not true. Several compiler flags can be defined to change these assumptions. Define</p>
<ul>
<li>Define <code>NOUNDERBLAS</code> if no underscore is appended to the end of routine names. This flag was used to link DSDP to the reference BLAS available in Matlab using the Microsoft Compiler.</li>
<li>Define <code>CAPSBLAS</code> if the names of BLAS and LAPACK routine names use all capital letters.</li>
<li>Define <code>__DSDP_NONAMEMANGLING</code> if a C++ compiler is being used and the BLAS and LAPACK routine names should not be changed.</li>
</ul>
<p>See the makefiles in the distribution for examples of use of these terms. Those compiling in the Microsoft Windows Operating System usually need to define the <code>NOUNDERBLAS</code> flag.</p>
<p>DSDP also assumes that the <code>integer</code> type in Fortran is the same size as a <code>long</code> <code>int</code> in C, and a <code>double</code> <code>precision</code> variable in Fortran is the same size as a <code>double</code> in C. If problems persist, the macros and type definitions in the file <code><a class="el" href="dsdplapack_8h.html" title="DSDP uses BLAS and LAPACK for many of its operations.">dsdplapack.h</a></code> will have to be edited.</p>
<h3><a class="anchor" id="matlab"></a>
Matlab</h3>
<p>If the Matlab interface is be generated, one other flag may be of interest.</p>
<ul>
<li><code>DSDPMATLAB</code> enables the use of the memory allocation and additional print statements available from Matlab.</li>
</ul>
<p>The standard memory allocation and print statements will be used if this flag is not defined.</p>
<h2><a class="anchor" id="testing"></a>
Testing</h2>
<ul>
<li>Run the executables by switching to directory <code>DSDPROOT/exec</code> and test the examples. <div class="fragment"><pre class="fragment">
&gt; dsdp5  truss1.dat-s
&gt; maxcut  graph1
&gt; theta  graph1
</pre></div> Compare the output with the files <code>output.truss1</code> , <code>output.maxcut</code> , and <code>output.theta</code> . If the output from any of the tests differs significantly from the files, please report it to the developers.</li>
</ul>
<ul>
<li>DSDP can be called from Matlab version 6.0 and higher. Run the sample problems by starting Matlab in the <code>DSDPROOT/matlab</code> directory and test the solver <div class="fragment"><pre class="fragment">
&gt; check; 
</pre></div> Compare the output with the output in <code>check.out</code> . For help using the package, type <div class="fragment"><pre class="fragment">
&gt; help dsdp; 
</pre></div> Several example Matlab files have been provided in <code>DSDPROOT/matlab</code> that create example problems, read data files, and verify solutions.</li>
</ul>
<h2><a class="anchor" id="Help"></a>
Help</h2>
<p>For help with installation, please send a copy of the compilation log to the developers. </p>
</div></div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Jun 8 2011 for DSDP by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>