• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

AMPLConfig.cmake.inH A D13-Nov-2020152 43

FindDL.cmakeH A D13-Nov-20201.1 KiB3629

Makefile.amH A D13-Nov-20202.5 KiB170150

READMEH A D13-Nov-20209.7 KiB262190

README.f77H A D13-Nov-20201.6 KiB6547

amplsolv.lbcH A D13-Nov-2020982 8483

amplsolv.syH A D13-Nov-20201.2 KiB8483

arith.h0H A D13-Nov-20202.3 KiB6349

arith.ibmH A D13-Nov-20201.4 KiB3226

arithchk.cH A D13-Nov-20205 KiB246196

asl.hH A D13-Nov-202033.8 KiB1,022825

asl_pfg.hH A D13-Nov-20201.2 KiB305

asl_pfgh.hH A D13-Nov-20201.3 KiB316

asldate.cH A D13-Nov-202029 21

atof.cH A D13-Nov-20201.7 KiB5522

auxinfo.cH A D13-Nov-20201.5 KiB4313

avldelete.cH A D13-Nov-20204.6 KiB231192

avltree.cH A D13-Nov-20205.7 KiB316263

avltree.hH A D13-Nov-20202.8 KiB5814

b_search.cH A D13-Nov-20203.2 KiB14186

basename.cH A D13-Nov-20201.5 KiB5226

bscanf.cH A D13-Nov-20204.8 KiB257220

com2eval.cH A D13-Nov-202010.9 KiB611529

comeval.cH A D13-Nov-20202.6 KiB10777

comptry.batH A D13-Nov-202077 65

con1ival.cH A D13-Nov-20204.9 KiB209175

con2ival.cH A D13-Nov-20204.9 KiB209175

con2val.cH A D13-Nov-20204.4 KiB178147

conadj.cH A D13-Nov-20202 KiB6430

configure.acH A D13-Nov-20201.8 KiB7764

configure0H A D13-Nov-20201.7 KiB5725

configurehereH A D13-Nov-20201.6 KiB5026

conpval.cH A D13-Nov-202016.8 KiB835775

conscale.cH A D13-Nov-20203.4 KiB179167

conval.cH A D13-Nov-20204 KiB162133

derprop.cH A D13-Nov-20201.3 KiB4014

details.c0H A D13-Nov-2020182 64

details.c0.cmake.inH A D13-Nov-2020184 64

dtoa.cH A D13-Nov-202085.3 KiB4,3233,750

dtoa1.cH A D13-Nov-20203.2 KiB13698

duthes.cH A D13-Nov-20203.5 KiB143111

dvalue.hdH A D13-Nov-20201.1 KiB7978

dynlink.cH A D13-Nov-20201.3 KiB399

errchk.hH A D13-Nov-20201.7 KiB5225

f_read.cH A D13-Nov-20201.2 KiB282

fg_read.cH A D13-Nov-202039.3 KiB2,0331,904

fg_write.cH A D13-Nov-202018.5 KiB938869

fgh_read.cH A D13-Nov-202035.9 KiB1,8981,771

float.h0H A D13-Nov-20201.8 KiB6354

fpecatch.cH A D13-Nov-20201.5 KiB5322

fpinit.cH A D13-Nov-20204.8 KiB235181

fpinitmt.cH A D13-Nov-20204.6 KiB234188

fpsetprec.sH A D13-Nov-2020535 2825

fpsetprec64.sH A D13-Nov-2020488 2724

fullhes.cH A D13-Nov-20203.9 KiB166127

func_add.cH A D13-Nov-202012.2 KiB612528

funcadd.cH A D13-Nov-20203.4 KiB14292

funcadd.hH A D13-Nov-202014.8 KiB470330

funcadd0.cH A D13-Nov-20201.4 KiB4111

funcadd1.cH A D13-Nov-20208.4 KiB406335

funcaddk.cH A D13-Nov-20203.3 KiB13787

funcaddr.cH A D13-Nov-20201.2 KiB272

g_fmt.cH A D13-Nov-20203.4 KiB160117

genrowno.cH A D13-Nov-20201.8 KiB5220

getenv.cH A D13-Nov-20201.4 KiB4614

getstub.cH A D13-Nov-202011.7 KiB571513

getstub.hH A D13-Nov-20206.7 KiB202131

