Giter Site home page Giter Site logo

kul-optec / superscs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cvxgrp/scs

27.0 27.0 11.0 52.35 MB

Fast conic optimization in C

Home Page: https://kul-forbes.github.io/scs/

License: Other

Makefile 1.09% C 56.58% Java 1.13% MATLAB 16.06% Python 8.70% R 0.12% Shell 0.13% M4 0.07% Jupyter Notebook 0.06% Dockerfile 0.23% HTML 10.68% TeX 5.16%
conic-programs convex-optimization numerical-optimization

superscs's People

Contributors

ajfriend avatar akshayka avatar alexvoronov avatar alphaville avatar bodono avatar bsikander avatar codacy-badger avatar krinam avatar mlubin avatar nishi951 avatar panpat avatar petters avatar rmcgibbo avatar robertwb avatar staticfloat avatar tkelman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superscs's Issues

Segmentation fault in calcResidualsSuperscs

A segmentation fault happens with data->stgs->normalize set to 0.

This is because we access work->scale->D and work->scal->E in calcResidualsSuperscs without checking whether these are defined.

Determine reasonable default parameters for SuperSCS

Determine reasonable default parameters for SuperSCS by experimentation.

Procedure:

  1. For each of the benchmarks here, make a MATLAB function that calls them with given parameters (as an input to that function). Pass also as an argument the size of the problem. The following example will run a random LASSO problem with n=1e3, m=1e2 and given parameters: result_lasso = benchmark_lasso(params, 1e3, 1e2, lambda)
  2. Most problems are parametric. Run for several different parameters
  3. Make as many such benchmark functions as possible.
  4. Make a function that calls all benchmarks with the same parameters (i.e., it runs all benchmarks with given parameters). For each run store the results in a file (to avoid loss of data in case the system crashes)
  5. Choose the best tuning using the following criteria:
    • The percentage of benchmarks that terminate up to the specified accuracy (at least 1e-3) for the given parameters must be close to 100% for SuperSCS
    • Among all runs, the 95%-quantile of the speed-up with respect to SCS is high
    • Single out problems that have been impossible to solve even with SuperSCS with the - otherwise - best tuning parameters. Figure out why and try to choose tuning parameters to solve them.
  6. Run on a server so that we can solve very large problems
  7. Collect statistics (save them in MAT files)

Running issues with make_scs on macosx10.13.4

I got the following messages:

*******************************************************
Building with 'Xcode with Clang'.
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
MEX completed successfully.
Building with 'Xcode with Clang'.
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
MEX completed successfully.
Building with 'Xcode with Clang'.
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
MEX completed successfully.
[SuperSCS] Testing scs_direct... OK!
[SuperSCS] Testing scs_indirect... OK!
[SuperSCS] Creating temp/ folder
[SuperSCS] Compiling sparse_to_csc...
Building with 'Xcode with Clang'.
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
MEX completed successfully.
done!
[SuperSCS] Compiling csc_to_sparse...
Building with 'Xcode with Clang'.
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
xcrun: error: SDK "macosx10.13.4" cannot be located
MEX completed successfully.
done!
[SuperSCS] Adding /Users/username/Downloads/scs-master/matlab/ to the path
[SuperSCS] SUCCESSFULLY INSTALLED SuperSCS
[SuperSCS] SuperSCS is only compatible with CVX v3.0 or later.
*******************************************************

Export more progress info

Export more progress information such as

  • The value of how (progress_mode)
  • Number of line search iterations (progress_ls) or the accepted step (progress_step)
  • Timestamp of each iteration

windows 10 +MSYS : error while loading shared libraries

Hello I have managed to compile the C project successfully (thanks to MSYS/Mingw64), however

  • i can't run tests:
$ make test
mkdir -p out/obj
…..
*************************************************************
Successfully compiled SuperSCS (based on SCS)
Find more at: https://github.com/kul-forbes/scs
To test, type 'out/demo_direct' or 'out/demo_indirect',
….

