Skip to content

Commit b09fff7

Browse files
committed
Update README
1 parent e72f1e3 commit b09fff7

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

README.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ solver-independent `MathProgBase` and `MathOptInterface` API's.
1010
*Note: This wrapper is maintained by the JuliaOpt community and is not a COIN-OR
1111
project.*
1212

13-
| **PackageEvaluator** | **Build Status** |
14-
|:--------------------:|:----------------:|
15-
| [![][pkg-0.5-img]][pkg-0.5-url] | [![Build Status][build-img]][build-url] [![Build Status][winbuild-img]][winbuild-url] |
16-
| [![][pkg-0.6-img]][pkg-0.6-url] | [![Coveralls branch][coveralls-img]][coveralls-url] [![Codecov branch][codecov-img]][codecov-url] |
13+
| **Build Status** |
14+
|:----------------:|
15+
| [![Build Status][build-img]][build-url] [![Build Status][winbuild-img]][winbuild-url] |
16+
| [![Coveralls branch][coveralls-img]][coveralls-url] [![Codecov branch][codecov-img]][codecov-url] |
1717

1818
The original algorithm is described by
1919
B. Borchers.
@@ -23,25 +23,37 @@ DOI [10.1080/10556789908805765](http://dx.doi.org/10.1080/10556789908805765).
2323
[Preprint](http://euler.nmt.edu/~brian/csdppaper.pdf).
2424

2525
## Installing CSDP
26-
First, make sure that you have a compiler available and that LAPACK and BLAS are installed. On Ubuntu, simply do
26+
27+
You can either use the system LAPACK and BLAS libaries or the libraries shipped with Julia.
28+
First, make sure that you have a compiler available, e.g. on Ubuntu do
2729
```
28-
$ sudo apt-get install build-essential liblapack-dev libopenblas-dev
30+
$ sudo apt-get install build-essential
2931
```
30-
31-
Then, install CSDP using
32+
To use the libraries shipped by Julia, simply do
33+
```julia
34+
$ CSDP_USE_JULIA_LAPACK=true julia -e 'import Pkg; Pkg.add("CSDP"); Pkg.build("CSDP")'
35+
```
36+
To use the system libaries, first make sure it is installed, e.g. on Ubuntu do
3237
```julia
33-
julia> Pkg.add("CSDP")
38+
$ sudo apt-get install liblapack-dev libopenblas-dev
3439
```
40+
and then do
41+
```julia
42+
$ CSDP_USE_JULIA_LAPACK=false julia -e 'import Pkg; Pkg.add("CSDP"); Pkg.build("CSDP")'
43+
```
44+
45+
Note that if the environment variable `CSDP_USE_JULIA_LAPACK` is not set, it defaults
46+
to using the system libraries if available and the Julia libraries otherwise.
3547

36-
To use CSDP with JuMP v0.18, do
48+
To use CSDP with JuMP v0.19 and later, do
3749
```julia
3850
using JuMP
39-
model = Model(solver=CSDPSolver())
51+
model = Model(with_optimizer(CSDP.Optimizer))
4052
```
41-
and with JuMP development version, do
53+
and with JuMP v0.18 and earlier, do
4254
```julia
4355
using JuMP
44-
model = Model(with_optimizer(CSDP.Optimizer))
56+
model = Model(solver=CSDPSolver())
4557
```
4658

4759
## CSDP problem representation
@@ -146,18 +158,14 @@ For Windows, a pre-compiled DLL is downloaded (unless you configure the `build.j
146158

147159

148160
## Next Steps (TODOs)
161+
149162
- [ ] Maybe port `libcsdp` to use 64bit Lapack, aka replace “some `int`s” by `long int` (the variables used in a Lapack call). Started in brach `julias_openblas64`
150163
- [ ] Maybe think about an own array type to circumvent the 1-index problems in `libcsdp`.
151164
- [ ] Map Julia's sparse arrays to `sparsematrixblock`.
152165
- [ ] Upload `libcsdp.dll` for Windows via Appveyor deployment as described at
153166
[JuliaCon](https://www.youtube.com/watch?v=XKdKdfHB2KM&index=12&list=PLP8iPy9hna6SQPwZUDtAM59-wPzCPyD_S).
154167
Currently we use a [separate repository](https://github.com/EQt/winlapack).
155168

156-
[pkg-0.5-img]: http://pkg.julialang.org/badges/CSDP_0.5.svg
157-
[pkg-0.5-url]: http://pkg.julialang.org/?pkg=CSDP
158-
[pkg-0.6-img]: http://pkg.julialang.org/badges/CSDP_0.6.svg
159-
[pkg-0.6-url]: http://pkg.julialang.org/?pkg=CSDP
160-
161169
[build-img]: https://travis-ci.org/JuliaOpt/CSDP.jl.svg?branch=master
162170
[build-url]: https://travis-ci.org/JuliaOpt/CSDP.jl
163171
[winbuild-img]: https://ci.appveyor.com/api/projects/status/v8nb0yb7ahn9n7ol?svg=true

deps/build.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const JULIA_LAPACK = if haskey(ENV, ENV_VAR)
1616
@info "Using system blas and lapack libraries as the environment variable `$ENV_VAR` is set to `$value`."
1717
false
1818
else
19-
error("The environment variable `$ENV_VAR` is set to `$value`. Set it to `1` or `0` instead.")
19+
error("The environment variable `$ENV_VAR` is set to `$value`. Set it to `true` or `false` instead.")
2020
end
2121
else
2222
if BinDeps.issatisfied(blas) && BinDeps.issatisfied(lapack)
23-
@info "Using system blas and lapack libraries. Set the environment variable `$ENV_VAR` to `1` to use the blas/lapack library shipped with Julia."
23+
@info "Using system blas and lapack libraries. Set the environment variable `$ENV_VAR` to `true` to use the blas/lapack library shipped with Julia."
2424
false
2525
else
2626
@info "Using the blas and lapack libraries shipped with Julia as there is no system blas and lapack libraries installed."

0 commit comments

Comments
 (0)