In order to build the OS project on Unix/Linux systems do the following.
Step 1: Make and connect to the distribution root directory.
mkdir COIN-OS cd COIN-OS
Step 2: Run the configure script that will generate the makefiles. If you are running on a machine with a FORTRAN 95 compiler present (e.g. gfortran) run the command
./configure
otherwise for now use
./configure COIN_SKIP_PROJECTS=Ipoptas COIN-OR's Ipopt project currently uses Fortran to compile some of its dependent libraries.
Note:
https://projects.coin-or.org/BuildTools/wiki/user-configure#PreparingtheCompilation.
Step 3: Run the make files.
make
Step 4: Run the unitTest.
make test
Depending upon which third party software you have installed, the result of running the unitTest should look something like (we have included the third-party solvers LINDO and Knitro in the test results below; they are not part of the default build):
HERE ARE THE UNIT TEST RESULTS: Solved problem avion2.osil with Ipopt Solved problem HS071.osil with Ipopt Solved problem rosenbrockmod.osil with Ipopt Solved problem parincQuadratic.osil with Ipopt Solved problem parincLinear.osil with Ipopt Solved problem callBack.osil with Ipopt Solved problem callBackRowMajor.osil with Ipopt Solved problem parincLinear.osil with Clp Solved problem p0033.osil with Cbc Solved problem rosenbrockmod.osil with Knitro Solved problem callBackTest.osil with Knitro Solved problem parincQuadratic.osil with Knitro Solved problem HS071_NLP.osil with Knitro Solved problem p0033.osil with SYMPHONY Solved problem parincLinear.osil with DyLP Solved problem volumeTest.osil with Vol Solved problem p0033.osil with GLPK Solved problem lindoapiaddins.osil with Lindo Solved problem rosenbrockmod.osil with Lindo Solved problem parincQuadratic.osil with Lindo Solved problem wayneQuadratic.osil with Lindo Test the MPS -> OSiL converter on parinc.mps using Cbc Test the AMPL nl -> OSiL converter on hs71.nl using LINDO Test a problem written in b64 and then converted to OSInstance Successful test of OSiL parser on problem parincLinear.osil Successful test of OSrL parser on problem parincLinear.osrl Successful test of prefix and postfix conversion routines on problem rosenbrockmod.osil Successful test of all of the nonlinear operators on file testOperators.osil Successful test of AD gradient and Hessian calculations on problem CppADTestLag.osil All tests completed successfully
If you do not see
All tests completed successfullythen you have not passed the unitTest and hopefully some semi-intelligible error message was given.
Step 5: Install the libraries and executables.
make install
This will install all of the libraries in the lib directory. In particular, the main OS library libOS along with the libraries of the other COIN-OR projects that download with the OS project will get installed in the lib directory. In addition the make install command will install four executable programs in the bin directory. One of these binaries is OSSolverService which is the main OS project executable. This is described in Section 10. In addition clp, cbc, ipopt, and symphony get installed in the bin directory. Necessary header files are installed in the include directory. In this case, bin, lib, and include are all subdirectories of where ./configure is run. If the user wants these files installed elsewhere, then configure should specify the prefix of these directories. That is,
./configure --prefix=prefixDirctory COIN_SKIP_PROJECTS=Ipopt
For example, running
./configure --prefix=/usr/local COIN_SKIP_PROJECTS=Ipopt
and then running make and make install will put the relevant files in
/usr/local/bin /usr/local/include /usr/local/lilb
Run an Example! If make test works, proceed to Section 10 to run the key executable, OSSolverService.