1 | The instructions here are somewhat outdated. See also README.md. |
---|
2 | |
---|
3 | These instructions are for UNIX-like systems (including Linux, Cygwin |
---|
4 | and MSys) only. If Microsoft Developer Studio projects are |
---|
5 | maintained for this package, you can find instructions at |
---|
6 | |
---|
7 | https://projects.coin-or.org/MSVisualStudio |
---|
8 | |
---|
9 | ********************************************************************** |
---|
10 | *** DOWNLOAD *** |
---|
11 | ********************************************************************** |
---|
12 | |
---|
13 | You can obtain the source code for the Clp package in two ways: |
---|
14 | |
---|
15 | 1. Obtain the source directly from the COIN-OR subversion repository |
---|
16 | (recommended). For this you needs the program 'svn' installed on |
---|
17 | your machine, and output of "svn --version" must contain |
---|
18 | "handles 'https' scheme". |
---|
19 | |
---|
20 | Assuming that you want to download the code into a subdirectory |
---|
21 | "COIN-Clp", you type |
---|
22 | |
---|
23 | svn co https://projects.coin-or.org/svn/Clp/trunk Coin-Clp |
---|
24 | |
---|
25 | 2. Download the tarball from http://www.coin-or.org/Tarballs/Clp and |
---|
26 | extract it, for example, with |
---|
27 | |
---|
28 | gunzip Clp_2006Jun07.tgz |
---|
29 | tar xvf Clp_2006Jun07.tar |
---|
30 | |
---|
31 | (Here "2006Jun07" is of course replaced by the string in the |
---|
32 | tarball you downloaded.) |
---|
33 | |
---|
34 | More detailed download instructions can be found at |
---|
35 | |
---|
36 | https://projects.coin-or.org/BuildTools/wiki/user-download |
---|
37 | |
---|
38 | ********************************************************************** |
---|
39 | *** CONFIGURATION *** |
---|
40 | ********************************************************************** |
---|
41 | |
---|
42 | Go into the directory that you just downloaded or extracted (e.g., |
---|
43 | Coin-Clp or Clp_2006Jun07). Then you type |
---|
44 | |
---|
45 | ./configure |
---|
46 | |
---|
47 | Note that you might have to specify additional options, in case you |
---|
48 | don't want to use the default choices that configure makes (e.g., |
---|
49 | compilers). Please visit |
---|
50 | |
---|
51 | https://projects.coin-or.org/BuildTools/wiki/user-configure |
---|
52 | |
---|
53 | and the Clp Trac page |
---|
54 | |
---|
55 | https://projects.coin-or.org/Clp |
---|
56 | |
---|
57 | for more information. |
---|
58 | |
---|
59 | If everything went fine, you will see at the end of the output |
---|
60 | |
---|
61 | "Main configuration of Clp successful" |
---|
62 | |
---|
63 | ********************************************************************** |
---|
64 | *** COMPILATION AND INSTALLATION *** |
---|
65 | ********************************************************************** |
---|
66 | |
---|
67 | In the directory where you ran the configure script: |
---|
68 | |
---|
69 | 1. Compile the code by typing |
---|
70 | |
---|
71 | make |
---|
72 | |
---|
73 | 2. To test if the code works, you can type |
---|
74 | |
---|
75 | make test |
---|
76 | |
---|
77 | 3. To install the code, you type |
---|
78 | |
---|
79 | make install |
---|
80 | |
---|
81 | After this, you will find the executables, libraries and header |
---|
82 | files in the "bin", "lib" and "include" subdirectory, respectively. |
---|
83 | |
---|
84 | More information on the compilation and installation can be found at |
---|
85 | |
---|
86 | https://projects.coin-or.org/BuildTools/wiki/user-compile |
---|
87 | |
---|
88 | ********************************************************************** |
---|
89 | *** USING THE LIBRARIES *** |
---|
90 | ********************************************************************** |
---|
91 | |
---|
92 | Now you can link your own code with the installed libraries. You can |
---|
93 | find examples in the |
---|
94 | |
---|
95 | Clp/examples/ |
---|
96 | |
---|
97 | subdirectory, see also the information at |
---|
98 | |
---|
99 | https://projects.coin-or.org/BuildTools/wiki/user-examples |
---|
100 | |
---|
101 | |
---|
102 | |
---|
103 | ==== 8< ====================================================== |
---|
104 | |
---|
105 | From here on you find the original installation instructions for the |
---|
106 | previous GNU Makefile build system. Most details have changed, but |
---|
107 | for now we keep it here so that possibly missing items might be found |
---|
108 | here. |
---|
109 | |
---|
110 | Prerequisites for installation: |
---|
111 | - at the moment on (*)nix platforms you must use g++ 2.95.2 or higher. |
---|
112 | - must use gnu make |
---|
113 | - to make the documentation doxygen must be installed |
---|
114 | |
---|
115 | Targets are put in subdirectories, whose name is derived from the |
---|
116 | platform name (as returned by `uname`) and the optimization level |
---|
117 | (e.g., Linux-g). |
---|
118 | |
---|
119 | To build Clp library and unitTest |
---|
120 | - read and edit the top of Makefile to select |
---|
121 | - whether shared or static library should be built |
---|
122 | - optimization level |
---|
123 | - where the compiled library should be installed |
---|
124 | - read and edit ../Common/make/Makefile.locations to uncomment Clp lines |
---|
125 | - 'make' to build and install the library. |
---|
126 | - 'make unitTest' to create the unitTest program. It will be placed |
---|
127 | in the target subdirectory. |
---|
128 | |
---|
129 | - 'make doc' to create the html documentation of the classes in the |
---|
130 | library and place them in doc/html. |
---|
131 | |
---|
132 | To run Clp unitTest |
---|
133 | - clp -unitTest from Clp directory |
---|
134 | To run Clp on netlib |
---|
135 | - clp -netlib from Clp directory (or -netlibp for primal). |
---|
136 | |
---|
137 | To build Clp executable (after Clp libraries) |
---|
138 | In This directory 'make unitTest'. This actually creates and executable |
---|
139 | clp in this directory which can both do unit test and act as simple |
---|
140 | Clp driver |
---|
141 | |
---|
142 | Tuning information. On Intel Linux I modified Makefiles/Makefile.Linux to add: |
---|
143 | |
---|
144 | ifeq ($(OptLevel),-O1) |
---|
145 | CXXFLAGS += -DNDEBUG |
---|
146 | CXXFLAGS += -ffast-math -fomit-frame-pointer |
---|
147 | CXXFLAGS += -march=i686 |
---|
148 | endif |
---|
149 | |
---|
150 | in Coin/Makefile I added the following to get dense code handling |
---|
151 | |
---|
152 | CXXFLAGS += -DDENSE_CODE=1 |
---|
153 | |
---|
154 | and change Optimization level to -O1 (same level in Clp/Makefile.Clp). |
---|
155 | |
---|
156 | and finally in Clp/Test/Makefile.test I added |
---|
157 | |
---|
158 | #if DENSE and using given libraries |
---|
159 | LDFLAGS += -llapack -lblas -lg2c |
---|
160 | |
---|
161 | If you have not got these libraries then leave out dense code flags |
---|
162 | |
---|
163 | For more information see README and files in Samples |
---|
164 | |
---|
165 | IMPORTANT new note |
---|
166 | To address the problem of stability I have gone over to a new system of releases. |
---|
167 | Now a new release is a more minor thing but has its own snapshot. To find out what |
---|
168 | releases have snapshots just do |
---|
169 | |
---|
170 | make restore |
---|
171 | |
---|
172 | To restore Clp and Coin files to that snapshot do |
---|
173 | |
---|
174 | make restore BACKUP=xxxx where a snapshot Clp_xxxx.tar or Clp_xxxx.tar.gz is available |
---|
175 | and check that it looks OK. Then do make restore BACKUP=xxxx CONFIRM=YES to actually |
---|
176 | overwrite files. Then do make unitTest. |
---|
177 | |
---|
178 | You can also create your own snapshots with make dist or make backup. BUT use great care. |
---|