Compiling individual tests...
….
$ out/UNIT_TEST_RUNNER_DIR.exe
C:/proj/Rprojs/PS1908/scs/out/UNIT_TEST_RUNNER_DIR.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

This happens whether libblas.dll and liblapack.dll are in the out directory or not. (I put them there after compilation).

some subquestions:

  • why is the missing library named "?"
  • what would a static linking look like?
  • what is the way to call up the demo? the instruction To test, type 'out/demo_direct' or 'out/demo_indirect', does not seem to work… should there be an .exe in there?

Thanks!

Installation fails on Ubuntu 16.04

Changing the base image of the Dockerfile to ubuntu:xenial (Ubuntu 16.04) leads to three tests failing (Makefile:170: recipe for target 'run-test' failed). Compilation itself works normally.

Cannot make_scs on MacOS X 10.14.1

Hello,

I'm using Mac OS X 10.14.1 with MATLAB 2018b. Calling make and make run-test on my system completes successfully. I'd like to use SuperSCS with CVX 3.0, but when I run make_scs in the matlab folder, here's the output:

Building with 'Xcode with Clang'.
MEX completed successfully.
Building with 'Xcode with Clang'.
MEX completed successfully.
Building with 'Xcode with Clang'.
MEX completed successfully.
[SuperSCS] Testing scs_direct... interrupt detected in factorization
ERROR: scs_init_priv failure
Failure:could not initialize work
Error using make_scs (line 129)
[direct] problem not solved

Any idea on how to get around this? On your MacOS machine, what version of MATLAB and CVX 3.0 work?

Thanks!

Precision settings don't seem to apply to equality constraints

I recently tested SuperSCS on a moderate sized exponential cone problem (one that took 7 hours with SCS, and 13 seconds with an alpha version of MOSEK 9). The output of the run is below:

---------------------------------------------------------------------------------------
	SCS v1.3.3 - Superlinear Splitting Conic Solver (SuperSCS)
	Web: https://kul-forbes.github.io/scs
	(c) P. Sopasakis, K. Menounou, P. Patrinos, KU Leuven, 2017-8
	(c) Brendan O'Donoghue, Stanford University, 2012-2016
---------------------------------------------------------------------------------------
Lin-sys: sparse-direct, nnz in A = 706235
eps = 1.00e-08, alpha = 1.50, max_iters = 10000, normalize = 1, scale = 1.00
do_super_scs = 1, direction = 100, memory = 10
Variables n = 153181, constraints m = 306824
Cones:	primal zero / dual free vars: 1004
	linear vars: 153000
	exp vars: 152820, dual exp vars: 0
Setup time: 7.46e-01s
Running SuperSCS...
Allocated Memory: 188.20MB
---------------------------------------------------------------------------------------
 Iter | pri res | dua res | rel gap | pri obj | dua obj | kap/tau |   FPR   | time (s)
---------------------------------------------------------------------------------------
     0|      inf       inf       nan      -inf       inf       inf  3.83e+02  4.73e-01 
   100| 1.75e+01  2.47e-01  8.13e-01 -9.55e+00 -5.35e-01  0.00e+00  2.82e+01  6.97e+01 
   200| 3.28e+01  3.70e-01  9.39e-01 -1.43e+01  9.66e-01  0.00e+00  3.45e+01  1.30e+02 
   300| 4.26e+01  4.70e-01  9.52e-01 -1.76e+01  2.05e+00  0.00e+00  3.96e+01  1.82e+02 
   400| 4.92e+01  5.66e-01  9.58e-01 -1.98e+01  2.85e+00  0.00e+00  4.42e+01  2.29e+02 
   500| 5.37e+01  6.35e-01  9.61e-01 -2.12e+01  3.51e+00  0.00e+00  4.72e+01  2.76e+02 
   548| 5.38e+01  6.61e-01  9.61e-01 -2.11e+01  3.71e+00  0.00e+00  4.84e+01  3.00e+02 
---------------------------------------------------------------------------------------
Status: Solved/Inaccurate
Timing: Solve time: 00:05:00.318
	Lin-sys: nnz in L factor: 1239735, avg solve time: 1.96e-02s
	Cones: avg projection time: 4.78e-01s
