GithubHelp home page GithubHelp logo

Segmentation fault: 11 about osqp-python HOT 4 CLOSED

osqp avatar osqp commented on July 28, 2024
Segmentation fault: 11

from osqp-python.

Comments (4)

bstellato avatar bstellato commented on July 28, 2024

I just tried your code and it seems to give the segfault when verbose=True. Have you tried it with False instead? I will look into a fix.

from osqp-python.

sbarratt avatar sbarratt commented on July 28, 2024

@bstellato I'm getting a seg fault with verbose=False when running 50 in parallel. Here's the code

import osqp
import numpy as np
import scipy as sp
from scipy import sparse
from multiprocessing.pool import ThreadPool

def f(i):
    m = 30
    n = 20
    Ad = sparse.random(m, n, density=0.7, format='csc')
    b = np.random.randn(m)

    # OSQP data
    P = sparse.block_diag([sparse.csc_matrix((n, n)), sparse.eye(m)], format='csc')
    q = np.zeros(n+m)
    A = sparse.vstack([
            sparse.hstack([Ad, -sparse.eye(m)]),
            sparse.hstack([sparse.eye(n), sparse.csc_matrix((n, m))])], format='csc')
    l = np.hstack([b, np.zeros(n)])
    u = np.hstack([b, np.ones(n)])

    # Setup workspace
    osqp.solve(P, q, A, l, u, verbose=False)

pool = ThreadPool(4)
pool.map(f, range(50))

from osqp-python.

bstellato avatar bstellato commented on July 28, 2024

I think the printing issue was related to this cvxgrp/scs#48 I will try to fix it tomorrow together with your segfault problem.

from osqp-python.

gshaikov avatar gshaikov commented on July 28, 2024

@bstellato thank you for the prompt response! You are right, verbose=False solved the second case.

from osqp-python.

Related Issues (20)

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.