Difference between revisions of "MOSEK"

Line 7: Line 7:
{{AppRunningOnCIRCE}}
{{AppRunningOnCIRCE}}


The MOSEK optimizer includes several interfaces. In order to use graphical interfaces, users will need to connect to the CIRCE Desktop Environment. See [[CIRCE Desktop|CIRCE Desktop Environment]] for more information and instructions.
The MOSEK optimizer includes several interfaces. In order to use graphical interfaces, users will need to connect to the CIRCE Desktop Environment. See [[CIRCE/SC Desktop|CIRCE/SC Desktop Environment]] for more information and instructions.


=== Jobs Shorter than 30 Minutes in Length ===
=== Jobs Shorter than 30 Minutes in Length ===
{{X11Connection}}
{{X11Connection}}


Once connected to CIRCE, you can open MOSEK using the steps below:
Once connected to CIRCE/SC, you can open MOSEK using the steps below:


<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/mosek/7.1.15
<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/mosek/7.1.15
Line 19: Line 19:
=== Jobs Longer than 30 Minutes in Length ===
=== Jobs Longer than 30 Minutes in Length ===


To run MOSEK jobs on CIRCE, users will need to submit “batch jobs” to the scheduling environment if their jobs takes more than 20 minutes to run on a standard PC.
To run MOSEK jobs on CIRCE/SC, users will need to submit “batch jobs” to the scheduling environment if their jobs takes more than 20 minutes to run on a standard PC.


If, for example, you have a MOSEK script file named test.m with all your functions defined in it, you would set up a submit script like this:
If, for example, you have a MOSEK script file named test.m with all your functions defined in it, you would set up a submit script like this:
Line 55: Line 55:
{{X11Connection}}
{{X11Connection}}


Once connected to CIRCE, you can open MOSEK using the steps below:
Once connected to CIRCE/SC, you can open MOSEK using the steps below:


<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/mosek/7.1.15
<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/mosek/7.1.15

Revision as of 20:37, 20 February 2017

Description

From the MOSEK website: the MOSEK optimization software is designed to solve large-scale mathematical optimization problems. The strong point of MOSEK is its state-of-the-art interior-point optimizer for continous linear, quadratic and conic problems. The interior-point optimizer is capable of exploiting multiple CPUs/cores. A concurrent optimizer is available that makes it possible to solve one problem with different optimizers simultaneously. The default mixed integer optimizer is parallelized and is run-to-run deterministic. MOSEK is widely employed in the financial, energy and forestry industry.

Version

  • 7.1.15

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster

Modules

MOSEK requires the following module file to run:

  • apps/mosek/7.1.15

Running MOSEK on CIRCE

The MOSEK user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

The MOSEK optimizer includes several interfaces. In order to use graphical interfaces, users will need to connect to the CIRCE Desktop Environment. See CIRCE/SC Desktop Environment for more information and instructions.

Jobs Shorter than 30 Minutes in Length

Establishing a GUI connection to CIRCE/SC

To use MOSEK, you will need to connect to CIRCE/SC with GUI redirection, either using:

  • CIRCE/SC Desktop Environment
  • SSH with X11 redirection
    • If connecting from OSX or Linux via SSH, please ensure that you use one of the following commands to properly redirect X11:
      • [user@localhost ~]$ ssh -X circe.rc.usf.edu
        or
      • [user@localhost ~]$ ssh -X sc.rc.usf.edu

Once connected to CIRCE/SC, you can open MOSEK using the steps below:

[user@login0 ~]$ module add apps/mosek/7.1.15
[user@login0 ~]$ mosek -h

Jobs Longer than 30 Minutes in Length

To run MOSEK jobs on CIRCE/SC, users will need to submit “batch jobs” to the scheduling environment if their jobs takes more than 20 minutes to run on a standard PC.

If, for example, you have a MOSEK script file named test.m with all your functions defined in it, you would set up a submit script like this:

  • The script below (for testing, name it “mosek-test.sh”) can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue. For help on submitting jobs to the queue, see our SLURM User’s Guide. Scripts are provided as examples only. Your SLURM executables, tools, and options will vary.
#!/bin/bash
#
#SBATCH --comment=mosek-test
#SBATCH --ntasks=4
#SBATCH --job-name=mosek-test
#SBATCH --mem-per-cpu=2048
#SBATCH --output=output.%j.mosek-test
#SBATCH --time=01:00:00

#### SLURM 4 processor MOSEK test to run for 1 hour.

module load apps/mosek/7.1.15

mosek test.m

 
Next, you can change to your job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./mosek-test.sh
  • You can view the status of your job with the “squeue -u <username>” command
  • The -p flag allows the user to change system or algorithmic parameters in MOSEK. One way of the changing parameters is to use a parameter file which is a plain text file called mosek.par in the example above. The input is a file describing the optimization problems and is either a MPS file or AMPL nl file, using different command line options. See the MOSEK command line tool documentation for format, options, and additional details.

Using the MOSEK toolbox with Matlab

Establishing a GUI connection to CIRCE/SC

To use MOSEK, you will need to connect to CIRCE/SC with GUI redirection, either using:

  • CIRCE/SC Desktop Environment
  • SSH with X11 redirection
    • If connecting from OSX or Linux via SSH, please ensure that you use one of the following commands to properly redirect X11:
      • [user@localhost ~]$ ssh -X circe.rc.usf.edu
        or
      • [user@localhost ~]$ ssh -X sc.rc.usf.edu

Once connected to CIRCE/SC, you can open MOSEK using the steps below:

[user@login0 ~]$ module add apps/mosek/7.1.15
[user@login0 ~]$ module add apps/matlab/r2013b
[user@login0 ~]$ matlab

Once you have the Matlab interface open, you will need to issue a few commands to configure Matlab for MOSEK.

>> addpath '/apps/mosek/7.1.15/toolbox/r2013aom'  
>> javaaddpath('/apps/mosek/7.1.15/tools/platform/linux64x86/bin/mosek.jar')
>> mosekdiag

The mosekdiag command should verify that MOSEK works. If everything is set up correctly, you should see several lines of text with the final two lines as below:

mosekopt is working correctly. 
MOSEK Fusion is working correctly.

Documentation

Home Page, User Guides, and Manuals

Benchmarks, Known Tests, Examples, Tutorials, and Other Resources

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with MOSEK to the IT Help Desk: rc-help@usf.edu