I had tried this first, same behavior. (Actually, I compiled SCS
myself because I thought the “stock” version might not be
well-optimized for my computer since it was taking so long.)
Here: (I changed your instructions a bit: JULIA_HOME
points to the
root dir of the Julia install, so libraries are in
$JULIA_HOME/lib/julia
and I used make OPT_FLAGS=...
instead of
make CFLAGS=...
otherwise location of include files etc. were being
wiped away)
$ which julia
/opt/easybuild/software/Julia/1.2.0-linux-x86_64/bin/julia
$ export JULIA_HOME=/opt/easybuild/software/Julia/1.2.0-linux-x86_64
$ cd deps/scs/
$ make clean
$ make -j8 OPT_FLAGS="-march=native" DLONG=1 USE_OPENMP=1 BLASLDFLAGS="-L$JULIA_HOME/lib/julia -lopenblas64_" BLAS64=1 BLASSUFFIX=_64_
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/scs.o src/scs.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/util.o src/util.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/cones.o src/cones.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/accel.o src/accel.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/cs.o src/cs.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/linalg.o src/linalg.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/ctrlc.o src/ctrlc.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/scs_version.o src/scs_version.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o src/normalize.o src/normalize.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/indirect/private.o linsys/indirect/private.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/common.o linsys/common.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/private.o linsys/direct/private.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/ldl.o linsys/direct/external/ldl.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_1.o linsys/direct/external/amd_1.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_valid.o linsys/direct/external/amd_valid.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_2.o linsys/direct/external/amd_2.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_postorder.o linsys/direct/external/amd_postorder.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_control.o linsys/direct/external/amd_control.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_post_tree.o linsys/direct/external/amd_post_tree.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_preprocess.o linsys/direct/external/amd_preprocess.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_aat.o linsys/direct/external/amd_aat.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_info.o linsys/direct/external/amd_info.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_global.o linsys/direct/external/amd_global.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_defaults.o linsys/direct/external/amd_defaults.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_order.o linsys/direct/external/amd_order.c
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -c -o linsys/direct/external/amd_dump.o linsys/direct/external/amd_dump.c
mkdir -p out
mkdir -p out
ar rv out/libscsindir.a src/scs.o src/util.o src/cones.o src/accel.o src/cs.o src/linalg.o src/ctrlc.o src/scs_version.o src/normalize.o linsys/indirect/private.o linsys/common.o
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -shared -Wl,-soname,libscsindir.so -o out/libscsindir.so src/scs.o src/util.o src/cones.o src/accel.o src/cs.o src/linalg.o src/ctrlc.o src/scs_version.o src/normalize.o linsys/indirect/private.o linsys/common.o -lm -lrt -lgomp -L/opt/easybuild/software/Julia/1.2.0-linux-x86_64/lib/julia -lopenblas64_
r - src/scs.o
r - src/util.o
r - src/cones.o
r - src/accel.o
r - src/cs.o
r - src/linalg.o
r - src/ctrlc.o
r - src/scs_version.o
r - src/normalize.o
r - linsys/indirect/private.o
r - linsys/common.o
ranlib out/libscsindir.a
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -o out/demo_socp_indirect test/random_socp_prob.c out/libscsindir.a -lm -lrt -lgomp -L/opt/easybuild/software/Julia/1.2.0-linux-x86_64/lib/julia -lopenblas64_
mkdir -p out
mkdir -p out
ar rv out/libscsdir.a src/scs.o src/util.o src/cones.o src/accel.o src/cs.o src/linalg.o src/ctrlc.o src/scs_version.o src/normalize.o linsys/direct/private.o linsys/direct/external/ldl.o linsys/direct/external/amd_1.o linsys/direct/external/amd_valid.o linsys/direct/external/amd_2.o linsys/direct/external/amd_postorder.o linsys/direct/external/amd_control.o linsys/direct/external/amd_post_tree.o linsys/direct/external/amd_preprocess.o linsys/direct/external/amd_aat.o linsys/direct/external/amd_info.o linsys/direct/external/amd_global.o linsys/direct/external/amd_defaults.o linsys/direct/external/amd_order.o linsys/direct/external/amd_dump.o linsys/common.o
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -shared -Wl,-soname,libscsdir.so -o out/libscsdir.so src/scs.o src/util.o src/cones.o src/accel.o src/cs.o src/linalg.o src/ctrlc.o src/scs_version.o src/normalize.o linsys/direct/private.o linsys/direct/external/ldl.o linsys/direct/external/amd_1.o linsys/direct/external/amd_valid.o linsys/direct/external/amd_2.o linsys/direct/external/amd_postorder.o linsys/direct/external/amd_control.o linsys/direct/external/amd_post_tree.o linsys/direct/external/amd_preprocess.o linsys/direct/external/amd_aat.o linsys/direct/external/amd_info.o linsys/direct/external/amd_global.o linsys/direct/external/amd_defaults.o linsys/direct/external/amd_order.o linsys/direct/external/amd_dump.o linsys/common.o -lm -lrt -lgomp -L/opt/easybuild/software/Julia/1.2.0-linux-x86_64/lib/julia -lopenblas64_
r - src/scs.o
r - src/util.o
r - src/cones.o
r - src/accel.o
r - src/cs.o
r - src/linalg.o
r - src/ctrlc.o
r - src/scs_version.o
r - src/normalize.o
r - linsys/direct/private.o
r - linsys/direct/external/ldl.o
r - linsys/direct/external/amd_1.o
r - linsys/direct/external/amd_valid.o
r - linsys/direct/external/amd_2.o
r - linsys/direct/external/amd_postorder.o
r - linsys/direct/external/amd_control.o
r - linsys/direct/external/amd_post_tree.o
r - linsys/direct/external/amd_preprocess.o
r - linsys/direct/external/amd_aat.o
r - linsys/direct/external/amd_info.o
r - linsys/direct/external/amd_global.o
r - linsys/direct/external/amd_defaults.o
r - linsys/direct/external/amd_order.o
r - linsys/direct/external/amd_dump.o
r - linsys/common.o
ranlib out/libscsdir.a
gcc -g -Wall -Wwrite-strings -pedantic -O3 -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -fPIC -fopenmp -march=native -o out/demo_socp_direct test/random_socp_prob.c out/libscsdir.a -lm -lrt -lgomp -L/opt/easybuild/software/Julia/1.2.0-linux-x86_64/lib/julia -lopenblas64_
****************************************************************************************
Successfully compiled scs, copyright Brendan O'Donoghue 2012.
To test, type 'out/demo_socp_indirect' to solve a random SOCP.
**********************************************************************************
Compiled with blas and lapack, can solve LPs, SOCPs, SDPs, ECPs, and PCPs
****************************************************************************************
$ LD_LIBRARY_PATH=$JULIA_HOME/lib/julia:$LD_LIBRARY_PATH ./out/demo_socp_direct 1000 0.5 0.5 1
seed : 1
_a is 3000 by 1000, with 32 nonzeros per column.
A has 32000 nonzeros (1.066667% dense).
Nonzeros of A take 0.000238 GB of storage.
Row idxs of A take 0.000119 GB of storage.
Col ptrs of A take 0.000004 GB of storage.
ScsCone information:
Zero cone rows: 1500
LP cone rows: 1500
Number of second-order cones: 0, covering 0 rows, with sizes
[]
Number of rows covered is 3000 out of 3000.
Generating random matrix:
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
done
true pri opt = 8.857986
true dua opt = 8.857986
----------------------------------------------------------------------------
SCS v2.0.2 - Splitting Conic Solver
(c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-direct, nnz in A = 32000
eps = 1.00e-05, alpha = 1.50, max_iters = 5000, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 1000, constraints m = 3000
Cones: primal zero / dual free vars: 1500
linear vars: 1500
Setup time: 2.88e-01s
----------------------------------------------------------------------------
Iter | pri res | dua res | rel gap | pri obj | dua obj | kap/tau | time (s)
----------------------------------------------------------------------------
0| 1.73e+00 1.94e+00 9.99e-01 -1.19e+03 1.16e+01 0.00e+00 3.17e-02
100| 2.71e-04 3.08e-05 4.65e-04 8.84e+00 8.85e+00 8.57e-14 2.76e-01
200| 4.80e-05 3.18e-06 6.24e-05 8.86e+00 8.86e+00 8.57e-14 4.78e-01
300| 4.80e-05 1.28e-07 4.48e-05 8.86e+00 8.86e+00 3.59e-14 6.73e-01
400| 1.77e-06 1.76e-06 6.48e-06 8.86e+00 8.86e+00 3.59e-14 8.10e-01
----------------------------------------------------------------------------
Status: Solved
Timing: Solve time: 8.10e-01s
Lin-sys: nnz in L factor: 518233, avg solve time: 1.72e-03s
Cones: avg projection time: 1.14e-06s
Acceleration: avg step time: 0.00e+00s
----------------------------------------------------------------------------
Error metrics:
dist(s, K) = 5.9495e-16, dist(y, K*) = 0.0000e+00, s'y/|s||y| = -2.7643e-18
primal res: |Ax + s - b|_2 / (1 + |b|_2) = 1.7734e-06
dual res: |A'y + c|_2 / (1 + |c|_2) = 1.7572e-06
rel gap: |c'x + b'y| / (1 + |c'x| + |b'y|) = 6.4848e-06
----------------------------------------------------------------------------
c'x = 8.8580, -b'y = 8.8579
============================================================================
true pri opt = 8.857986
true dua opt = 8.857986
scs pri obj= 8.858026
scs dua obj = 8.857905
$ LD_LIBRARY_PATH=$JULIA_HOME/lib/julia:$LD_LIBRARY_PATH ./out/demo_socp_indirect 1000 0.5 0.5 1
seed : 1
_a is 3000 by 1000, with 32 nonzeros per column.
A has 32000 nonzeros (1.066667% dense).
Nonzeros of A take 0.000238 GB of storage.
Row idxs of A take 0.000119 GB of storage.
Col ptrs of A take 0.000004 GB of storage.
ScsCone information:
Zero cone rows: 1500
LP cone rows: 1500
Number of second-order cones: 0, covering 0 rows, with sizes
[]
Number of rows covered is 3000 out of 3000.
Generating random matrix:
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
done
true pri opt = 8.857986
true dua opt = 8.857986
----------------------------------------------------------------------------
SCS v2.0.2 - Splitting Conic Solver
(c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-indirect, nnz in A = 32000, CG tol ~ 1/iter^(2.00)
eps = 1.00e-05, alpha = 1.50, max_iters = 5000, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 1000, constraints m = 3000
Cones: primal zero / dual free vars: 1500
linear vars: 1500
Setup time: 2.16e-03s
----------------------------------------------------------------------------
Iter | pri res | dua res | rel gap | pri obj | dua obj | kap/tau | time (s)
----------------------------------------------------------------------------
0| 1.74e+00 1.96e+00 9.99e-01 -1.19e+03 1.68e+01 0.00e+00 2.05e-01
100| 2.89e-04 1.03e-05 4.36e-04 8.84e+00 8.85e+00 1.16e-13 2.56e-01
200| 4.81e-05 4.63e-06 1.00e-04 8.86e+00 8.86e+00 1.16e-13 2.95e-01
300| 4.80e-05 1.12e-06 3.89e-05 8.86e+00 8.86e+00 1.27e-13 3.19e-01
400| 2.06e-05 7.59e-07 9.35e-06 8.86e+00 8.86e+00 2.38e-13 3.48e-01
480| 1.54e-06 1.70e-06 2.27e-06 8.86e+00 8.86e+00 5.55e-15 3.72e-01
----------------------------------------------------------------------------
Status: Solved
Timing: Solve time: 3.72e-01s
Lin-sys: avg # CG iterations: 2.78, avg solve time: 6.91e-04s
Cones: avg projection time: 4.23e-07s
Acceleration: avg step time: 0.00e+00s
----------------------------------------------------------------------------
Error metrics:
dist(s, K) = 5.0589e-16, dist(y, K*) = 0.0000e+00, s'y/|s||y| = 8.4916e-18
primal res: |Ax + s - b|_2 / (1 + |b|_2) = 1.5373e-06
dual res: |A'y + c|_2 / (1 + |c|_2) = 1.7024e-06
rel gap: |c'x + b'y| / (1 + |c'x| + |b'y|) = 2.2741e-06
----------------------------------------------------------------------------
c'x = 8.8580, -b'y = 8.8580
============================================================================
true pri opt = 8.857986
true dua opt = 8.857986
scs pri obj= 8.857998
scs dua obj = 8.857955
I can see from inspecting /proc/$(pgrep julia)/maps
that the libscs*.so
files just compiled have been loaded; still, I do not get any output from the solver to the console which I find puzzling…
Thanks,
Riccardo