htcl.cH A D13-Nov-20202.2 KiB9566

jac0dim.cH A D13-Nov-20206.6 KiB302255

jac2dim.cH A D13-Nov-20201.6 KiB4618

jac2dim.hH A D13-Nov-20202 KiB4922

jacdim.cH A D13-Nov-20202.1 KiB6436

jacinc.cH A D13-Nov-20202.5 KiB9362

jacinc1.cH A D13-Nov-20201.9 KiB5932

jacpdim.hH A D13-Nov-20202.2 KiB5629

mach.cH A D13-Nov-20202 KiB8452

mainexit.cH A D13-Nov-20201.7 KiB6832

makefile.lcH A D13-Nov-20205.6 KiB199142

makefile.syH A D13-Nov-20205.1 KiB188139

makefile.uH A D13-Nov-202010.2 KiB429286

makefile.vcH A D13-Nov-20206.5 KiB214136

makefile.watH A D13-Nov-20205.4 KiB193139

mip_pri.cH A D13-Nov-20207.7 KiB328275

misc.cH A D13-Nov-202020.4 KiB1,1161,005

mypow.cH A D13-Nov-20202.2 KiB10172

names.cH A D13-Nov-20204.1 KiB180145

nl_obj.cH A D13-Nov-20202 KiB6637

nlp.hH A D13-Nov-20205.3 KiB261201

nlp2.hH A D13-Nov-20207.1 KiB343272

nqpcheck.cH A D13-Nov-202017.6 KiB954859

obj2val.cH A D13-Nov-20204.1 KiB172141

obj_prec.cH A D13-Nov-20201.4 KiB4617

objconst.cH A D13-Nov-20202.2 KiB7342

objval.cH A D13-Nov-20205 KiB227193

objval_.cH A D13-Nov-20204.4 KiB184144

op_type.cH A D13-Nov-20201.2 KiB348

op_type.hdH A D13-Nov-20201.2 KiB8382

op_typeb.hdH A D13-Nov-20201.2 KiB8382

opcode.hdH A D13-Nov-20201.3 KiB7069

opnos.hdH A D13-Nov-202064 54

pfg_read.cH A D13-Nov-2020101.3 KiB5,3815,032

pfghread.cH A D13-Nov-20201.2 KiB293

printf.cH A D13-Nov-202021.1 KiB1,2581,156

pshvprod.cH A D13-Nov-202020.3 KiB1,1081,001

psinfo.hH A D13-Nov-20209.5 KiB330260

punknown.cH A D13-Nov-20201.7 KiB5525

qp_read.cH A D13-Nov-20203.8 KiB170128

qpcheck.cH A D13-Nov-20201.7 KiB5830

qsortv.cH A D13-Nov-20204.7 KiB148106

r_op.hdH A D13-Nov-2020875 8382

r_opn.hdH A D13-Nov-2020412 1716

r_opn0.hdH A D13-Nov-2020342 1817

r_qp.hdH A D13-Nov-2020164 109

readsol.cH A D13-Nov-20208.2 KiB369325

repwhere.cH A D13-Nov-20202.6 KiB10979

rnd_prod.sH A D13-Nov-20201.4 KiB5327

rops.cH A D13-Nov-202023.7 KiB1,5151,382

rops2.cH A D13-Nov-202023.7 KiB1,4831,340

sigcatch.cH A D13-Nov-20202.3 KiB10972

sjac0dim.cH A D13-Nov-20201.5 KiB4215

sos_add.cH A D13-Nov-202023.5 KiB1,107964

sphes.cH A D13-Nov-202026.5 KiB1,3101,214

sprintf.cH A D13-Nov-20203 KiB150109

sscanf.cH A D13-Nov-20202.9 KiB142104

stderr.cH A D13-Nov-20201.9 KiB7030

stdio1.h0H A D13-Nov-20202.8 KiB10490

strerror.cH A D13-Nov-20201.3 KiB378

studchk0.cH A D13-Nov-20201.4 KiB369

suf_sos.cH A D13-Nov-202011 KiB530483

value.cH A D13-Nov-20207.7 KiB363311

writesol.cH A D13-Nov-202012.1 KiB547499

wrtsol_.cH A D13-Nov-20202.4 KiB9364

