Created
December 2, 2017 20:44
-
-
Save christianchristensen/50e34782e21a57e1f3bee8bb199524bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://ampl.com/try-ampl/download-a-free-demo/#linux -> http://ampl.com/demo/ampl.linux64.tgz | |
https://www.freebsd.org/doc/handbook/linuxemu-lbc-install.html -> | |
$ uname -a | |
FreeBSD d630 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64 | |
# pkg install linux_base-c7 | |
# kldload linux64 | |
# kldstat | |
Id Refs Address Size Name | |
1 8 0xffffffff80200000 1f67a88 kernel | |
2 1 0xffffffff82221000 3c93f linux64.ko | |
3 1 0xffffffff8225e000 7b0f linux_common.ko | |
Before: | |
$ ./ampl -h | |
ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2 | |
Abort trap | |
$ ldd ampl | |
ampl: | |
ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2 | |
ampl: signal 6 | |
After: | |
$ ldd ampl | |
ampl: | |
linux_vdso.so.1 => (0x00007ffffffff000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000000800a00000) | |
libm.so.6 => /lib64/libm.so.6 (0x0000000800e00000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x0000000801200000) | |
libc.so.6 => /lib64/libc.so.6 (0x0000000801600000) | |
/lib64/ld-linux-x86-64.so.2 (0x0000000800702000) | |
$ ./ampl -h | |
invalid option -h | |
Usage: ampl [options] [file [file...]] | |
No file arguments means read from standard input, as does - by itself. | |
Options: | |
-Cn {0 = suppress Cautions; 1 = default; 2 = treat as error;}* | |
-Ln {0 = treat linear definitional constrs and var = decls as nonlin}* | |
-P {skip presolve -- same as "option presolve 0;" } | |
-S {substitute out definitional constraints (var = expression)}* | |
-T {show genmod times for each item}* | |
-enn {exit (if nn > 0) or abort command at |nn|-th error; 0 = no exit}* | |
-f {do not treat unavailable functions of constant args as variable}* | |
-g {run in a separate process group} | |
-ix {import functions from x; specify -i? for details } | |
-ooutopt {specify -o? for details}* | |
-s[seed] {seed for random numbers; -s means current time}* | |
-t {show times}* | |
-v {show version and license details; -v? shows other -v options} | |
--version {show version and exit, ignoring license files} | |
-xnn {allow nn wall-clock seconds of execution time} | |
-?? {show debug and obscure options} | |
* Equivalent option settings: | |
-Cn option Cautions n; -Ln option linelim n; | |
-P option presolve 0; -S option substout 1; | |
-T option gentimes 1; -enn option eexit nn; | |
-f option funcwarn 1; -ofstub option outopt fstub; | |
-s option randseed ''; -snn option randseed nn; | |
-t option times 1; | |
--- | |
http://ampl.com/BOOK/CHAPTERS/16-script.pdf | |
$ PATH=$PATH:`pwd` ./ampl | |
ampl: model models/steelT.mod; | |
ampl: data models/steelT.dat; | |
ampl: solve; | |
MINOS 5.51: optimal solution found. | |
15 iterations, objective 515033 | |
ampl: display Total_Profit; | |
Total_Profit = 515033 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment