The objective matrix is a 490*490 large real PSD matrix. The detailed information of this problem is put up below. What reasons cause such an error? Are there some solutions to fix it?
cvx real affine expression (490x490 matrix, 120295 d.o.f.)
That means you ran out of memory. Possible solutions are run on a bigger machine or buy more RAM.
It will reduce memory consumption to some extent if you run on 1 thread (set MSK_IPAR_NUM_THREADS to 1 in cvx solver options or set MSK_IPAR_INTPNT_MULTI_THREAD to 0).
To implement @Michal_Adamaszek 's advice, use 'cvx_solver_settings( '{name}', {value} ) as follows cvx_solver_settings('MSK_IPAR_NUM_THREADS',1)
or cvx_solver_settings('MSK_IPAR_INTPNT_MULTI_THREAD'.0)
help cvx_solver_settings
cvx_solver_settings CVX solver settings adjustment.
cvx_solver_settings is used to adjust the advaned settings of the
current solver being used by CVX. Before using this function, please
read the IMPORTANT NOTE below.
cvx_solver_settings( <name1>, <value1>, [ <name2>, <value2>, ... ] )
stores a custom setting called <name1> for the active solver, and gives
it a value of <value2>, and so forth for the other key-value pairs.
Each name must be a string containing a valid variable name; the values
may be of any type or size, including empty arrays or strings.
When CVX_END is reached, these key/value pairs will be delivered to the
underlying solver as parameters. This allows an expert user to modify
the behavior of the underlying solver in a manner that is otherwise
unavailable through more standard CVX commands.
cvx_solver_settings( 'name' ) or
cvx_solver_settings name
returns the current value of that setting for the current solver. If
there is no such setting by that name, an error results.
cvx_solver_settings( '-clear', <name1>, '-clear', <name2>, ... ) or
cvx_solver_settings -clear <name>
Removes the key/value pair matching <name> from the settings list for
the active solver.
cvx_solver_settings, with no arguments, displays the current list of
settings for the active solver.
cvx_solver_settings -all displays a list of the settings for all
all available solvers.
cvx_solver_settings -clear clears all settings for the active solver.
cvx_solver_settings -clearall clears all settings for all solvers.
cvx_solver_settings( S )
where S is a structure, replaces the *entire* list of solver settings
with the field-value pairs stored in the structure S.
S = cvx_solver_settings returns a structure containing all of the
settings for the current solver.
If you call cvx_solver_settings within a model --- that is, between
CVX_BEGIN and CVX_END --- then the changes are "local": that is, they
will apply ONLY to the current model.
On the other hand, if you call cvx_solver_settings outside of a model,
then the changes are "global": they will apply to all subsequent models
that employ that solver.
CVX_SAVE_PREFS will save any global settings you have provided, so they
will be restored the next time you start MATLAB.
cvx_solver_settings( 'dumpfile', <filename> ) is a setting supported by
all solvers. If set, it will save a .MAT file containing the exact
input arguments delivered to the solver. This file will be created
immediately before the solver is called, so you will be able to examine
their contents even if the solver fails with an error. This feature is
to be used primarily by solver developers.
**** IMPORTANT NOTE ****
Please use this feature with extreme caution, and at your own risk:
* CVX does not check the correctness of the settings you supply. If the
solver rejects the setting you supply, CVX will fail until you change
or remove that setting.
* Use of this feature can alter the quality of the solutions that the
solver produces: sometimes for the better, sometimes for the worse.
* Please consult your solver's specific documentation for information
about its available settings.
* The settings set here *override* any default values CVX has chosen
for each solver. In certain cases, this may actually confuse CVX and
and cause it to misinterpret the results. Fpr this reason, we cannot
support all possible combinations of custom settings.
Hi, thank you very much for the answer. So I suppose that most of the memory is used to store such a huge Schur complement matrix, then I have some questions:
How many Schur complements are needed to solve such a problem? Only one or multiple?
How much memory is enough to deal with it according to your estimation?My computer has memory of 64GB, is that enough?
Is such a Schur complement neccassery to solve my problem? Are there some special settings in Mosek or some other possible solvers which does not require such a large storage or can the algorithm in Mosek be refined to tackle such a problem?
I really appereciate it if you can give me some help if it’s convenient for you.
I kept monitoring the use of my memory and I found that even at the peak of it there sre still 2.5 GBs remained, but the programme still failed and responded with the “out of space” error, so why mosek can’t solve it?
I encourage you to submit a concise problem formulation as well as the script+data for running a very small instance of your problem. If you’re running out of memory there is a good chance that you’ve formulated you problem incorrectly. Otherwise the problem is probably intractable in the sense that you will not be able to solve it for the larger dimensions you are looking at.