ws_desc.cH A D13-Nov-2020214 76

wsu_desc.cH A D13-Nov-2020170 65

x2check.cH A D13-Nov-20202.2 KiB8253

xectim.cH A D13-Nov-20202.8 KiB10768

xp1known.cH A D13-Nov-20203.5 KiB146110

xp2known.cH A D13-Nov-20206.4 KiB291250

xsum0.outH A D13-Nov-20203.1 KiB134133

README

1This directory contains source for a library of routines that help
2solvers work with AMPL.  In this README file, the library is called
3amplsolver.a (the name it usually has on Unix systems), but on some
4systems it may have another name, such as amplsolver.so or (on
5Microsoft systems) amplsolv.lib.  Services provided by amplsolver.a
6include reading AMPL's generic output (.nl) files, and writing
7solution (.sol) files.  Subdirectories (e.g., cplex, examples, minos)
8contain interface routines for particular solvers; you may wish to
9modify these routines to make your own solver work with AMPL.
10
11To make an executable version of a particular solver, you need
12at least this directory and the solver's subdirectory.  You need
13to invoke "make" once in this directory to create amplsolver.a,
14and then invoke "make" in each solver subdirectory of interest.
15The exact form of the "make" command depends on the system you
16are using.  There is more discussion about "make" and makefiles
17below.
18
19Some installations have several kinds of computers, with various
20hardware and operating systems, and with cross-mounted file systems
21visible from the various computers.  On such systems, the "configure"
22script may be helpful.  It arranges to compile amplsolver.a in
23system-specific subdirectories with names that, unless otherwise
24specified, begin with "sys." and by default are determined by the
25Bourne-shell syntax
26
27	sys.`uname -m`.`uname -s`
28
29Invoking
30
31	./configure
32
33creates a sys.* directory for the current system and adds a
34generic makefile, such that invoking "make" will give the
35same result as
36
37	cd sys.`uname -m`.`uname -s`
38	make
39
40(creating amplsolver.a in the system-specific subdirectory).
41
42Alternatively, if you deal with only one kind of hardware and
43Unix- or Linux-like operating system (including Cygwin or MinGW/MSYS
44under MS Windows), you could invoke
45
46	./configurehere
47
48to arrange for compiling amplsolver.a in this directory.  Either
49way (after "./configure" or "./configurehere") you invoke "make"
50to compile amplsolver.a
51
52
53To get all the source files for amplsolver.a by E-mail, send netlib
54(e.g., netlib@netlib.org) the request
55
56	send all from ampl/solvers
57
58You can also get a tar file of ampl/solvers and all its subdirectories
59with a web browser, by clicking on "tar" in the line "lib: models (tar)" in
60
61	http://netlib.sandia.gov/ampl/
62
63The file you download will be called netlibfiles.tar; executing
64
65	tar xf netlibfiles.tar
66
67will give you directory ampl/solvers containing gzipped files and
68subdirectories; the next step will be
69
70	cd ampl/solvers
71	gzip -dN *.gz
72
73to uncompress the .gz files.  (Do this also in any subdirectories
74of interest.)
75
76Beware that some older versions of Netscape and Internet Explorer
77mishandle "http:" URLs that end in ".gz".
78
79See the comments about tar and .gz files in /netlib/bib/compression.html
80(e.g., http://netlib.sandia.gov/bib/compression.html or
81http://www.netlib.org/bib/compression.html).
82
83For more about AMPL itself, see the AMPL book (second edition):
84
85	"AMPL: A Modeling Language for Mathematical Programming"
86	by Robert M. Fourer, David M. Gay, and Brian W. Kernighan;
87	Duxbury Press / Brooks/Cole Publishing Company, 2002;
88	ISBN 0-534-38809-4
89
90See the pointers to book vendors in
91
92	http://www.ampl.com/BOOK/
93
94
95For solvers written in Fortran, we assume the f2c calling
96conventions.  Source for f2c (Fortran-to-C converter) is
97available by E-mail from netlib@netlib.org and anonymous
98ftp from netlib.bell-labs.com; for details, send the E-mail message
99
100	send index from f2c
101
102to netlib@netlib.org .
103
104See README.f77 for a summary of adjustments that permit use of the
105native Fortran 77 compilers on some systems.
106
107For machines with IBM mainframe arithmetic (i.e., the arithmetic
108of the IBM 360 and 370 series and their successors and imitators,
109such as Amdahl), use arith.ibm as arith.h and add rnd_prod.s to
110the end of the "a =" assignment in the makefile.  For other systems,
111let the makefile compile and execute arithchk.c to create a
112suitable arith.h.  Do not copy arith.h from one kind of computer
113to another.
114
115See the comments in "makefile" about compiling on non-ANSI systems,
116which may require compiling with -DKR_headers, saying "make float.h",
117adding strerror.c to the makefile's "a =" assignment, etc.  Also see
118the comments in "makefile" about compiling on particular systems.
119
120
121Various subdirectories are available, including the following.  They
122provide sample AMPL interfaces, but do not include source or objects
123for the solvers themselves (which you must get from the relevant
124solver vendor, noted in the README.1st file in each subdirectory).
125For more details about, say, MINOS, send the E-mail message
126	send readme from ampl/solvers/minos
127to netlib@netlib.org .
128
129	Subdirectory	Comments
130
131	bpmpd		Research interior LP code by Cs. Meszaros.
132
133	cplex		Uses CPLEX Corp.'s solver: linear (simplex and
134			interior algorithms), network, quadratic, and MIP
135			problems.
136
137	donlp2		General nonlinear optimizer by Peter Spellucci.
138			Uses an SQP algorithm and dense linear algebra.
139
140	examples	Source for examples in "Hooking Your Solver to AMPL".
141
142	fsqp		Based on CFSQP, a nonlinear solver by Craig Lawrence,
143			Jian L. Zhou, and Andre L. Tits.
144
145	funclink	Examples and system-specific makefiles for making
146			shared libraries (.dll files) of imported (i.e.,
147			user-defined) functions.
148
149	lancelot	Based on LANCELOT (by A. R. Conn, Nick Gould, and
150			Ph. L. Toint): general nonlinear programming code
151			using sparse linear algebra.
152
153	loqo		Interior code by Robert Vanderbei: for linear and
154			convex quadratic (or convex nonlinear) problems.
155
156	lpsolve		Simplex and MIP solver based on lp_solve by
157			Michel Berkelaar (michel@es.ele.tue.nl).
158
159	minos		Uses Murtagh & Saunders's code for nonlinear problems;
160			reduces to simplex on linear problems.
161
162	nlc		Source for "nlc" program, which emits Fortran or C
163			for computing objectives, constraint bodies, and
164			their gradients.
165
166	npopt		New version of npsol (see below), available from
167			Philip Gill to people who have npsol.
168
169	npsol		Based on NPSOL (by Gill, Murray, Saunders, Wright),
170			a sequential quadratic programming code for solving
171			nonlinear programming problems.
172
173	path		Based on the PATH solver of Prof. Michael C. Ferris
174			and his former students Steven P. Dirkse and Todd S.
175			Munson, for solving "square" nonlinear
176			complementarity problems.
177
178	snopt		Sparse nonlinear solver by Philip Gill et al.,
179			available from him to people who have npsol.
180
181	xpress		Based on XPRESS-MP, a solver for linear and
182			quadratic programming problems involving continuous
183			or integer variables by Dash Optimization,
184			http://www.dashoptimization.com/
185
186For information about arranging to use other solvers with AMPL,
187see "Hooking Your Solver to AMPL", Postscript for which is
188
189	ftp://www.ampl.com/REFS/hooking.ps.gz
190	http://www.ampl.com/REFS/hooking.ps.gz
191
192and a corresponding html version is
193
194	http://www.ampl.com/REFS/HOOKING/
195
196Be sure to request the changes file periodically to see about bug fixes
197and other updates, or send the 2-word E-mail message
198
199	subscribe ampl
200
201to netlib@netlib.org to receive notification of updates.
202Please send bug reports and other comments to dmg@ampl.com
203(David M. Gay).
204
205
206This directory contains several makefile variants with names of the
207form makefile.*; makefile.u is for Unix systems, and the others are
208for various PC compilers.  Comments in makefile.u describe adaptions
209for particular Unix systems.  The PC variants start (after legal
210disclaimers) with comments saying what compiler they are for and
211telling what "make" incantation to use.  The "examples" subdirectory
212and a few others have analogous makefile variants are obtained from
213makefile.u by changing ".o" to ".obj" and suitably adjusting the rules
214for compiling, linking, and making libraries.
215
216The PC makefiles create "amplsolv.lib" and are set up for Win32;
217some of the PC makefiles have comments explaining changes for MS-DOS.
218If you are using Microsoft Visual C++, see the comments in makefile.vc
219about linking solvers.
220
221The PC makefiles require you to make details.c by hand (since deriving
222it automatically seems hard to do reliably).  It should reflect the
223compiler you are using.  For example, for Microsoft Visual C++ 6.0,
224having details.c consist of the single line
225	char sysdetails_ASL[] = "MS VC++ 6.0";
226would be appropriate.  For systems other than Intel IA32 systems
227(e.g., for IA64 or DEC Alpha systems), the system should also be
228indicated in sysdetails_ASL.  This string is used by some solvers
229as part of the output produced for the "version" keyword and the -v
230command-line option.
231
232Formerly it was necessary to check by hand whether your math library
233sometimes returns NaNs without setting errno when math functions are
234called with invalid arguments, and if so to add -DNANCHECK to the
235CFLAGS assignment of the relevant makefile variant.  Now this detail
236should be handled by a #define in arith.h, which should be computed
237automatically as described above.  If you know that your math library
238never sets errno, adding -DNO_ERRNO to the relevant CFLAGS assignment
239will save a little time and perhaps avoid compiler complaints.
240
241When linking nonlinear solvers on some systems, it's necessary to
242add system-dependent keywords to the linking command, e.g., to make
243dlopen() visible.  Some of the makefiles for specific solvers have
244comments about this, and subdirectory funclink contains sample
245makefiles that illustrate how to do things on for several popular
246systems.
247
248In general, it is necessary once in this directory to give the
249appropriate "make" invocation, such as
250
251	make
252
253on Unix platforms,
254
255	nmake -f makefile.vc
256
257under Windows NT or W9x with MS Visual C++, etc., and then to give
258a suitable "make" invocation in each solver subdirectory of interest.
259On non-Unix systems, in many of the solver subdirectories it may be
260necessary to modify the Unix makefile into the form required by the
261system.
262