---------------------------------------------------------------------------------------
Error metrics:
dist(s, K) = 1.4266e-11, dist(y, K*) = 7.2271e-09, s'y/|s||y| = -9.8843e-12
|Ax + s - b|_2 / (1 + |b|_2) = 5.3802e+01
|A'y + c|_2 / (1 + |c|_2) = 6.6083e-01
|c'x + b'y| / (1 + |c'x| + |b'y|) = 9.6132e-01
---------------------------------------------------------------------------------------
c'x = -21.1421, -b'y = 3.7104
=======================================================================================

The cone constraints and complimentary slackness are handled with high precision (even higher than the 1e-8 precision requested), but the equality constraints are not respected. Instead of having |Ax + s -b| on the order of 1e-8, it's on the order of 1e2! Rather than terminating after 5 minutes with a bad solution I would expect it to terminate after much longer (say, a couple hours) with a good solution.

Edit: the problem was formulated with cvxpy 1.0.8, using SuperSCS default settings within cvxpy (use_indirect=False, max_iters=10000).

Can't compile on ubuntu 18.04

I tried make in ubuntu 18.04, I get error

include/util_time.h:6:19: error: field ‘tic’ has incomplete type
struct timespec tic;
^~~
include/util_time.h:7:19: error: field ‘toc’ has incomplete type
struct timespec toc;

It seems I am not able to use struct timespec, I converted it into timeval and it works. Is there a reason timespec doesn't work in ubuntu?

Python interface

The following fails:

import superscs
import numpy as np
from scipy import sparse
ij = np.array([[0,1,2,3],[0,1,2,3]])
A = sparse.csc_matrix(([-1.,-1.,1.,1.], ij), (4,4))
b = np.array([0.,0.,1,1])
c = np.array([1.,1.,-1,-1])
cone = {'l': 4}
data = {'A': A, 'b':b, 'c':c}
sol = superscs.solve(data, cone, use_indirect = False, memory = 150, verbose = 2, rho_x = 0.01)

with message:

WARNING! The value ls=4576918229304087675 is too high. The maximum allowed number of line search iteration is 40. We recommend a value about 10.
ERROR: Validation returned failure
Settings:
alpha        : 1.5
beta         : 0.5
c1           : 0.9999
c_bl         : 0.999
cg_rate      : 2
dir          : 100
do_super_scs : 1
eps          : 0.001
(k0, k1, k2) : (0, 1, 1)
ls           : 1202590843
max_iters    : 2500
memory       : 150
normalize    : 1
rho_x        : 0.001
scale        : 1
sigma        : 0.01
sse          : 0.999
thetabar     : 0.1
warm_start   : 0
Failure:could not initialize work

Errors in Python Installation

I am running into a few issues when trying to install the Python version. After calling sudo python3 setup.py install I get (sorry for the long traceback):

Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, int32=False, root_dir='../', scs=False)
/usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:636: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  self.calc_info()
/usr/bin/ld: cannot find -lcblas
collect2: error: ld returned 1 exit status
{'define_macros': [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)], 'libraries': ['blas', 'blas'], 'library_dirs': ['/usr/lib'], 'include_dirs': ['/usr/local/include', '/usr/include'], 'language': 'c'}
/usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:636: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  self.calc_info()
{'define_macros': [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)], 'libraries': ['lapack', 'lapack', 'blas', 'blas'], 'library_dirs': ['/usr/lib'], 'language': 'c', 'include_dirs': ['/usr/local/include', '/usr/include']}
running install
running bdist_egg
running egg_info
writing superscs.egg-info/PKG-INFO
writing dependency_links to superscs.egg-info/dependency_links.txt
writing requirements to superscs.egg-info/requires.txt
writing top-level names to superscs.egg-info/top_level.txt
reading manifest file 'superscs.egg-info/SOURCES.txt'
writing manifest file 'superscs.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
##################################################
# failed to compile with OpenMP;                 #
# some sections of SCS will not be parallelized. #
##################################################
building '_superscs_direct' extension
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC

