2. Installing the software


This section describes how to install the MOSEK software and how to verify that the software is working correctly. The packages available for download from the MOSEK homepage contain everything, i.e.

Hence, it is sufficient to download one package for each platform.

2.1. Windows installation

First step is to download the appropriate installation file from the MOSEK website. The relevant Windows installer file is one of the following

To install MOSEK you must have administrative privileges, or the installation will fail. After the installation you will be asked to reboot. This is required because otherwise changes to the environment variables will not take effect.

2.1.1. Verifying the installation

The set-up can be tested by executing the MOSEK command line tool: Open a terminal and type

mosek -f

If the set-up is correct, this will print MOSEK version information, host name, environment variables and other information.

2.2. Mac OS X installation

First, download the relevant binary package and save it to a directory where MOSEK should be installed. For Mac OS X this would be one of the files

Open a terminal (usually located in Applications/Utilities), change to the directory where the downloaded package was saved, then unpack it using a command similar to

tar -xzvf mosektoolsosx32x86.tar.gz

This will create a mosek/6 directory containing the whole distribution. In the following we will assume that the distribution was unpacked in the home directory of a user called “NAME” – you should replace “/Users/NAME” by the absolute path of the location of the .

MOSEK can be used either as a stand-alone application from the command line or as a callable library from an application. This requires some manual installation steps to be completed.

2.2.1. License file set-up

The environment variable MOSEKLM_LICENSE_FILE must either point to a valid MOSEK license file or to a directory containing a valid MOSEK license file. This can be achieved by modifying (or creating) the

~/.MacOSX/environment.plist

file so it contains an entry defining MOSEKLM_LICENSE_FILE, e.g.

    <key>MOSEKLM_LICENSE_FILE</key>
    <string>/Users/NAME/mosek/6/licenses/mosek.lic</string>

For this to take effect you must log out and log in again.

Please see the official documentation on environment.plist and user defined environment variables at

http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html

To verify that this has taken effect, open a terminal and type

echo $MOSEKLM_LICENSE_FILE

2.2.2. Mosek binaries set-up

To use MOSEK from other applications, the system must be able to find all binary libaries used by the MOSEK library. The simplest way to ensure this is to copy or link all MOSEK libraries into a directory the system knows of, e.g. the users lib. This can be done from a terminal as follows:

mkdir ~/lib
cd ~/lib
ln -s /Users/NAME/mosek/6/tools/platform/osx32x86/bin/*.dylib .

where “/Users/NAME” should be replaced by the location of the MOSEK installation, and “osx32x86” by the platform name. Please note that the first command will fail if that directory already exists. To verify that it works, open a terminal and run the MOSEK command line tool by typing

/Users/NAME/mosek/6/tools/platform/osx32x86/bin/mosek -f

Furthermore, if you want to be able to run the MOSEK command line tool without typing the full path, also do the following:

mkdir ~/bin
cd ~/bin
ln -s /Users/NAME/mosek/6/tools/platform/osx32x86/bin/mosek .

Substitute as above and note that the first command will fail if the directory already exists. To verify that it works, open a terminal and run the MOSEK command line tool by typing

mosek -f

2.2.3. MOSEK/Python set-up

To use the PyMosek module from Python, the environment variable PYTHONPATH must point to the directory containing pymosek.dylib.

This can be achieved by modifying the

~/.MacOSX/environment.plist

file so that it contains an entry defining MOSEKLM_LICENSE_FILE, e.g.

    <key>PYTHONPATH</key>
    <string>/Users/NAME/mosek/6/tools/platform/osx32x86/bin</string>

For this to take effect you must log out and log in again.

Please see the official documentation on environment.plist and user defined environment variables at

http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html

2.3. Linux/UNIX installation instructions

First, download the relevant binary package and save it to a directory where MOSEK should be installed. For Linux that would be one of the files

For Sun Solaris it is one of the files

Open a terminal, change to the directory where the downloaded package was saved, then unpack it using a command similar to

tar xzvf mosektools<platform>.tar.gz

where <platform> is the platform type, e.g. linux32x86. This will create a mosek/6 directory containing the whole distribution.

In the following

<INSTALL_DIR>

denotes the location where MOSEK was unpacked, e.g the users home directory.

2.3.1. Environment set-up

To use the MOSEK library or command line tool, the environment variables LD_LIBRARY_PATH and PATH must include the relevant MOSEK path:

<INSTALL_DIR>/mosek/6/tools/platform/<PLATFORM>/bin

where <PLATFORM> should be replaced according to the platform, and MOSEKLM_LICENSE_FILE must point to the relevant license file or directory.

These values can be permanently added by appending entries to the user's

~/.bashrc

or similar, e.g assuming that

<INSTALL_DIR> = $HOME

then

# Change "platform" to the relevant value.
MOSEKPLATFORM=platform
export PATH=$PATH:$HOME/mosek/6/tools/platform/$MOSEKPLATFORM/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/mosek/6/tools/platform/$MOSEKPLATFORM/bin
export MOSEKLM_LICENSE_FILE=$HOME/mosek/6/licenses

The changes will not take effect until next time the shell is started.

2.3.2. Verifying the set-up

When the environment has been set up, the next terminal that is opened should start with the correct settings. The set-up can be tested by executing the MOSEK command line tool: Open a terminal and type

mosek -f

If the set-up is correct, this will print MOSEK version information, host name, environment variables and other information. Verify that

  • the LD_LIBRARY_PATH matches your settings,
  • the MOSEKLM_LICENSE_FILE matches your settings, and
  • the version is correct (6.0).

2.3.3. Installation of the Java optimizer API

This section can be skipped if you do not want to use the Java optimizer API.

To use this interface, the steps described in Section 2.3.1 must be completed in advance. The MOSEK class library is located in the

<INSTALL_DIR>/mosek/6/tools/platform/$MOSEKPLATFORM/bin/mosek.jar

file which must be specified either on compile-time and run-time. One way of doing this is to set the CLASSPATH environment variable, e.g. in the user's

~/.bashrc

or similarly as

export CLASSPATH=$CLASSPATH:$HOME/mosek/6/tools/platform/$MOSEKPLATFORM/bin/mosek.jar

This assumes that you installed MOSEK in $HOME.

2.3.3.1. Installation of the .NET optimizer API for MONO

This section can be skipped if you do not want to use the MOSEK/.NET API.

To use this interface, the steps described in Section 2.3.1 must be completed in advance. The MOSEK/.NET library is located in

<INSTALL_DIR>/mosek/6/tools/platform/$MOSEKPLATFORM/bin/mosekdotnet.dll

or

<INSTALL_DIR>/mosek/6/tools/platform/$MOSEKPLATFORM/bin/mosekdotnet64.dll

depending on the platform. This must be set in the MONO_PATH environment variable, e.g. in the user's

~/.bashrc

or similarly as

export MONO_PATH=$MONO_PATH:$HOME/mosek/6/tools/platform/$MOSEKPLATFORM/bin

This assumes that:

<INSTALL_DIR>=$HOME

Further instructions can be found in the MOSEK/.NET manual.

Wed Feb 29 16:22:55 2012