Specifying the number of threads in MOSEK

When calling MOSEK as the solver, I noticed that it detects and uses all available cores on the machine to solve the problem:

Calling Mosek 7.0.0.92: 15001 variables, 5001 equality constraints
   For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------

MOSEK Version 7.0.0.92 (Build date: 2013-11-13 13:19:59)
Copyright (c) 1998-2013 MOSEK ApS, Denmark. WWW: http://mosek.com

Computer
  Platform               : Linux/64-X86
  Cores                  : 8

Problem
  Name                   :
  Objective sense        : min
  Type                   : CONIC (conic optimization problem)
  Constraints            : 5001
  Cones                  : 1
  Scalar variables       : 15001
  Matrix variables       : 0
  Integer variables      : 0

Optimizer started.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator - tries                  : 0                 time                   : 0.00
Eliminator - elim's                 : 0
Lin. dep.  - tries                  : 1                 time                   : 0.71
Lin. dep.  - number                 : 0
Presolve terminated. Time: 5.87
Optimizer  - threads                : 8

is there a way to specify in the cvx preferences how many cores to use?

Preferably, I would like to run all my jobs using single cores. I did not notice the same issue when using SeDuMi or SDPT3 as these by default use a single core.

Thanks!

Edit:

Thank you for the response.

I actually found the MOSEK parameter that controls the number of threads:

MSK_IPAR_NUM_THREADS

http://docs.mosek.com/7.0/tools/MSK_IPAR_NUM_THREADS.html

MOSEK documentation states that the default parameter is 0 which sets the number of threads used to the number of cores detected on the machine.

The parameter is integer with values greater or equal to 0.

How can I pass a new parameter value for this using cvx_solver_settings?

Perhaps someone from MOSEK will answer here, but there is no way to control this with a first-class CVX command. However, CVX does provide the cvx_solver_settings function that will let you make adjustments to MOSEK’s internal parameters (or Gurobi’s, for that matter). You can see more details in this section of the user’s guide about this CVX command. But this requires knowledge of your solver’s operation as well, and for that, you’ll need to consult the MOSEK user’s guide.

I’ve tried the command:

cvx_solver mosek
cvx_solver_settings('MSK_IPAR_NUM_THREADS',1)

and it seems to do the job:

>> cvx_begin       
>> cvx_solver mosek
>> cvx_solver_settings('MSK_IPAR_NUM_THREADS',1)
>> cvx_begin
>> variable x(50,1)                             
>> minimize(norm(A*x-b))
>> subject to
>> x>=0;  
>> x<=0.5;
>> cvx_end
 
Calling Mosek 7.0.0.92: 151 variables, 51 equality constraints
   For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------
NOTE: custom settings have been set for this solver.
------------------------------------------------------------

MOSEK Version 7.0.0.92 (Build date: 2013-11-13 13:19:59)
Copyright (c) 1998-2013 MOSEK ApS, Denmark. WWW: http://mosek.com

Computer
  Platform               : Linux/64-X86    
  Cores                  : 8               

Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 51              
  Cones                  : 1               
  Scalar variables       : 151             
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer started.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator - tries                  : 0                 time                   : 0.00            
Eliminator - elim's                 : 0               
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.00    
Optimizer  - threads                : 1   

Thanks for the help.

I can confirm the parameter MSK_IPAR_NUM_THREADS controls the number of threads that is employed. You output indicates MOSEK does what it is supposed to do. I am not sure what else relevant I can add.