title: speeding up CVXPY processing speed
body: <p>I have written some code that uses the cvxpy library to solve an integer programming problem, however the code is taking so much time to run I was wondering if there is any way to make the code faster?</p>
  
  <p>The integer programming problem in this case takes in a matrix of shape (1,569 x 3,071), and it has 3,071 constraints to satisfy. The code is as follows:</p>
  
  <pre class="lang-py prettyprint-override"><code>mat_f = sys.argv[1]
  matIdx2genome_dic_f = sys.argv[2]
  genomes_f = sys.argv[3]
  
  with open(matIdx2genome_dic_f, 'r') as in_f:
      matIdx2genome_dic = json.load(in_f)
  
  M = np.load(mat_f)   
  
  selection = cp.Variable(M.shape[1], boolean = True)
  ones_vec = np.ones(M.shape[1])
  
  constraints = []  
  for i in range(len(M)):
      constraints.append(M[i] * selection &gt;= 1)
  
  total_genomes = ones_vec * selection
  
  problem = cp.Problem(cp.Minimize(total_genomes), constraints)
  print('solving the integer programming problem: ')
  time = time.time()
  problem.solve(parallel = True)
  print('problem solved in: '+ str(time.time() - time))
  
  solution = selection.value
  solution = list(map(round, solution))
  solution = np.array(solution)
  
  which_genomes = np.where(solution == 1.0)[0]
  
  with open(genomes_f, 'w') as out_f:
      for idx in which_genomes:
          out_f.write(matIdx2genome_dic[idx]+'\n')
  </code></pre>
  
  <p>The first command line argument is what's important here, it's a numpy binary matrix that is of shape (1569, 3071).
  The problem here is to minimize the number of columns of the matrix needed such that each and every row has at least a 1 in it's rows.</p>
  
  <p>My question is how can I write this script so that it can run faster? is there a way to parallelize it? I have set the parallel parameter to True in the solve method by I don't think it's doing much since I'm monitoring the cpu utilization and it's only 100%, so I don't think that parallel option is doing much?
  Or is there another way (solver that I should call maybe) that would solve this faster?</p>