osqp / osqp-matlab

Matlab interface for OSQP
https://osqp.org/
Apache License 2.0
42 stars 25 forks source link

Failing Tests on Windows 10 + MATLAB R2020a #23

Closed RoyiAvital closed 3 years ago

RoyiAvital commented 4 years ago

I installed OSQP using the official binaries in bintray and the provided script as instructed in the guide.

I saw the run_osqp_tests.m file and ran it. The result I got is:

Failure Summary:

     Name                                             Failed  Incomplete  Reason(s)
    ==============================================================================================
     codegen_mat_tests/test_solve                       X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_P                    X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_P_allind             X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_A                    X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_A_allind             X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_P_A_indP_indA        X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_P_A_indP             X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_P_A_indA             X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_mat_tests/test_update_P_A_allind           X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_vec_tests/test_solve                       X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_vec_tests/test_update_q                    X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_vec_tests/test_update_l                    X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_vec_tests/test_update_u                    X         X       Errored.
    ----------------------------------------------------------------------------------------------
     codegen_vec_tests/test_update_bounds               X         X       Errored.
    ----------------------------------------------------------------------------------------------
     feasibility_tests/test_feasibility_problem         X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     unconstrained_tests/test_unconstrained_problem     X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_solve                   X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_P                X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_P_allind         X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_A                X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_A_allind         X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_P_A_indP_indA    X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_P_A_indP         X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_P_A_indA         X                 Failed by verification.
    ----------------------------------------------------------------------------------------------
     update_matrices_tests/test_update_P_A_allind       X                 Failed by verification.

Looking at the folder tree:

image

It seems something is creating the folders one inside the other.

It seems the code generation procedure is failing. Any idea?

Any information I can farther provide to assist fixing it?

Thank You.

dawnlh commented 3 years ago

The same issue on Win10 MATLAB R2018b, looking forward to the solution

goulart-paul commented 3 years ago

I can't reproduce the error. Two questions:

1) Does OSQP itself work for you after you install it, i.e. do examples in the documentation like this one work?

2) It seems that the failure is coming from the codegen tests. Do you have an appropriate compiler and cmake installed on your system? If you do, what happens if you run the example at the link above, and then run something like prob.codegen('.')?

gbanjac commented 3 years ago

I cannot reproduce the error either. I am using MATLAB R2020b on Windows 10.

dawnlh commented 3 years ago

I can't reproduce the error. Two questions:

  1. Does OSQP itself work for you after you install it, i.e. do examples in the documentation like this one work?
  2. It seems that the failure is coming from the codegen tests. Do you have an appropriate compiler and cmake installed on your system? If you do, what happens if you run the example at the link above, and then run something like prob.codegen('.')?

You are right! I forget to configure the cmake, cause this is not needed for osqp's installation but it's necessary for the codegen operation. Thanks for the reminder! I solved this problem by configuring the CMake and the compiler properly @RoyiAvital .

goulart-paul commented 3 years ago

In that case I will close the issue, and I will open a new one with a feature request for the Matlab codegen to fail more gracefully if cmake is not found.