Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error on Windows #30

Open
christiernrose opened this issue Mar 12, 2019 · 6 comments
Open

Installation error on Windows #30

christiernrose opened this issue Mar 12, 2019 · 6 comments
Labels
bug bug report windows windows operating system

Comments

@christiernrose
Copy link

christiernrose commented Mar 12, 2019

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);
@alphaville
Copy link
Member

The error seems to be that make_scs tries to find amd_order in the current folder.

Have you run make in the terminal (command line) before running make_scs in MATLAB?

I don't use Windows, so I haven't tested properly. I've only tried it on Appveyor.

I'm not sure what these warnings mean. Can you please remove the semicolon at the end of line 53 in scs_direct.m and let me know what it prints?

@alphaville alphaville added bug bug report windows windows operating system labels Mar 24, 2019
@Mark-L-Stone
Copy link

Configuration: Windows 7 Service Pack 1 with MATLAB R2017b

MEX configured to use 'Intel Parallel Studio XE 2015 with Microsoft Visual Studio 2013 (C)' for C language compilation.

SuperSCS 1.3.2 was unzipped into C:\scs-master_Super SCS_1.3.2

The sprintf statements in compile_direct.m didn't work correctly and produced Warning messages. I manually fixed up the cmd and paths for include statements, then got to the point of fatal error messages compiling linAlg.c.

Question: For use in MATLAB, is it supposed to be sufficient to run make_scs, or does make need to be run (with Makefile ?) at command line before make_scs ?

Here are the Warning and error messages:


sprintf Warnings running compile_direct.m

Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 40)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 48)
  In make_scs (line 105) 
Warning: Escaped character '\s' is not valid. See 'doc sprintf' for supported special characters. 
> In compile_direct (line 51)
  In make_scs (line 105) 

Here is cmd after line 53 of compile_direct.m

cmd =

    'mex -O -largeArrayDims -DNOBLASSUFFIX -DSVD_ACTIVATED -DSILENCE_AMATRIX_WARNING -DMATLAB_MEX_FILE -DLAPACK_LIB_FOUND -DCTRLC=1 -DCOPYAMATRIX  -DDLONG -IC: C:amd_order C: C:amd_dump C: C:amd_postorder C: C:amd_post_tree C: C:amd_aat C: C:amd_2 C: C:amd_1 C: C:amd_defaults C: C:amd_control C: C:amd_info C: C:amd_valid C: C:amd_global C: C:amd_preprocess C: C:C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\linAlg.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\cones.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\cs.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\util.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\scs.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\ctrlc.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\directions.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\linsys\common.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\src\scs_version.c C:\scs-master_Super SCS_1.3.2\matlab\get_scs_rootdir.m\matlab\scs_mex.c C:-lut C: C:-lmwblas -lmwlapack C:'

Here are error message when linAlg.c was compiled from the above mex command (after paths were fixed)


Error using mex
linAlg.c
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(38): error: expected an identifier
  extern blasint SCS_IAMAX(
                 ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(39): error: function returning function is not allowed
          const blasint *n,
          ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(86): error: function returning function is not allowed
          const char* trans,
          ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(99): error: function returning function is not allowed
          const blasint* m,
          ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(693): error: identifier "i" is undefined
      blasint idx_max = scs_iamax_(&len_, a, &one);
                        ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(693): error: identifier "damax" is undefined
      blasint idx_max = scs_iamax_(&len_, a, &one);
                        ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(693): error: expected an expression
      blasint idx_max = scs_iamax_(&len_, a, &one);
                        ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(969): error: identifier "gels" is undefined
      scs_gels_((char *) "No transpose", &m_, &n_, &nrhs, 0, &lda, 0, &ldb, &wkopt, &lwork,
      ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(989): error: identifier "gels" is undefined
      scs_gels_("No transpose", &m_, &n_, &nrhs, A, &lda, b, &ldb, wspace, &wsize_, &status);
      ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(1011): error: identifier "gelss" is undefined
      scs_dgelss_(&m_, &n_, &nrhs, 0, &m_, 0, &m_,
      ^
C:\scs-master_Super SCS_1.3.2\src\linAlg.c(1036): error: identifier "gelss" is undefined
      scs_dgelss_(&m_, &n_, &nrhs, A, &m_, b, &m_,
      ^

compilation aborted for C:\scs-master_Super SCS_1.3.2\src\linAlg.c (code 2)

@alphaville
Copy link
Member

Question: For use in MATLAB, is it supposed to be sufficient to run make_scs, or does make need to be run (with Makefile ?) at command line before make_scs ?

Before you call make_scs you need to compile SuperSCS. Can you compile SuperSCS first using the Makefile (on Linux, for example, you just need to type make in the command line)?

@Mark-L-Stone
Copy link

Mark-L-Stone commented Mar 31, 2019

I did try using make prior to my post. I tried again. here is what I get

C:\scs-master_Super SCS_1.3.2>make
mkdir -p out/obj
The syntax of the command is incorrect.
make: *** [Makefile:126: make_dir] Error 1

Maybe the Windows mkdir doesn't work the same as Linux/Unix mkdir ? It seems -p should be eliminated. Getting rid of the -p in all mkdir commands in Makefile, and changing all/to \ in Makefile, the directory out\obj gets created, but get error

C:\scs-master_Super SCS_1.3.2>make
mkdir  out\obj
make: *** No rule to make target 'out\obj\directions.o', needed by 'out\libscsdi
r.a'.  Stop.

I am using the make from chocolatey at https://chocolatey.org/install#installing-chocolatey , Then choco install make . I suppose things would have worked out better if I had kept my Linux installation alive, but decided a few years ago it wasn't worth the hassle.

Perhaps you could get an undergraduate to spend an hour or two to produce a version of Makefileand make_scs which work well under Windows?

@Mark-L-Stone
Copy link

Mark-L-Stone commented Apr 13, 2019

Or possibly just produce a ready to go mex file for MATLAB under WINDOWS, eliminating the requirement for the end user to make anything?

@omart-59
Copy link

I cannot run super scs on Matlab using Windows as I encounter the problems reported in this post. Did meanwhile someone find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug report windows windows operating system
Projects
None yet
Development

No branches or pull requests

4 participants