compile options: '-DPYTHON -DCTRLC=1 -DCOPYAMATRIX -DUSE_LAPACK=1 -DLAPACK_LIB_FOUND=1 -DSVD_ACTIVATED=1 -DLAPACK_LIB_FOUND -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -DDLONG=0 -I../ -I../include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I../linsys -I/usr/local/include -I/usr/include -I/usr/local/include -I/usr/include -I../linsys/direct/ -I../linsys/direct/external/ -I/usr/include/python3.6m -c'
extra options: '-O3 -std=c99'
x86_64-linux-gnu-gcc: ../src/ctrlc.c
x86_64-linux-gnu-gcc: ../src/directions.c
x86_64-linux-gnu-gcc: scsmodule.c
x86_64-linux-gnu-gcc: ../src/cs.c
x86_64-linux-gnu-gcc: ../src/scs_parser.c
x86_64-linux-gnu-gcc: ../src/cones.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../src/linAlg.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../src/scs.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../src/scs_version.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../src/unit_test_util.c
x86_64-linux-gnu-gcc: ../src/util.c
x86_64-linux-gnu-gcc: ../linsys/common.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/private.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_1.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/SuiteSparse_config.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_aat.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_control.c
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_2.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_defaults.c
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_dump.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_global.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_info.c
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_order.c
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_postorder.c
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_preprocess.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_post_tree.c
x86_64-linux-gnu-gcc: ../linsys/direct/external/amd_valid.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
x86_64-linux-gnu-gcc: ../linsys/direct/external/ldl.c
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'

Do you have any idea what's going wrong?

python installation

Hi,

I tried to install this freebsd. finally got the core package compiled. but still no luck with the python interface.

When I do python setup.py install, I get this error. Tried googling, and installed and reinstalled setuptools, but no luck.
TypeError: dist must be a Distribution instance

If I do: pip install .
the error goes away, but I cant load the package in python- still gives me a package not found error.

So my question is can this package be put in the "pip packaging system".

Compiling error in Matlab

I am using Win10 and Matlab 2019a. I compiled the files using Cygwin and installed the MinGW64 Compiler in Matlab. However, when I proceeded to use make_scs in Matlab command window, the following error occurred:

F:\superscs\src\linAlg.c:36:56: error: expected identifier before ')' token
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:38:16: note: in expansion of macro 'SCS_IAMAX'
extern blasint SCS_IAMAX(
^
F:\superscs\src\linAlg.c:36:19: error: 'stitch__' declared as function returning a function
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:36:19: note: in definition of macro 'SCS_IAMAX'
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^~~~~~~~
F:\superscs\src\linAlg.c:41:9: warning: parameter names (without types) in function declaration
const blasint inc_x);
^~~~~
F:\superscs\src\linAlg.c:85:13: error: 'LPCK' declared as function returning a function
extern void LPCK(gels)(
^~~~
F:\superscs\src\linAlg.c:96:9: warning: parameter names (without types) in function declaration
blasint
info);
^~~~~~~
F:\superscs\src\linAlg.c:98:13: error: 'LPCK' declared as function returning a function
extern void LPCK(gelss)(
^~~~
F:\superscs\src\linAlg.c:111:9: warning: parameter names (without types) in function declaration
blasint* info);
^~~~~~~
In file included from F:\superscs\include/cones.h:36:0,
from F:\superscs\include/scs.h:33,
from F:\superscs\include/linAlg.h:35,
from F:\superscs\src\linAlg.c:28:
F:\superscs\src\linAlg.c: In function 'scs_norm':
F:\superscs\include/scs_blas.h:46:17: warning: implicit declaration of function 'dnrm2'
[-Wimplicit-function-declaration]
#define BLAS(x) d##x
^
F:\superscs\src\linAlg.c:114:20: note: in expansion of macro 'BLAS'
#define scs_nrm2_ BLAS(nrm2)
^~~~
F:\superscs\src\linAlg.c:681:12: note: in expansion of macro 'scs_nrm2_'
return scs_nrm2_(&len_, v, &one);
^
F:\superscs\src\linAlg.c: In function 'scs_norm_infinity':
F:\superscs\src\linAlg.c:36:28: error: 'i' undeclared (first use in this function)
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
F:\superscs\src\linAlg.c:36:28: note: each undeclared identifier is reported only once for each function it appears in
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
In file included from F:\superscs\include/cones.h:36:0,
from F:\superscs\include/scs.h:33,
from F:\superscs\include/linAlg.h:35,
from F:\superscs\src\linAlg.c:28:
F:\superscs\include/scs_blas.h:46:17: error: 'damax' undeclared (first use in this function)
#define BLAS(x) d##x
^
F:\superscs\src\linAlg.c:36:31: note: in expansion of macro 'BLAS'
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^~~~
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
F:\superscs\src\linAlg.c:36:56: error: expected expression before ')' token
#define SCS_IAMAX stitch__(i, BLAS(amax), SCS_NO_SUFFIX)
^
F:\superscs\src\linAlg.c:113:20: note: in expansion of macro 'SCS_IAMAX'
#define scs_iamax_ SCS_IAMAX
^~~~~~~~~
F:\superscs\src\linAlg.c:693:23: note: in expansion of macro 'scs_iamax_'
blasint idx_max = scs_iamax_(&len_, a, &one);
^
F:\superscs\src\linAlg.c: In function 'scs_qr_workspace_size':
F:\superscs\src\linAlg.c:119:24: error: 'gels' undeclared (first use in this function)
#define scs_gels_ LPCK(gels)
^
F:\superscs\src\linAlg.c:119:24: note: in definition of macro 'scs_gels_'
#define scs_gels_ LPCK(gels)
^~~~
F:\superscs\src\linAlg.c: In function 'scs_qrls':
F:\superscs\src\linAlg.c:119:24: error: 'gels' undeclared (first use in this function)
#define scs_gels_ LPCK(gels)
^
F:\superscs\src\linAlg.c:119:24: note: in definition of macro 'scs_gels_'
#define scs_gels_ LPCK(gels)
^~~~
F:\superscs\src\linAlg.c: In function 'scs_svd_workspace_size':
F:\superscs\src\linAlg.c:120:26: error: 'gelss' undeclared (first use in this function)
#define scs_dgelss_ LPCK(gelss)
^
F:\superscs\src\linAlg.c:120:26: note: in definition of macro 'scs_dgelss_'
#define scs_dgelss_ LPCK(gelss)
^~~~~
F:\superscs\src\linAlg.c: In function 'scs_svdls':
F:\superscs\src\linAlg.c:120:26: error: 'gelss' undeclared (first use in this function)
#define scs_dgelss_ LPCK(gelss)
^
F:\superscs\src\linAlg.c:120:26: note: in definition of macro 'scs_dgelss_'
#define scs_dgelss_ LPCK(gelss)
^~~~~

Test with `rho_x<1` and `k0!=1`

Test with rho_x<1 and k0!=1.

Make sure that the algorithm works properly with rho_x<1, k0!=1 and several combinations of k1, k2 and ls.

Check (at least) the following:

  1. All residuals
  2. Number of iterations
  3. Solutions (for a limited number of iterations)
  4. Status codes

Linear algebra utilities

Implement the following functions in linAlg.c:

  • axpy (x := alpha * x + beta * y)
  • sum (returns the sum of the elements of an array)

Installation error on Windows

On running 'make_scs', I obtain the following warnings and errors:

Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. 
In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. 
In compile_direct (line 51)
  In make_scs (line 105) 
Error using mex
C:\Users\crose\Documents\scs-master\scs-master\matlab\amd_order not found; check that you are in the correct current
folder, and check the spelling of 'C:\Users\crose\Documents\scs-master\scs-master\matlab\amd_order'.

Error in compile_direct (line 54)
eval(cmd);

Error in make_scs (line 105)
compile_direct(flags, common_scs);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.