README.f77

1The following changes (to solvers/makefile and solvers/*/makefile)
2may permit use of the native Fortran 77 compiler on some systems.
3On other systems, you may be able to discover suitable changes by
4studying system documents (including man pages), and by using the nm
5command to look at the names in relevant libraries.  Often the
6compiler flags "-v -v" (two -v's) will cause the compiler to tell
7you what libraries it references; if, say, /usr/lib/libF77.a is
8among them, you could try thing like
9
10	nm /usr/lib/libF77.a | grep -i arg
11
12to get a hint at the system's variant (if any) of xargv.
13
14If you make the changes shown below, also remove -lf2c from
15solvers/*/makefile.  In other words, if you use the native Fortran
16compiler, do not link against libf2c.a.
17
18
19Sun SunOS:
20	CFLAGS = -O -DKR_headers -DMAIN__=MAIN_ -Dxargv=_xargv
21
22
23Sun Solaris:
24	CFLAGS = -O -DMAIN__=main_ -Dxargv=__xargv
25	For solvers defining MAIN__, add fmain.o built
26	from fmain.f consisting of the two lines
27		call main
28		end
29
30
31HP:
32	CFLAGS = -Aa -O
33	FFLAGS = +ppu
34	For solvers defining MAIN__, add fmain.o built
35	from fmain.c consisting of the following:
36
37		char **xargv;
38		extern void MAIN__(void);
39		main(int argc, char **argv)
40		{
41			xargv = argv;
42			MAIN__();
43			return 0;
44			}
45
46
47IBM RS6000:
48	CFLAGS = -O -Dxargv=p_xargv -DMAIN__=main_
49	FFLAGS = -qextname
50	For solvers defining MAIN__, add fmain.o built
51	from fmain.f consisting of the two lines
52		call main
53		end
54
55
56SGI IRIX:
57	CFLAGS = -O -Dxargv=f77argv
58
59
60DEC OSF1 (Unix for Alpha chip):
61	CFLAGS = -O -Dxargv=for__a_argv
62
63Linux (with g77):
64	CFLAGS = -O -Dxargv=f__xargv
65